all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Alfred M. Szmidt" <ams@gnu.org>
To: Juri Linkov <juri@jurta.org>
Cc: emacs-devel@gnu.org
Subject: Re: compile.el: save compile-command
Date: Fri, 23 Apr 2010 10:31:54 -0400	[thread overview]
Message-ID: <E1O5Jv8-0000AV-W0@fencepost.gnu.org> (raw)
In-Reply-To: <87iq7ia7g6.fsf@mail.jurta.org> (message from Juri Linkov on Fri,  23 Apr 2010 11:37:37 +0300)

   The idea is good, but the output is very ugly: the first line becomes
   too long, and the compile command is no more easy to find and read.

   Since your intention was to save the command as a file local variable,
   what do you think about putting an `invisible' property over the added
   `compile-command' in the first line?

The property would be lost if you save the compilation output, and use
it at a later point.  I don't see the problem with long lines, since
all lines are long when compiling anyway.  How about the following
instead.

2010-04-23  Alfred M. Szmidt  <ams@gnu.org>

	* progmodes/compile.el (compilation-start): Save COMMAND in file local variable.

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 13cf862..5a8ef69 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1266,6 +1266,7 @@ Returns the compilation buffer created."
 	;; Output a mode setter, for saving and later reloading this buffer.
 	(insert "-*- mode: " name-of-mode
 		"; default-directory: " (prin1-to-string default-directory)
+		"; compile-command: " (prin1-to-string command)
 		" -*-\n"
 		(format "%s started at %s\n\n"
 			mode-name




  reply	other threads:[~2010-04-23 14:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-22 14:57 compile.el: save compile-command Alfred M. Szmidt
2010-04-23  8:37 ` Juri Linkov
2010-04-23 14:31   ` Alfred M. Szmidt [this message]
2010-04-23 14:36   ` Stefan Monnier
2010-04-23 16:54     ` Juri Linkov
2010-04-23 15:00   ` Davis Herring

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=E1O5Jv8-0000AV-W0@fencepost.gnu.org \
    --to=ams@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=juri@jurta.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.