all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: phillip.lord@russet.org.uk
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Emacs-devel
	<emacs-devel-bounces+phillip.lord=russet.org.uk@gnu.org>,
	emacs-devel@gnu.org
Subject: Re: Byte compilation without writing the .elc file
Date: Sun, 23 Jun 2019 14:32:40 +0100	[thread overview]
Message-ID: <54c7c5868c53163d9d198132b72e7184@russet.org.uk> (raw)
In-Reply-To: <m3o92ov7p5.fsf@gnus.org>

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.




  parent reply	other threads:[~2019-06-23 13:32 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 [this message]
2019-06-23 15:49 ` Drew Adams

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54c7c5868c53163d9d198132b72e7184@russet.org.uk \
    --to=phillip.lord@russet.org.uk \
    --cc=emacs-devel-bounces+phillip.lord=russet.org.uk@gnu.org \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.