[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shell mode, changing directory
From: |
Phillip Lord |
Subject: |
Re: shell mode, changing directory |
Date: |
24 Mar 2003 12:40:34 +0000 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93 |
>>>>> "Kevin" == Kevin Rodgers <kevin.rodgers@ihs.com> writes:
>> This appears to change the default directory of the buffer, not
>> the
>> current working directory of the shell, which is not really what
>> I want.
Kevin> Sorry, that's just what you asked for.
I was a little unclear about what I wanted, I agree.
>> Both need to happen.
Kevin> Then do what comint-send-input (which is what RET is bound to
Kevin> in the *shell* buffer) does:
Kevin> (funcall comint-input-sender
Kevin> (get-buffer-process (current-buffer)) (format "cd %s"
Kevin> DIRECTORY))
Okay, yes, this works.....
(process-send-string
(get-buffer-process
(current-buffer)) "cd ~\n")
(cd "~")
(insert-string "cd ~\n" ))
which changes the current working directory of the shell, the buffer,
and tells the user what has happened.
Cheers
Phil
- RE: shell mode, changing directory, Bingham, Jay, 2003/03/21
- Re: shell mode, changing directory, Alan Shutko, 2003/03/21
- Re: shell mode, changing directory, Piet van Oostrum, 2003/03/22