From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Burton Samograd Newsgroups: gmane.emacs.help Subject: Re: compile perl file, specify current buffer, using help effectively Date: Tue, 02 May 2006 23:26:17 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <87zmhz65mu.fsf@gmail.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1146634837 2277 80.91.229.2 (3 May 2006 05:40:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 May 2006 05:40:37 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 03 07:40:35 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FbA6D-00031k-N9 for geh-help-gnu-emacs@m.gmane.org; Wed, 03 May 2006 07:40:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbA6D-00009t-8G for geh-help-gnu-emacs@m.gmane.org; Wed, 03 May 2006 01:40:33 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!news2.euro.net!213.132.189.2.MISMATCH!multikabel.net!feed20.multikabel.net!border1.nntp.ams.giganews.com!nntp.giganews.com!sn-ams-06!sn-xt-ams-03!sn-ams!sn-feed-ams-01!sn-post-ams-02!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.51 (gnu/linux) Cancel-Lock: sha1:farCNXpVOBZEAK12kkRAQ+CTT10= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 39 Original-Xref: shelby.stanford.edu gnu.emacs.help:139137 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:34760 Archived-At: "David Schneider" writes: > I am trying to use emacs as an IDE for perl development. I think it > would be useful to have a compile command that runs perl on the > current buffer I am editing. The compile command defaults to make -k. > I want to change it to perl xx where xx is the name of the current > buffer - is there some variable or special syntax I can use to get the > current filename? In your ~/.emacs you can put: (setq compile-command "perl xx") or you can just change the command name when it asks and then it will use whatever you set it to for subsiquent compiles. A handy binding in your .emacs is: (global-set-key "\C-cc" 'compile) Which calls compile when you hit Control c and then c. > More important then the answer, is how do I figure > this out from the help. I have been using C-h a to try to search the > help. This gives me lists of commands or variables which may be > related - but I frequently find my questions are still unanswered. That is just something that takes time to learn. Emacs is big and takes a *long* time to master. Asking questions (like you are doing) is one of the best ways to get quick answers. You can then learn more by taking the answer and exploring emacs more. Try looking at the compile-command variable documentation using C-h v (describe-variable). Another useful one is C-h f (describe-function), which you can use to describe the compile function (where you can find out about the compile-command variable, 5th paragraph). -- burton samograd kruhft .at. gmail kruhft.blogspot.com www.myspace.com/kruhft metashell.blogspot.com