help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shell mode, changing directory


From: Kevin Rodgers
Subject: Re: shell mode, changing directory
Date: Fri, 21 Mar 2003 14:15:30 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Phillip Lord wrote:

"Kevin" == Kevin Rodgers <kevin.rodgers@ihs.com> writes:


  Kevin> Phillip Lord wrote:

  >> Can anyone tell me how to force a *shell* buffer to change it's
  >> current working directory? Effectively I want to fake typing "cd
  >> blah", but I can't see a good way to do this.

  Kevin> M-x cd RET blah RET


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.

Sorry, that's just what you asked for.


> Both need to happen.

Then do what comint-send-input (which is what RET is bound to in the *shell*
buffer) does:

(funcall comint-input-sender
         (get-buffer-process (current-buffer))
         (format "cd %s" DIRECTORY))

--
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;";>Kevin Rodgers</a>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]