From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Johan Andersson Newsgroups: gmane.emacs.help Subject: Re: Reset Emacs state Date: Tue, 2 Mar 2010 12:48:08 +0000 Message-ID: <929ccd881003020448g118037d1m16e6f82443bc2288@mail.gmail.com> References: <929ccd881003020241g8fa36cdq6462baab058de215@mail.gmail.com> <929ccd881003020303w5b4635d8r6e452142e5076c35@mail.gmail.com> <929ccd881003020348x57b4c0ebhb396cabfb0f8678a@mail.gmail.com> <929ccd881003020406n70c62188ha649954100b7eda2@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6d7eb6810a7600480d0c742 X-Trace: dough.gmane.org 1267534130 25345 80.91.229.12 (2 Mar 2010 12:48:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 2 Mar 2010 12:48:50 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 02 13:48:46 2010 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.69) (envelope-from ) id 1NmRWl-0004uI-B0 for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Mar 2010 13:48:43 +0100 Original-Received: from localhost ([127.0.0.1]:60471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NmRWj-0001sc-PZ for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Mar 2010 07:48:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NmRWI-0001ro-OK for help-gnu-emacs@gnu.org; Tue, 02 Mar 2010 07:48:14 -0500 Original-Received: from [140.186.70.92] (port=37477 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NmRWE-0001r1-2f for help-gnu-emacs@gnu.org; Tue, 02 Mar 2010 07:48:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NmRWD-0004fh-FW for help-gnu-emacs@gnu.org; Tue, 02 Mar 2010 07:48:09 -0500 Original-Received: from mail-ww0-f41.google.com ([74.125.82.41]:59991) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NmRWD-0004fZ-7n for help-gnu-emacs@gnu.org; Tue, 02 Mar 2010 07:48:09 -0500 Original-Received: by wwb22 with SMTP id 22so103318wwb.0 for ; Tue, 02 Mar 2010 04:48:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:cc:content-type; bh=rv6jHVtBG2vwLr3sWJxQ+N0ULRDgJevewG/Y3wuFfVU=; b=Fn/bqegv3N7N8/1wQHQBQ7XgLoVgaTQK/r5sXOit0lCgaxMB3Pf5n9O9p9CyMYBLUA 1Hd+xC6cBIOG/KcCuZGw7ZFXOm864/a7r/52fIs5UJVTXFg5Veafs0mjNaTx2BTRp44S FjeCJNZXaWIDG8hE3dSG8Jg4oplB4N7cDnTJM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; b=E7U29U3Rb0a3wmfEsNnQn5+RQA+JZvHPnxc2bSI1OCtNpEXIqp8h2sF9f/UbeQHLGz YVSgfvv373RKROyT7W8B+h+mRkiQJjaiwL7k98vRGh79NWVpvna0MBQ81aOgYElYQIZf 0jHV/plAJNjwKzncBJ8l9mtJUgZfbgHZhWwiY= Original-Received: by 10.216.86.14 with SMTP id v14mr3684391wee.183.1267534088152; Tue, 02 Mar 2010 04:48:08 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:72303 Archived-At: --0016e6d7eb6810a7600480d0c742 Content-Type: text/plain; charset=ISO-8859-1 The result from the sub process is actually not as important as passing arguments. For now I can live with the exit value. But I still have no idea of how to pass values to the sub process. I could use some more hints here... On Tue, Mar 2, 2010 at 12:21 PM, Lennart Borgman wrote: > I don't understand. Of course you want to pass the variables and > values needed for testing to the inferior process. And I guess you > want to read the result... ;-) > > I think we somehow misunderstand each other and I am quite sure you > will get this right. > > > On Tue, Mar 2, 2010 at 1:06 PM, Johan Andersson > wrote: > > I don't see why I would want to do that. I want the inferior emacs > process > > to read from the original emacs process. Or pass the variables from > > the original emacs process to the inferior emacs process. But why the > other > > way around? > > > > On Tue, Mar 2, 2010 at 11:50 AM, Lennart Borgman < > lennart.borgman@gmail.com> > > wrote: > >> > >> On Tue, Mar 2, 2010 at 12:48 PM, Johan Andersson < > johan.rejeep@gmail.com> > >> wrote: > >> > I'm not sure how that would help me? Do you mean something like this? > >> > (let ((var "some variable")) > >> > (call-process "emacs" nil "*scratch*" t "-Q" "--batch" "-l" > >> > "~/test.el")) > >> > Using call-process would reset the state, but how do I reach > >> > var in test.el? > >> > I thought that was what you meant with dynamic scoping? > >> > >> > >> Using dynamic scoping and call-process are too different ways. When > >> using call-process you have to write some output in the inferior emacs > >> process and investigate that in the original emacs process. > > > > > --0016e6d7eb6810a7600480d0c742 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable The result from the sub proces= s is actually not as important as passing arguments. For now I can live wit= h the exit value. But I still have no idea of how to pass values to the sub= process. I could use some more hints here...

On Tue, Mar 2, 2010 at 12:21 PM, Lennart Bor= gman <len= nart.borgman@gmail.com> wrote:
I don't understand. Of course you want to pass the variables and
values needed for testing to the inferior process. And I guess you
want to read the result... ;-)

I think we somehow misunderstand each other and I am quite sure you
will get this right.


On Tue, Mar 2, 2010 at 1:06 PM, Johan Andersson <johan.rejeep@gmail.com> wrote:
> I don't see why I would want to do that. I want the=A0inferior ema= cs process
> to read from the=A0original emacs process. Or pass the variables from<= br> > the=A0original emacs process to the=A0inferior emacs process.=A0But wh= y the other
> way around?
>
> On Tue, Mar 2, 2010 at 11:50 AM, Lennart Borgman <lennart.borgman@gmail.com>
> wrote:
>>
>> On Tue, Mar 2, 2010 at 12:48 PM, Johan Andersson <johan.rejeep@gmail.com>
>> wrote:
>> > I'm not sure how that would help me? Do you mean somethin= g like this?
>> > =A0=A0(let ((var "some variable"))
>> > =A0=A0 =A0(call-process "emacs" nil "*scratch*= " t "-Q" "--batch" "-l"
>> > "~/test.el"))
>> > Using call-process=A0would reset the state, but how do I reac= h
>> > var=A0in=A0test.el?
>> > I thought that was what you meant with dynamic scoping?
>>
>>
>> Using dynamic scoping and call-process are too different ways. Whe= n
>> using call-process you have to write some output in the inferior e= macs
>> process and investigate that in the original emacs process.
>
>

--0016e6d7eb6810a7600480d0c742--