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:06:48 +0000 Message-ID: <929ccd881003020406n70c62188ha649954100b7eda2@mail.gmail.com> References: <929ccd881003020241g8fa36cdq6462baab058de215@mail.gmail.com> <929ccd881003020303w5b4635d8r6e452142e5076c35@mail.gmail.com> <929ccd881003020348x57b4c0ebhb396cabfb0f8678a@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016365eec823e24650480d03377 X-Trace: dough.gmane.org 1267531751 17132 80.91.229.12 (2 Mar 2010 12:09:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 2 Mar 2010 12:09:11 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Lennart Borgman Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 02 13:09:07 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 1NmQuQ-0000Ai-PP for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Mar 2010 13:09:07 +0100 Original-Received: from localhost ([127.0.0.1]:55332 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NmQuQ-00026f-4N for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Mar 2010 07:09:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NmQsG-0000ew-31 for help-gnu-emacs@gnu.org; Tue, 02 Mar 2010 07:06:52 -0500 Original-Received: from [140.186.70.92] (port=50806 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NmQsE-0000dS-JE for help-gnu-emacs@gnu.org; Tue, 02 Mar 2010 07:06:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NmQsD-0000ez-NU for help-gnu-emacs@gnu.org; Tue, 02 Mar 2010 07:06:50 -0500 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:47749) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NmQsD-0000eh-6X for help-gnu-emacs@gnu.org; Tue, 02 Mar 2010 07:06:49 -0500 Original-Received: by wyb29 with SMTP id 29so83902wyb.0 for ; Tue, 02 Mar 2010 04:06:48 -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:to:cc:content-type; bh=GWIlIO3FByvj6F/4enjdaFLNqzjM8+ego6Bk0UyQlsk=; b=wSp3ZcccE43zq5Zxoizgq9lBF5Q4QbJ7WAC5N6R4URpBNE7HSTSaqi4d1A2jDqFA6y v6Qj2xeyrkB2u7brsPd3+NNpdVLxa3Xew+wFnPrWFI+dgk+fyKyp9OfegPLpl8+jTw5D O+iyfNXFxjuQJf1CDPTlqK0Rjp9Tcch4rRi+Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=tBGfqt8Sf4pVdaXlKbDzbWmPiWFEhPpQGVIu5tT6VlBHL2P5eAScs57/NbfRx92Fv5 lDqIHwDaWef2kKcVnyOhwX5osdUVDOynMY9bYq7HcLZNpgTaRz9kPzXzd0Mzg1IL2Xwg mESwQIlPfhohr/HSgDkv+zwvlkjr964m9wT/k= Original-Received: by 10.216.176.143 with SMTP id b15mr3832647wem.155.1267531608105; Tue, 02 Mar 2010 04:06:48 -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:72301 Archived-At: --0016365eec823e24650480d03377 Content-Type: text/plain; charset=ISO-8859-1 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 wrote: > On Tue, Mar 2, 2010 at 12:48 PM, Johan Andersson > 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. > --0016365eec823e24650480d03377 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I don't see why I would want to do that. I want the=A0inferior emacs pr= ocess to read from the=A0original emacs process. Or pass the variables from= the=A0original emacs process to the=A0inferior emacs process.=A0But why th= e other way around?

On Tue, Mar 2, 2010 at 11:50 AM, Lennart Bor= gman <len= nart.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 th= is?
> =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 reach var=A0i= n=A0test.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.

--0016365eec823e24650480d03377--