all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Phillip Lord <p.lord@russet.org.uk>
Subject: Re: shell mode, changing directory
Date: 24 Mar 2003 12:40:34 +0000	[thread overview]
Message-ID: <vfznnlym2l.fsf@rpc71.cs.man.ac.uk> (raw)
In-Reply-To: 3E7B80F2.8000400@ihs.com


>>>>> "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	other threads:[~2003-03-24 12:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-19 16:22 shell mode, changing directory Phillip Lord
2003-03-21 16:18 ` Kevin Rodgers
2003-03-21 17:56   ` Phillip Lord
2003-03-21 18:11     ` Barry Margolin
2003-03-21 21:15     ` Kevin Rodgers
2003-03-24 12:40       ` Phillip Lord [this message]
2003-03-21 18:23 ` Alan Shutko
  -- strict thread matches above, loose matches on Subject: below --
2003-03-21 18:40 Bingham, Jay
     [not found] <mailman.3489.1048272184.21513.help-gnu-emacs@gnu.org>
2003-03-21 19:53 ` Alan Shutko
2003-03-22  9:42 ` Piet van Oostrum
2003-03-24 16:21   ` Phillip Lord

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vfznnlym2l.fsf@rpc71.cs.man.ac.uk \
    --to=p.lord@russet.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.