From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Davin Pearson Newsgroups: gmane.emacs.help Subject: Re: How to make to go to the base directory of project before calling the compile command.? Date: Mon, 15 Jun 2009 20:13:50 -0700 (PDT) Organization: http://groups.google.com Message-ID: <050803c7-c2a1-4057-a565-d0a3bccd64ae@p6g2000pre.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1245123645 16272 80.91.229.12 (16 Jun 2009 03:40:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Jun 2009 03:40:45 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 16 05:40:43 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MGPXP-0007bo-BE for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Jun 2009 05:40:43 +0200 Original-Received: from localhost ([127.0.0.1]:50603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGPXO-00031e-O1 for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jun 2009 23:40:42 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!p6g2000pre.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-NNTP-Posting-Host: 60.234.132.53 Original-X-Trace: posting.google.com 1245122030 13438 127.0.0.1 (16 Jun 2009 03:13:50 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 16 Jun 2009 03:13:50 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p6g2000pre.googlegroups.com; posting-host=60.234.132.53; posting-account=SVVH0AoAAABplEQzMkIR3gU7a0gK8IuF User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:170081 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:65307 Archived-At: On Jun 16, 2:29=A0pm, Davin Pearson wrote: > On Jun 3, 10:10=A0pm, Anand Dhanakshirur wrote: > > > Hi, > > I am using ede and cedet tools. > > I have created the project by writing the required things in .emacs fil= e. > > What i want is, > > =A0whenever i want to compile( key is bound to compile command) > > it should go to the base directory on its own and prompt with a compile > > command, > > I don't want to go to the base directory of the project by command M-x = cd > > every time i want to compile. > > How to do that? > > Is there an lisp code for that? > > Anand > > > =A0asd.vcf > > < 1KViewDownload > > Try this code: > > (global-set-key [f6] 'f6) > > (defun f6 () > =A0 (interactive) > =A0 (cd "") > =A0 (execute-kbd-macro "\M-xcompile\n") > =A0 ) Try this: (global-set-key [f6] 'f6) (defun f6 () (interactive) (dired "") (execute-kbd-macro "\M-xcompile\n") ) where is replaced by the name of your base dir.