help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making M-X compile cache compile command across sessions?


From: Kevin Rodgers
Subject: Re: Making M-X compile cache compile command across sessions?
Date: Fri, 27 Jan 2006 17:30:54 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

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





reply via email to

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