From: Drew Adams <drew.adams@oracle.com>
To: Lars Ingebrigtsen <larsi@gnus.org>, emacs-devel@gnu.org
Subject: RE: Byte compilation without writing the .elc file
Date: Sun, 23 Jun 2019 08:49:36 -0700 (PDT) [thread overview]
Message-ID: <f7667b12-aefa-44a5-8efe-1082f91bf700@default> (raw)
In-Reply-To: <m3o92ov7p5.fsf@gnus.org>
> 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'.
prev parent reply other threads:[~2019-06-23 15:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-23 11:53 Byte compilation without writing the .elc file Lars Ingebrigtsen
2019-06-23 12:55 ` Stefan Monnier
2019-06-23 13:35 ` Lars Ingebrigtsen
2019-06-23 13:14 ` Clément Pit-Claudel
2019-06-23 13:38 ` Lars Ingebrigtsen
2019-06-23 13:32 ` phillip.lord
2019-06-23 15:49 ` Drew Adams [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f7667b12-aefa-44a5-8efe-1082f91bf700@default \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).