From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: elisp to run a new shell and insert commands? Date: Mon, 5 Mar 2007 17:35:51 +0100 Message-ID: <082E7DD5-7FA5-4D84-9FAB-477FAE8C0983@Web.DE> References: <1173106921.839598.257250@v33g2000cwv.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1173112733 7600 80.91.229.12 (5 Mar 2007 16:38:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Mar 2007 16:38:53 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: gredner@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 05 17:38:46 2007 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 1HOGCw-00064G-DM for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Mar 2007 17:38:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOGCv-0001l5-Ro for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Mar 2007 11:38:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HOGCh-0001jA-SE for help-gnu-emacs@gnu.org; Mon, 05 Mar 2007 11:38:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HOGCg-0001hH-FQ for help-gnu-emacs@gnu.org; Mon, 05 Mar 2007 11:38:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOGCg-0001gr-5Z for help-gnu-emacs@gnu.org; Mon, 05 Mar 2007 11:38:26 -0500 Original-Received: from fmmailgate03.web.de ([217.72.192.234]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HOGCf-00008S-KY for help-gnu-emacs@gnu.org; Mon, 05 Mar 2007 11:38:25 -0500 Original-Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate03.web.de (Postfix) with ESMTP id 4D63D65DFA4E; Mon, 5 Mar 2007 17:35:54 +0100 (CET) Original-Received: from [62.134.212.181] (helo=[192.168.1.2]) by smtp06.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.107 #114) id 1HOGAD-0002ft-00; Mon, 05 Mar 2007 17:35:54 +0100 In-Reply-To: <1173106921.839598.257250@v33g2000cwv.googlegroups.com> X-Mailer: Apple Mail (2.752.2) X-Sender: Peter_Dyballa@web.de X-detected-kernel: Linux 2.4-2.6 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:41686 Archived-At: Am 05.03.2007 um 16:02 schrieb gredner@gmail.com: > As part of the setup, I would like the > script to run a new shell (i.e. via M-x shell), and then insert a > command into the shell to setup some variables. I feel like this > should be possible, but the documentation I have read does not mention > any such functionality. Does it exist? Yes, there is a way to achieve such things: ~/.emacs_. I have a similiar setup and included in ~/.emacs_tcsh, because tcsh =20 is my login shell: echo "Hall=F6chen!" sleep 1 if (-e ~/.emacs_tcsh-init) source ~/.emacs_tcsh-init && rm =20 ~/.emacs_tcsh-init As you can imagine any (t)csh statement can be used. The same is true =20= for sh, bash, ksh, ash ... The contents of ~/.emacs_tcsh-init is =20 generated from Elisp. Because this is documented: is it this that you are searching for? -- Greetings Pete It's not the valleys in life I dread so much as the dips. -- Garfield