From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: how to specify the current directory when I start a shell in aquamacs Date: Tue, 7 Jul 2009 23:54:04 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1247114772 3811 80.91.229.12 (9 Jul 2009 04:46:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jul 2009 04:46:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 09 06:46:05 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 1MOlWF-0002uj-0X for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Jul 2009 06:46:03 +0200 Original-Received: from localhost ([127.0.0.1]:46743 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOlWE-0000P2-Ej for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Jul 2009 00:46:02 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!o9g2000prg.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Original-NNTP-Posting-Host: 76.102.12.87 Original-X-Trace: posting.google.com 1247036044 1739 127.0.0.1 (8 Jul 2009 06:54:04 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 8 Jul 2009 06:54:04 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o9g2000prg.googlegroups.com; posting-host=76.102.12.87; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.33 Safari/530.5, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:170629 X-Mailman-Approved-At: Thu, 09 Jul 2009 00:44:33 -0400 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:65881 Archived-At: emacs does not inherit the current dir from the shell you launch it. when you start a shell in emacs, the current path is the same as the current buffer's file if there's one. For example, when you are in emacs, if the current buffer is a file at ~/dir1/dir2, or the current buffer is dired at ~/dir/dir2, then when you do Alt+x shell, your shell starts in that dir. Xah =E2=88=91 http://xahlee.org/ =E2=98=84 On Jul 7, 5:18=C2=A0pm, n179911 wrote: > Hi, > > I start aquamacs in a directory, say '~/dir1/dir2' > and then in aquamacs, i do 'M-x shell' > > and it launches a shell, but why when I do 'pwd' in the shell, it goes > back to my HOME, i.e ~? > > Is there anyway to configure aquamacs to start a shell when I do M-x > shell to the directory of =C2=A0where I launched aquamacs? > > In my above example, it would be ~/dir1/dir2? > > Thank you.