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

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

shell-current-directory - other window command needed


From: The Quiet Center
Subject: shell-current-directory - other window command needed
Date: Wed, 28 Oct 2009 08:34:46 -0700 (PDT)
User-agent: G2/1.0

Hello,

shell-current-directory is an emacs package which allows one to create
a shell whose starting directory is the same as the buffer the command
'shell-current-directory' was invoked in.

The code for the command is here:
http://github.com/metaperl/emacs/blob/master/shell-current-directory.el#L92

What I would like to have is a command 'shell-current-directory-other-
window' which does the same thing, but opens the shell in the other-
window --- the window you would be in if you typed C-x o in the
current window.

I suppose one way to do it is to:
1 - save the current buffer (name?) as orig-buffer
2 - invoke shell-current-directory
3 - save the shell-buffer (name?) as new-shell-buffer
4 - switch-to-buffer orig-buffer
5 - other-window
6 - switch-to-buffer new-shell-buffer

But I am not quite adept enough at elisp to do this :)


reply via email to

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