From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Bingham, Jay" Newsgroups: gmane.emacs.help Subject: RE: changing default name of shell Date: Tue, 15 Oct 2002 10:40:08 -0500 Sender: help-gnu-emacs-admin@gnu.org Message-ID: <72A87F7160C0994D8C5A36E2FDC227F5035E7997@txnexc01.americas.cpqcorp.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1034697450 25047 80.91.224.249 (15 Oct 2002 15:57:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 15 Oct 2002 15:57:30 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 181U4P-0006Tm-00 for ; Tue, 15 Oct 2002 17:57:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 181U4J-00049k-00; Tue, 15 Oct 2002 11:57:15 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 181U3L-0003mD-00 for help-gnu-emacs@gnu.org; Tue, 15 Oct 2002 11:56:15 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 181U3J-0003lt-00 for help-gnu-emacs@gnu.org; Tue, 15 Oct 2002 11:56:14 -0400 Original-Received: from zcamail04.zca.compaq.com ([161.114.32.104]) by monty-python.gnu.org with esmtp (Exim 4.10) id 181U3I-0003lO-00 for help-gnu-emacs@gnu.org; Tue, 15 Oct 2002 11:56:12 -0400 Original-Received: from cacexg11.americas.cpqcorp.net (cacexg11.americas.cpqcorp.net [16.105.250.94]) by zcamail04.zca.compaq.com (Postfix) with ESMTP id 1E31011B0 for ; Tue, 15 Oct 2002 08:56:12 -0700 (PDT) Original-Received: from txnexc01.americas.cpqcorp.net ([16.74.7.244]) by cacexg11.americas.cpqcorp.net with Microsoft SMTPSVC(5.0.2195.2966); Tue, 15 Oct 2002 08:42:42 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: changing default name of shell Thread-Index: AcJ0Grdbjrs87IWaQDGUZSCiwc6+lQAQmGSQ Original-To: X-OriginalArrivalTime: 15 Oct 2002 15:42:42.0031 (UTC) FILETIME=[7F8BBFF0:01C27461] Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2635 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2635 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, 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]=20 Sent: Tuesday, October 15, 2002 2:06 AM To: help-gnu-emacs@gnu.org Subject: Re: changing default name of shell Chris writes: > Is there a way I can automatically change the name of a shell buffer = when I=20 > open it? I would it to be called just "shell" or something without the = *=20 > 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 --=20 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