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

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

Re: Multiple shell buffers with differing shells?


From: Kevin Rodgers
Subject: Re: Multiple shell buffers with differing shells?
Date: Wed, 13 Dec 2000 16:20:38 -0700 (MST)

Toby Speight writes:
>Rather than copying the code, you might be able to (let ) the
>appropriate variables in a wrapper:
>
>;; untested
>(defun bash ()
>  (interactive)
>  (let ((explicit-shell-file-name "bash")
>        (explicit-bash-args nil))
>    (shell)))

Indeed.  But I don't think it's right to clobber the explicit-bash-args
user option.

>This means that you don't need to keep checking whether the source you
>copied has changed each time you upgrade your emacs.

Exactly.

>Unfortunately, `shell' hard-codes the name "*shell*" for the process
>buffer, so you can't set that from outside :-(.  (If it matters enough
>to you, submit a bug report and patch.)  Alternatively, you could
>advice `shell' to rename-buffer "*shell*" to (format "*shell %s*"
>explicit-shell-file-name) afterwards.

Here's defshell.el, which does that explicitly in `M-x bash' (not by
advising `shell') and has a couple options to control whether the *bash*
shell is reused or a new *bash<2>* shell is generated.  I'll post this
to gnu.emac.sources and elisp-archive@cis.ohio-state.edu if I get any
positive feedback and improvements, especially from the Windows users
out there:

Attachment: defshell.el
Description: defshell.el 1.2

-- 
Kevin Rodgers <kevinr@ihs.com>          Lead Software Engineer
Information Handling Services           Electronic Systems Development
15 Inverness Way East, M/S A114         GO BUFFS!
Englewood CO 80112-5776 USA             1+ (303) 397-2807[voice]/705-4258[fax]

reply via email to

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