From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: C K Kashyap Newsgroups: gmane.emacs.help Subject: Re: Executing init script after launching eshell Date: Tue, 27 Mar 2012 15:56:37 +0530 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8f838aa9034e5704bc36ed42 X-Trace: dough.gmane.org 1332844033 4840 80.91.229.3 (27 Mar 2012 10:27:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 27 Mar 2012 10:27:13 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Tom Willemsen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 27 12:27:10 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SCTcH-0005Ls-7Y for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Mar 2012 12:27:05 +0200 Original-Received: from localhost ([::1]:43934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCTcG-0001rU-8g for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Mar 2012 06:27:04 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCTbw-0001Hu-KB for help-gnu-emacs@gnu.org; Tue, 27 Mar 2012 06:26:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCTbr-0007fA-PT for help-gnu-emacs@gnu.org; Tue, 27 Mar 2012 06:26:44 -0400 Original-Received: from mail-gx0-f169.google.com ([209.85.161.169]:58637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCTbr-0007eh-Ie for help-gnu-emacs@gnu.org; Tue, 27 Mar 2012 06:26:39 -0400 Original-Received: by ggeq1 with SMTP id q1so5275108gge.0 for ; Tue, 27 Mar 2012 03:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=BjHCrrAgD+AMvR+/uZmnZWKKAU+ZTclcEh3Yuz8RrUw=; b=JLMChWBjokM5eChrEKML7aYHKKctJrX1K3SfPLeFMz8EG42RLDZf+AINXy/Au0yVtj Vj3BDJotDm7oTwOblatOYyueqitN1G9Ie5C7n6uBs5AGSgwq4I0ECPOhNqOpl1bsFh6S S2tDNQFFJnzbjz5ReQfe94d6qUtkE2dN4BhJIWcHNJHZDDAb/XNyRrwWk7qotFV9FmVJ zz0wWoekx8wFpkTb7ks+GDF/vA5UnR3mhOwAyib3LUuJ8z9b0t2l3NHY1a5bz9KZMWvX pRgnqp9hlVCc5fPAbJzM+cGZmVTvqfVA/oQLb04YM6OkCTcP3wjDJpNmobKgKkBVYxEh xSQg== Original-Received: by 10.50.173.3 with SMTP id bg3mr8017102igc.52.1332843997515; Tue, 27 Mar 2012 03:26:37 -0700 (PDT) Original-Received: by 10.42.147.4 with HTTP; Tue, 27 Mar 2012 03:26:37 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.161.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:84111 Archived-At: --e89a8f838aa9034e5704bc36ed42 Content-Type: text/plain; charset=ISO-8859-1 Thanks Tom Maybe the following could work, it seems to do what you want when I try > it here. > > (progn > (let ((default-directory "path1")) > (eshell t) > (rename-buffer "b1")) > (let ((default-directory "path2")) > (eshell t) > (rename-buffer "b2"))) > > This is a working solution for me. > (progn > (eshell t) > (eshell/cd "path1") > (eshell-send-input) > (eshell t) > (eshell/cd "path2") > (eshell-send-input)) > > The above snippet does not seem to work for me. Could you please explain the below lines ? (eshell t) -> This opens up a new eshell (eshell/cd "path1") - ????? (eshell-send-input) - I am guessing the command in the previous step gets passed on using this command. > Hope it helps in some small way. > Absolutely helps!!! Regards, Kashyap --e89a8f838aa9034e5704bc36ed42 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Tom

Maybe the followi= ng could work, it seems to do what you want when I try
it here.

(progn
=A0(let ((default-directory "path1"))
=A0 =A0(eshell t)
=A0 =A0(rename-buffer "b1"))
=A0(let ((default-directory "path2"))
=A0 =A0(eshell t)
=A0 =A0(rename-buffer "b2")))


This is a working solution for me.
= =A0
(progn
=A0(eshell t)
=A0(eshell/cd "path1")
=A0(eshell-send-input)
=A0(eshell t)
=A0(eshell/cd "path2")
=A0(eshell-send-input))


The above snippet does no= t seem to work for me. Could you please explain the below lines ?

= =A0(eshell t) -> This opens up a new eshell
=A0(eshell/cd "path1") - ?????
=A0(eshell-send-input) - I am guessing the command in the previous step ge= ts passed on using this command.
=A0
Hope it helps in some small way.

Absolutely helps!!!

Regards,
Kashyap
--e89a8f838aa9034e5704bc36ed42--