[Top][All Lists]

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

Re: How to pre-load compile command history?

From: Roy Smith
Subject: Re: How to pre-load compile command history?
Date: Wed, 16 Nov 2011 13:36:31 -0500

Hmmm, my lisp is really rusty, and I'm struggling with the syntax.  The following doesn't seem to work.

(setq compile-history (cons '("cd /home/roy/songza/pyza/djapi; python"
                              "cd /home/roy/songza/code/radio/api/mobile/test; python"

On Nov 16, 2011, at 12:54 PM, Drew Adams wrote:

(global-set-key "\C-cm" 'compile)
(setq compile-command "cd
/home/roy/songza/code/radio/api/mobile/test; python")

That works fine, but now I've got several different commands
that I run often.  Is there some way to pre-load them into
the compile history, so I can just do c-c m, then up-arrow
though the history to pick the one I want?

If option `compilation-read-command' is non-nil then you are prompted with
completion for the compilation command to use.  You can set the history variable
`compile-history' ahead of time, so you can then use `M-n', `M-p', `M-s', and
`M-r' to access the commands on your list.

(This is according to what I see in the code in `compile.el'.  I don't often use
`compile' myself.)

Roy Smith

reply via email to

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