emacs-devel
[Top][All Lists]
Advanced

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

Re: Byte compilation without writing the .elc file


From: phillip . lord
Subject: Re: Byte compilation without writing the .elc file
Date: Sun, 23 Jun 2019 14:32:40 +0100
User-agent: Roundcube Webmail/1.3.8

On 2019-06-23 12:53, Lars Ingebrigtsen wrote:
Often when I'm working on an out-of-tree Emacs Lisp file, I want to do
byte compilation to see whether what I've done generates any warnings --
but I don't want the .elc file, because I want to run it from .el.

So I `M-x byte-compile-file' and then delete the .elc file.  This seems
kinda sub-optimal, and surely others must also have this problem.

The internal `byte-compile-from-buffer' function almost does the right
thing, but it doesn't set things up properly, so it doesn't quite work.

So I think it would be a good idea if Emacs had a command called, say,
`byte-compile-buffer' that does the same thing as `byte-compile-file',
but for the current buffer and without outputting anything.  Does that
sound OK?


I think that the functionality might be good but the name might be confusing, since in this case, byte-compile-buffer wouldn't do anything (except produce error messages). There is also "emacs-lisp-byte-compile" and
"emacs-lisp-byte-compile-and-load".

Given that, I think, it is not possible to load a byte compiled file that has not been saved and you do not want to add this, why either add an option to `emacs-lisp-byte-compile' and `byte-compile-file'. Or alternatively, add a few function such as `emacs-lisp-check-errors' or equivalent. I mean, in this case, the byte-compilation is not really
the point; it's just how you are checking the file.




reply via email to

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