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: 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


reply via email to

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