|
From: | Kevin Rodgers |
Subject: | Re: How to start shell and rename the buffer |
Date: | Thu, 15 Jan 2009 21:52:48 -0700 |
User-agent: | Thunderbird 2.0.0.19 (Macintosh/20081209) |
Decebal wrote:
On 15 jan, 13:43, Decebal <CLDWester...@gmail.com> wrote:I sometimes want to start emacs with a shell, but I also want to rename the default name '*shell*'. I have: emacs -title ${TITLE} --eval '(shell) (rename-buffer "shell")' But the buffername is not renamed. In *Messages* I see: (emacs --eval (shell) (rename-buffer "shell")) And not an error or a warning. If I do 'M-:' and then '(rename-buffer "shell")' the buffer is renamed. What am I doing wrong?I found a way: emacs -title ${TITLE} --eval '(shell "shell")' The only problem with this is that both the '*scratch*' and the 'shell' buffer are displayed. Not a big problem, but is it possible to have only the 'shell' buffer displayed?
Because shell calls pop-to-buffer, whose doc string says: Select buffer buffer in some window, preferably a different one. ... If `pop-up-windows' is non-nil, windows can be split to do this. Try: emacs -title ${TITLE} --eval '(let ((pop-up-windows nil)) (shell "shell"))'
I found a way around my problem, but I am still interested why the first way does not work. ;-}
The --eval command line option calls the eval function, which takes exactly 1 argument (a lisp form). -- Kevin Rodgers Denver, Colorado, USA
[Prev in Thread] | Current Thread | [Next in Thread] |