Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ll-xn!cullvax!drw From: drw@cullvax.UUCP (Dale Worley) Newsgroups: comp.emacs Subject: Multiple shells Message-ID: <1183@cullvax.UUCP> Date: Wed, 20-May-87 12:05:36 EDT Article-I.D.: cullvax.1183 Posted: Wed May 20 12:05:36 1987 Date-Received: Sat, 23-May-87 06:48:57 EDT Organization: Cullinet Software, Westwood, MA, USA Lines: 31 To get another shell, use "M-X another-shell". It renames the old shell buffer to be "*Shell*" (for some suitable n), and starts a new shell. -------------------- ; function for making another shell (defun another-shell () (interactive) (save-excursion (let ((i 1) (buffer (get-buffer "*shell*")) name) (if (not buffer) (ding) (while (progn (setq name (concat "*Shell<" (int-to-string i) ">*")) (get-buffer name)) (setq i (1+ i))) (set-buffer buffer) (rename-buffer name) (message (concat "Old shell renamed " name))))) (shell)) -------------------- Dale -- Dale Worley Cullinet Software UUCP: ...!seismo!harvard!mit-eddie!cullvax!drw ARPA: cullvax!drw@eddie.mit.edu Un*x (a generic name for a class of OS's) != Unix (AT&T's brand of such)