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: Nathaniel Flath
Subject: Re: Create shell from ido
Date: Fri, 29 Jan 2010 01:14:05 -0500

That doesn't work, unfortunately - I tried it., as well as emulating the other dired stuff.  I'm not sure why that doesn't work, but I managed to write a function that does:

(defun ido-shell ()
  (interactive)
  (let ((dirname (expand-file-name (ido-read-directory-name "Shell in directory: "))))
    (shell dirname)
    (comint-send-string (current-buffer) (concat "cd " dirname "\n"))))

Thanks,
Nathaniel Flath

On Fri, Jan 29, 2010 at 12:00 AM, Kevin Rodgers <kevin.d.rodgers@gmail.com> wrote:
Nathaniel Flath 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?

I don't use ido, so I don't even know how to test this.  But here's what I came
up with from looking at ido.el.  I didn't understand how to properly implement
ido-magic-control-s, so you have to type `C-x C-f C-x C-s' (by analogy with
`C-x C-f C-x C-d', which runs ido-enter-dired):

(defun ido-enter-shell ()
 "Drop into `shell' from file switching."
 (interactive)
 (setq ido-exit 'shell)
 (exit-minibuffer))

(define-key ido-file-dir-completion-map "\C-x\C-s" 'ido-enter-shell)

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

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