From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tyler Newsgroups: gmane.emacs.help Subject: Re: How to start shell and rename the buffer Date: Thu, 15 Jan 2009 10:23:08 -0400 Message-ID: <87priolkc3.fsf@blackbart.sedgenet> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1232029512 17707 80.91.229.12 (15 Jan 2009 14:25:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2009 14:25:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 15 15:26:24 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LNTAs-0003Tx-Gp for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Jan 2009 15:26:22 +0100 Original-Received: from localhost ([127.0.0.1]:35041 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNT9b-00079O-6H for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Jan 2009 09:25:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNT82-0006Rk-O6 for help-gnu-emacs@gnu.org; Thu, 15 Jan 2009 09:23:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNT82-0006QX-0C for help-gnu-emacs@gnu.org; Thu, 15 Jan 2009 09:23:26 -0500 Original-Received: from [199.232.76.173] (port=49121 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNT81-0006QK-PW for help-gnu-emacs@gnu.org; Thu, 15 Jan 2009 09:23:25 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:35832 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LNT81-0004sL-DW for help-gnu-emacs@gnu.org; Thu, 15 Jan 2009 09:23:25 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LNT7z-0001Ta-AZ for help-gnu-emacs@gnu.org; Thu, 15 Jan 2009 14:23:23 +0000 Original-Received: from hlfxns0169w-142068216065.pppoe-dynamic.ns.aliant.net ([142.68.216.65]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Jan 2009 14:23:23 +0000 Original-Received: from tyler.smith by hlfxns0169w-142068216065.pppoe-dynamic.ns.aliant.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Jan 2009 14:23:23 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 31 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: hlfxns0169w-142068216065.pppoe-dynamic.ns.aliant.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:WTnrMCFp6NUCwtswAMRiVwJvsPs= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61352 Archived-At: Decebal writes: > I sometimes want to start emacs with a shell, but I also want to > rename the default name '*shell*'. > I have: > emacs -title ${TITLE} --eval '(shell) (rename-buffer "shell")' > > But the buffername is not renamed. > In *Messages* I see: > (emacs --eval (shell) (rename-buffer "shell")) > > And not an error or a warning. > If I do 'M-:' and then '(rename-buffer "shell")' the buffer is > renamed. > > What am I doing wrong? > This works for me: emacs -title mytitle --eval '(progn (shell) (rename-buffer "myshell"))' I guess the --eval flag runs only the first complete command, requiring the (progn ...) to do both. Just guessing, though. Tyler -- Tired of spyware? Try Firefox: www.firefox.com