From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Roy Smith Newsgroups: gmane.emacs.help Subject: Re: How to pre-load compile command history? Date: Wed, 16 Nov 2011 13:36:31 -0500 Message-ID: References: <1DC1329F-218F-4086-9C0C-3A2A4D56289A@panix.com> <3135048E86744BFC9C3BAFA295F56AED@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: multipart/alternative; boundary="Apple-Mail=_4B05D415-8258-4ED9-9C54-437E3C2EE647" X-Trace: dough.gmane.org 1321468609 10833 80.91.229.12 (16 Nov 2011 18:36:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 16 Nov 2011 18:36:49 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 16 19:36:45 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RQkLe-0007Ja-9G for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Nov 2011 19:36:40 +0100 Original-Received: from localhost ([::1]:53415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQkLd-0000AM-Ql for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Nov 2011 13:36:37 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQkLZ-00008c-B8 for help-gnu-emacs@gnu.org; Wed, 16 Nov 2011 13:36:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RQkLU-0001BV-P6 for help-gnu-emacs@gnu.org; Wed, 16 Nov 2011 13:36:33 -0500 Original-Received: from mailbackend.panix.com ([166.84.1.89]:62046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQkLU-0001BI-Mf for help-gnu-emacs@gnu.org; Wed, 16 Nov 2011 13:36:28 -0500 Original-Received: from sullivan.lic.songza.com (unknown [66.114.87.114]) by mailbackend.panix.com (Postfix) with ESMTP id A33DA2854F; Wed, 16 Nov 2011 13:36:27 -0500 (EST) In-Reply-To: <3135048E86744BFC9C3BAFA295F56AED@us.oracle.com> X-Mailer: Apple Mail (2.1251.1) X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 166.84.1.89 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82931 Archived-At: --Apple-Mail=_4B05D415-8258-4ED9-9C54-437E3C2EE647 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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 = test_api.py" "cd = /home/roy/songza/code/radio/api/mobile/test; python test_api.py" ) )) On Nov 16, 2011, at 12:54 PM, Drew Adams wrote: >> (global-set-key "\C-cm" 'compile) >> (setq compile-command "cd=20 >> /home/roy/songza/code/radio/api/mobile/test; python test_api.py") >>=20 >> That works fine, but now I've got several different commands=20 >> that I run often. Is there some way to pre-load them into=20 >> the compile history, so I can just do c-c m, then up-arrow=20 >> though the history to pick the one I want? >=20 > 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. >=20 > (This is according to what I see in the code in `compile.el'. I don't = often use > `compile' myself.) >=20 --- Roy Smith roy@panix.com --Apple-Mail=_4B05D415-8258-4ED9-9C54-437E3C2EE647 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii 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 = test_api.py"
            =                   "cd = /home/roy/songza/code/radio/api/mobile/test; python = test_api.py"
            =                   = )
            =                 = ))


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 = test_api.py")

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

=


= --Apple-Mail=_4B05D415-8258-4ED9-9C54-437E3C2EE647--