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

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

Re: Create shell from ido


From: José A . Romero L .
Subject: Re: Create shell from ido
Date: Thu, 28 Jan 2010 01:25:42 -0800 (PST)
User-agent: G2/1.0

On 28 Sty, 02:54, Nathaniel Flath <flat0...@gmail.com> wrote:
> Hello,
> I have ido activated.  If I do C-x C-f and navigate to a directory, C-d will
> open a dired buffer in that directory.  Is there a way to open a shell
> buffer instead?
>
> Thanks,
> Nathaniel Flath

Depends on the shell you want to use. For regular shell you could use
something like this:

(defun nf/openshell (&optional dir)
  (interactive "DDirectory to open shell into: ")
  (shell)
  (if dir
      (comint-send-string
       (current-buffer)
       (concat "cd " (shell-quote-wildcard-pattern dir) "

"))))

in any case, it doesn't seem  to be possible to open a shell directly
in any  arbitrary directory other than  default-directory. You always
have to send a "cd something" to move to where you want to be (though
I'd be glad to find out I'm wrong). In any case, that's the same I do
in  SrC (http://www.emacswiki.org/emacs/Sunrise_Commander)  and works
quite well for me.

Cheers,
--
José A. Romero L.
escherdragon at gmail.com
"We who cut mere stones must always be envisioning cathedrals."
(Quarry worker's creed)


reply via email to

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