* how to specify the current directory when I start a shell in aquamacs
@ 2009-07-08 0:18 n179911
0 siblings, 0 replies; 3+ messages in thread
From: n179911 @ 2009-07-08 0:18 UTC (permalink / raw)
To: help-gnu-emacs
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 where I launched aquamacs?
In my above example, it would be ~/dir1/dir2?
Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: how to specify the current directory when I start a shell in aquamacs
[not found] <mailman.2038.1247026973.2239.help-gnu-emacs@gnu.org>
@ 2009-07-08 6:54 ` Xah Lee
2009-07-08 7:00 ` Pascal J. Bourguignon
1 sibling, 0 replies; 3+ messages in thread
From: Xah Lee @ 2009-07-08 6:54 UTC (permalink / raw)
To: help-gnu-emacs
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
∑ http://xahlee.org/
☄
On Jul 7, 5:18 pm, n179911 <n179...@gmail.com> 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 where I launched aquamacs?
>
> In my above example, it would be ~/dir1/dir2?
>
> Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: how to specify the current directory when I start a shell in aquamacs
[not found] <mailman.2038.1247026973.2239.help-gnu-emacs@gnu.org>
2009-07-08 6:54 ` how to specify the current directory when I start a shell in aquamacs Xah Lee
@ 2009-07-08 7:00 ` Pascal J. Bourguignon
1 sibling, 0 replies; 3+ messages in thread
From: Pascal J. Bourguignon @ 2009-07-08 7:00 UTC (permalink / raw)
To: help-gnu-emacs
n179911 <n179911@gmail.com> writes:
> 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 where I launched aquamacs?
>
> In my above example, it would be ~/dir1/dir2?
C-x C-f ~/dir1/dir2 RET
M-x shell RET
C-x b *scratch* RET
M-x set-default-directory RET ~/dir/dir2
M-x shell RET
--
__Pascal Bourguignon__
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-08 7:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.2038.1247026973.2239.help-gnu-emacs@gnu.org>
2009-07-08 6:54 ` how to specify the current directory when I start a shell in aquamacs Xah Lee
2009-07-08 7:00 ` Pascal J. Bourguignon
2009-07-08 0:18 n179911
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).