0

I use display-buffer C-x 4 C-o to set a buffer to the other window. This works great unless I want to put my eshell buffer in the other window. eshell puts itself in my current window every time.

If I prefix the command with C-u eshell switches properly. Is there a way I can make that the default?

Cristian
  • 42,563
  • 25
  • 88
  • 99
  • You can `defadvice` the `eshell` function. Or just wrap something around it that always uses a prefix. – pmr Aug 12 '11 at 02:09

2 Answers2

1

Just do this:

(eval-after-load "eshell"
  '(eshell-remove-from-window-buffer-names))
John Wiegley
  • 6,972
  • 1
  • 16
  • 20
0

As pmr said, defadvice seems like what you want. Just wrap the function and pass an argument to it every time. Here is the link to the gnu docs on defadvice.

http://www.gnu.org/s/emacs/manual/html_node/elisp/Simple-Advice.html#Simple-Advice

Justin Abrahms
  • 1,289
  • 1
  • 12
  • 21
  • I'm not sure how this would help. I'm not calling `eshell` at the time I want to put it into the other window. The eshell buffer has already been created; I just want it in the other window. – Cristian Aug 15 '11 at 16:03