* Making M-X compile cache compile command across sessions?
@ 2006-01-27 14:22 Roy Smith
2006-01-28 0:30 ` Kevin Rodgers
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Roy Smith @ 2006-01-27 14:22 UTC (permalink / raw)
I'm working in a system which has longish compile commands, for
example, "cd /work/smithr/sandbox/B-IC-6-2/smarts/clsapi; gmake
BV=SUFFIX=V65".
It's a pain to type all this every time I start up a new emacs
session. I know I can setq compile-command in my .emacs file, but
that's a little too static. It would be cool if emacs wrote the last
compile command I used out to a file so it has a persistant cache
across emacs sessions. Any way to make it do that?
I'm using GNU Emacs 21.3.1.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Making M-X compile cache compile command across sessions?
2006-01-27 14:22 Making M-X compile cache compile command across sessions? Roy Smith
@ 2006-01-28 0:30 ` Kevin Rodgers
2006-01-29 4:48 ` Ian Zimmerman
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2006-01-28 0:30 UTC (permalink / raw)
Roy Smith wrote:
> I'm working in a system which has longish compile commands, for
> example, "cd /work/smithr/sandbox/B-IC-6-2/smarts/clsapi; gmake
> BV=SUFFIX=V65".
`M-x recompile' is your friend.
> It's a pain to type all this every time I start up a new emacs
> session. I know I can setq compile-command in my .emacs file, but
> that's a little too static. It would be cool if emacs wrote the last
> compile command I used out to a file so it has a persistant cache
> across emacs sessions. Any way to make it do that?
>
> I'm using GNU Emacs 21.3.1.
Perhaps the Desktop library (documented in the "Saving Emacs Sessions"
node of the Emacs manual) will do the trick, once compile-command has
been added to desktop-globals-to-save.
Desktop probably does more than you want, though, so maybe you'll want
to set desktop-buffers-not-to-save and/or desktop-files-not-to-save to
".*".
Or you could roll your own kill-emacs-hook that writes
(setq compile-command "...")
to ~/compile-command.el, and have ~/.emacs automatically load
"~/compile-command".
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Making M-X compile cache compile command across sessions?
2006-01-27 14:22 Making M-X compile cache compile command across sessions? Roy Smith
2006-01-28 0:30 ` Kevin Rodgers
@ 2006-01-29 4:48 ` Ian Zimmerman
[not found] ` <mailman.91.1138510309.3044.help-gnu-emacs@gnu.org>
2006-01-29 18:30 ` Berthold Höllmann
3 siblings, 0 replies; 5+ messages in thread
From: Ian Zimmerman @ 2006-01-29 4:48 UTC (permalink / raw)
Roy> It's a pain to type all this every time I start up a new emacs
Roy> session. I know I can setq compile-command in my .emacs file, but
Roy> that's a little too static. It would be cool if emacs wrote the
Roy> last compile command I used out to a file so it has a persistant
Roy> cache across emacs sessions. Any way to make it do that?
Use the desktop module and
(add-to-list 'desktop-globals-to-save '(compile-history . 20))
or something similar.
--
A true pessimist won't be discouraged by a little success.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Making M-X compile cache compile command across sessions?
[not found] ` <mailman.91.1138510309.3044.help-gnu-emacs@gnu.org>
@ 2006-01-29 13:56 ` Roy Smith
0 siblings, 0 replies; 5+ messages in thread
From: Roy Smith @ 2006-01-29 13:56 UTC (permalink / raw)
In article <mailman.91.1138510309.3044.help-gnu-emacs@gnu.org>,
Ian Zimmerman <nobrowser@gmail.com> wrote:
> Roy> It's a pain to type all this every time I start up a new emacs
> Roy> session. I know I can setq compile-command in my .emacs file, but
> Roy> that's a little too static. It would be cool if emacs wrote the
> Roy> last compile command I used out to a file so it has a persistant
> Roy> cache across emacs sessions. Any way to make it do that?
>
> Use the desktop module and
>
> (add-to-list 'desktop-globals-to-save '(compile-history . 20))
>
> or something similar.
Wow, I'd never heard of desktop before. Sounds like exactly what I'm
looking for, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Making M-X compile cache compile command across sessions?
2006-01-27 14:22 Making M-X compile cache compile command across sessions? Roy Smith
` (2 preceding siblings ...)
[not found] ` <mailman.91.1138510309.3044.help-gnu-emacs@gnu.org>
@ 2006-01-29 18:30 ` Berthold Höllmann
3 siblings, 0 replies; 5+ messages in thread
From: Berthold Höllmann @ 2006-01-29 18:30 UTC (permalink / raw)
roy@panix.com (Roy Smith) writes:
> I'm working in a system which has longish compile commands, for
> example, "cd /work/smithr/sandbox/B-IC-6-2/smarts/clsapi; gmake
> BV=SUFFIX=V65".
>
> It's a pain to type all this every time I start up a new emacs
> session. I know I can setq compile-command in my .emacs file, but
> that's a little too static. It would be cool if emacs wrote the last
> compile command I used out to a file so it has a persistant cache
> across emacs sessions. Any way to make it do that?
>
> I'm using GNU Emacs 21.3.1.
I usually solve this via file variables. Usually you call this make
command when editin specific files. Let the files end with
;;; Local Variables: ***
;;; compile-command: "cd /work/smithr/sandbox/B-IC-6-2/smarts/clsapi; gmake BV=SUFFIX=V65" ***
;;; End: ***
and M-x compile provides you with the wanted default.
--
berthold@xn--hllmanns-n4a.de / <http://höllmanns.de/>
bhoel@web.de / <http://starship.python.net/crew/bhoel/>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-01-29 18:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-27 14:22 Making M-X compile cache compile command across sessions? Roy Smith
2006-01-28 0:30 ` Kevin Rodgers
2006-01-29 4:48 ` Ian Zimmerman
[not found] ` <mailman.91.1138510309.3044.help-gnu-emacs@gnu.org>
2006-01-29 13:56 ` Roy Smith
2006-01-29 18:30 ` Berthold Höllmann
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).