help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: not good proposal: "C-z <letter>" reserved for users


From: Jean Louis
Subject: Re: not good proposal: "C-z <letter>" reserved for users
Date: Sat, 20 Feb 2021 17:54:36 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* Emanuel Berg via Users list for the GNU Emacs text editor 
<help-gnu-emacs@gnu.org> [2021-02-18 02:24]:
> But the point is, if you have tmux you don't need to suspend
> your editor in order to do a routine task.

This statement comes because of your personalized use of the
editor. Millions of users use it in same way and there may be hundreds
of thousands or thousands only using it in somewhat different way then
you would ever think.

I use Emacs sometimes to accept CGI information.

Often I use it to process media information for days, that is where
suspending makes sense, as it releases CPU, hard disk, it lessens
heating of a computer, maybe it allows for a picture to be mogrified
before the process continues to run.

> You can just bring forward an empty tmux pane anytime and do
> whatever task there instead.

You are so right, but that is supervision of various processes, not
suspending of a process.

Sometimes I do use click and pray methods where I am unsure of the
outcome and I invoke program to see if it does what I mean it does,
sometimes it does not, that is where suspending is first.

In Emacs Ctrl-g is first used, but if Ctrl-g does not work, Ctrl-z may
work. It is true that Ctrl-g rarely does not work, but last few months
of experience tells me that it did not work as expected on multiple
occasions, such as those when memory was taken by Emacs extensively,
this still happens sometimes, sometimes when emails were sent in the
queue, maybe because of various invokations of outside processes.

> The very few times one has to kill processes manually sending
> signals the shell tools seem more than enough capable and also
> fast enough to do this.

That is your perception and I agree it is most of time like that, as
you do not have any heavy processing. Other people may have processing
that takes resources, that makes it not responsive.

> - Sir, we have a problem! The shell tools aren't fast enough!
> - Son, suspend the text editor!
> - Sir yes sir!

hahahahhah

But sure, I understand that joke, only that editor is not just editor,
it has capabilities of looping and processing so much more than just
visible text. I see now that development version included
--without-modules, so I just think that new version includes modules
by default unlike how it was before. One important module I use is
PostgreSQL which is connection to the database. No other editor that I
know has possibility to connect to the database. Majority of editors
is not even extensible. Emacs Lisp is a true programming language, so
almost any kind of processing is available with it. My editor is not
editor, it processes things without my supervision, it may run in
background for days doing tasks and being not-responsive to me, and I
may suspend it during my day time.

Not that shell tools are not fast enough, in fact, Emacs can be used
as shell tool and in batch mode it does same what Guile, MIT Scheme,
SBLC or CLISP or other Lisp similar or other shell scripts do.

I have 4080 pages in my website revision system, what if all of them
in Org mode that has to be exported to HTML? Emacs is not quite fast,
but it is currently the only one that can convert the Org mode to
HTML. HTML has to be saved. So the WRS (website revision system) is
running in background either by using CLISP as Common Lisp or by using
Emacs Lisp, and is processing pages, and invoking externala Emacs Lisp
script to process Org to HTML, Org is then saved with its HTML
template on the hard disk, and later synchronized with webserver.

Before I had 30000 pages, what if all of them are in Org mode, then I
would have need much more processing power. But most of them I write
in markdown and use discount markdown version which is the fastest
one, I know it because I have tested all of the markdown versions and
discount was fastest, followed by peg markdown. I know that because I
have been processing thousands of web pages and expanding them into
HTML for Internet marketing.

Editor is not just editor.

#!/usr/local/bin/emacs --script

;;;; Good idea from 
https://joelmccracken.github.io/entries/reading-writing-data-in-emacs-batch-via-stdin-stdout/

(defun org-stdin-to-html-full ()
  "Reads org text body from STDIN and export full HTML"
  (let ((org-document-content "")
        this-read)
    (while (setq this-read (ignore-errors
                             (read-from-minibuffer "")))
      (setq org-document-content (concat org-document-content this-read "\n")))

    (with-temp-buffer
      (org-mode)
      (insert org-document-content)
      (org-html-export-as-html)
      (princ (buffer-string)))))


(defun org-stdin-to-html-body-only ()
  "Reads org text body from STDIN and export full only body HTML"
  (let ((org-document-content "")
        this-read)
    (while (setq this-read (ignore-errors
                             (read-from-minibuffer "")))
      (setq org-document-content (concat org-document-content this-read "\n")))

    (with-temp-buffer
      (org-mode)
      (insert org-document-content)
      (org-html-export-as-html nil nil nil t)
      (princ (buffer-string)))))

(org-stdin-to-html-body-only)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]