From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Decebal Newsgroups: gmane.emacs.help Subject: Re: How to start shell and rename the buffer Date: Fri, 16 Jan 2009 02:58:00 -0800 (PST) Organization: http://groups.google.com Message-ID: <7f14294f-c833-4a5c-876b-87bedf472f98@g3g2000pre.googlegroups.com> References: <7cr634wpk4.fsf@pbourguignon.anevia.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1232106324 29459 80.91.229.12 (16 Jan 2009 11:45:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Jan 2009 11:45:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 16 12:46:36 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 1LNn9g-0003XI-FO for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Jan 2009 12:46:30 +0100 Original-Received: from localhost ([127.0.0.1]:35232 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNn8P-0007lu-7n for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Jan 2009 06:45:09 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!g3g2000pre.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 37 Original-NNTP-Posting-Host: 84.53.123.169 Original-X-Trace: posting.google.com 1232103480 6236 127.0.0.1 (16 Jan 2009 10:58:00 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 16 Jan 2009 10:58:00 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: g3g2000pre.googlegroups.com; posting-host=84.53.123.169; posting-account=K-cdeAoAAAD_0d505kUtHXJaT5LFIu-3 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; nl; rv:1.9.0.5) Gecko/2008120121 Firefox/3.0.5,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:166074 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:61400 Archived-At: On Jan 15, 4:34=A0pm, p...@informatimago.com (Pascal J. Bourguignon) wrote: > You're assuming that --eval will loop. =A0If that had been the case, it > would have been called --eval-loop. =A0Instead it is called --eval, and > therefore it only does that. > > When you want to group several expressionsions in a sequence, you must > use prog1, prog2 or in general, progn: > > =A0 =A0emacs =A0--eval '(progn (shell) (rename-buffer "shell"))' I allready did this. > But since =A0you don't pass -q, emacs will read your ~/.emacs, so you > can as well put there a function such as: > > (defun shell-and-rename (name) > =A0 =A0(interactive "sName: ") > =A0 =A0(shell) > =A0 =A0(rename-buffer name)) > > and then: > > =A0 =A0emacs --eval '(shell-and-rename "shell")' In principal a good idea, but it is done in a script. At the moment I am the only one using the script, but you never know, so I like to keep the dependicies as low as possible. I am also thinking about: emacs --eval '(shell)' --eval '(rename-buffer "shell")' or emacs --eval '(shell)'\ --eval '(rename-buffer "shell")' I think that is more clear.