[Top][All Lists]

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

Re: Speeding up Flymake in emacs-lisp-mode

From: Noam Postavsky
Subject: Re: Speeding up Flymake in emacs-lisp-mode
Date: Fri, 2 Nov 2018 09:26:13 -0400

On Fri, 2 Nov 2018 at 09:12, Stefan Monnier <address@hidden> wrote:
> > First, I was under the impression that stdin/stdout for emacs was
> > not easy.
> Usually it's not, but when running in batch mode it's not so bad.

Yup, (elisp) Batch Mode:

    input that would normally come from the minibuffer is read from the
    standard input descriptor.

> > Glad to hear it isn't, but how do I read from stdin?
> async.el does it with (read t), IIRC.

read-from-minibuffer should also work if non-sexp input is wanted.

>> What do you mean by asynchronous process startup? Isn't that
>> a "stop-the-world" operation however it is invoked?

The subprocess created by make-process (or start-process) doesn't
block the parent Emacs, it runs in parallel.

 1 '(call-process (concat invocation-directory invocation-name)
                  nil nil nil "-Q" "--batch"))
;=> "Elapsed time: 0.185000s"

(benchmark 1 '(start-process
               "emacs" nil (concat invocation-directory invocation-name)
               "-Q" "--batch"))
;=> "Elapsed time: 0.031000s"

reply via email to

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