unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Bingham, Jay" <Jay.Bingham@hp.com>
Subject: RE: changing default name of shell
Date: Tue, 15 Oct 2002 10:40:08 -0500	[thread overview]
Message-ID: <72A87F7160C0994D8C5A36E2FDC227F5035E7997@txnexc01.americas.cpqcorp.net> (raw)

Add this to your .emacs:
(add-hook 'shell-mode-hook (lambda () (rename-buffer "shell")))

If you want to have multiple shells each with a unique name generated without the asterisks you can do this:
(add-hook 'shell-mode-hook (lambda () (rename-buffer (generate-new-buffer-name "shell"))))

This will produce a buffer named shell on the first invocation and will produce buffers named shell<n>, where n is a unique number starting with 2 and incrementing by one, with each subsequent invocation of the shell.  If you don't like the <>'s you will have to get more creative inside the lambda expression to strip them out.


-_
J_)
C_)ingham
.    HP - NonStop Austin Software & Services - Software Product Assurance
.    Austin, TX
. Language is the apparel in which your thoughts parade in public.
. Never clothe them in vulgar and shoddy attire.          -Dr. George W. Crane-

 -----Original Message-----
From: 	Miles Bader [mailto:miles@lsi.nec.co.jp] 
Sent:	Tuesday, October 15, 2002 2:06 AM
To:	help-gnu-emacs@gnu.org
Subject:	Re: changing default name of shell

Chris <chrisl_ak@hotmail.com> writes:
> Is there a way I can automatically change the name of a shell buffer when I 
> open it? I would it to be called just "shell" or something without the * 
> surrounding the name so it is easier to complete with tab completion...

If you have a recent (21.x) version of emacs, give `M-x shell' command a
prefix argument, e.g., `C-u M-x shell', and it will prompt you for a
name.

Otherwise, you could always use `M-x rename-buffer' after you create
the shell.

-miles
-- 
P.S.  All information contained in the above letter is false,
      for reasons of military security.


_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

             reply	other threads:[~2002-10-15 15:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-15 15:40 Bingham, Jay [this message]
     [not found] <mailman.1034697434.15976.help-gnu-emacs@gnu.org>
2002-10-15 17:18 ` changing default name of shell Chris
  -- strict thread matches above, loose matches on Subject: below --
2002-10-15  5:47 Chris
2002-10-15  7:06 ` Miles Bader
2002-10-18 15:15 ` Jesper Harder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=72A87F7160C0994D8C5A36E2FDC227F5035E7997@txnexc01.americas.cpqcorp.net \
    --to=jay.bingham@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).