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: Drew Adams
Subject: RE: Byte compilation without writing the .elc file
Date: Sun, 23 Jun 2019 08:49:36 -0700 (PDT)

> 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 too do that sometimes: byte-compile a file, then
delete the *.elc.  I'm in favor of a new command to
do that (but of course avoiding creating and then
deleting the file).

However, I think the command should be available
from outside any buffer visiting the file, and it
should take a file, not a buffer, as its argument.

There should be no reason to have to visit the file
in a buffer to be able to get the desired effect.

For example, when I do this I often do it in Dired,
using `B' to compile, followed by `D'.



reply via email to

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