views:

166

answers:

3

Think: tiling my emacs window with eshells, a la xmonad. Is this possible? I can M-x eshell to open the first eshell instance but future invocations just focus the first instance.

+4  A: 

The docstring for eshell states that "A nonnumeric prefix arg means to create a new session." I typed M-- M-x eshell over and over, and each time it opened a new eshell buffer.

Sean
C-u M-x eshell works too.
ataylor
Damn. Your comment hadn't been written when I started my answer :)
Chris R
+3  A: 

You can do this:

`C-u M-x eshell`

This will create *eshell*, *eshell*<2>, and so on.

Chris R
+1  A: 

My preferred approach is to create named shells:

(defun make-shell (name)
  "Create a shell buffer named NAME."
  (interactive "sName: ")
  (setq name (concat "$" name))
  (eshell)
  (rename-buffer name))

is the gist. Then M-x make-shell name will create the desired shell.

pajato0