GNU bug report logs - #39596
26.3; Export INSIDE_EMACS with Eshell

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Pierre Neidhardt <mail@HIDDEN>; Keywords: patch; merged with #25496; dated Fri, 14 Feb 2020 07:18:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Forcibly Merged 25496 39596. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) patch. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 39596 <at> debbugs.gnu.org:


Received: (at 39596) by debbugs.gnu.org; 19 Feb 2020 21:16:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 19 16:16:15 2020
Received: from localhost ([127.0.0.1]:43452 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1j4Wha-0004H9-V2
	for submit <at> debbugs.gnu.org; Wed, 19 Feb 2020 16:16:15 -0500
Received: from mail-wm1-f47.google.com ([209.85.128.47]:37785)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <federicotedin@HIDDEN>) id 1j4WhZ-0004Gv-5x
 for 39596 <at> debbugs.gnu.org; Wed, 19 Feb 2020 16:16:13 -0500
Received: by mail-wm1-f47.google.com with SMTP id a6so2237354wme.2
 for <39596 <at> debbugs.gnu.org>; Wed, 19 Feb 2020 13:16:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=MokwXsZYdY3a6GPSfTLHagkV86Cio2nEefBD/ibBJ/g=;
 b=lb57pdX2oRougQb7NZHtTaykEqQqAa4ONkQOfJuwJOnWzMiJJHOHIL5bn4LyH5Xgas
 ont0a4UIOzCwMKnWnUH1JjRKRgXYtfYnDopQJl23lHjNGsa9YcwMmko77X5bAaB//aW/
 k5eD0xwqEQMb3SLs+39Jy8nCGM+TUpwtyuK/zoQqygRPVAto7YDaWafp5aHEceDPl2tf
 uZA8775PRtmEg2RqitY1XXVM+T1eBCx4nbdv/QKQYsrDO0xJ0hjyV9wbhQPxw7ye2nCN
 u615peg6UCAMC0AJdtEpfc9lxN+4d4jBoYY8KLbZMyTS5Z54NbFKBpatVNJtGnMDk3vP
 FagQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=MokwXsZYdY3a6GPSfTLHagkV86Cio2nEefBD/ibBJ/g=;
 b=k5fFqpF5FxrtS9G1gzGzKctHb66mc0J12zci/7iysizwrHtbCPFjrCEMy0/Fvdz0He
 Ge0fis22qmGIUXId/E9J6gvHnr5bvY97qqfXZs00AKxxsrj0/3DOwc9Mqv9Zpz263zM0
 P6EiZN/Kjh3KuNLUv83NKRaW2tmrseHITxxfO8kesiVmTjVZZrqCA21kOaL3lgICRoyE
 K+VAlzX53tYvSMUQ/vq6vvKj8gMfWaPLeat+vJegFPWaqgUua/bVwGFMV7bu9v5uYLBn
 mwCawKck9PLd2nQPYam2BJxHMS7e6asK7idyRknHtT3UdbkGmH7dnLOdCA1xG64VQ0vQ
 m7Bw==
X-Gm-Message-State: APjAAAVjuxRm8pOx85nu2Kw9TcVeBy6X4nMgHu8MD1LCsLaMLwQ6v0HR
 Kxj01is44T+TVsUenmKsheQZ7m3kOv4=
X-Google-Smtp-Source: APXvYqzwttEJ+ED4tqFkMcS6p2VMPu6kJVRgSyFBMEhoBwmlMGgZrCaC4Wwf9gFcmZGBdmbITkZnJQ==
X-Received: by 2002:a1c:7419:: with SMTP id p25mr4643105wmc.159.1582146966972; 
 Wed, 19 Feb 2020 13:16:06 -0800 (PST)
Received: from lead ([2a02:8109:8ac0:2ff0:8cca:6d1d:698e:b77])
 by smtp.gmail.com with ESMTPSA id q9sm1406832wrx.18.2020.02.19.13.16.05
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 19 Feb 2020 13:16:06 -0800 (PST)
From: Federico Tedin <federicotedin@HIDDEN>
To: Andreas Schwab <schwab@HIDDEN>
Subject: Re: bug#39596: 26.3; Export INSIDE_EMACS with Eshell
References: <87a75lvds8.fsf@HIDDEN> <m1k14jpjqo.fsf@HIDDEN>
 <87blpvc9ek.fsf@HIDDEN> <87y2sylf7p.fsf@HIDDEN>
 <mvmftf61p1t.fsf@HIDDEN>
Date: Wed, 19 Feb 2020 22:16:05 +0100
In-Reply-To: <mvmftf61p1t.fsf@HIDDEN> (Andreas Schwab's message of "Wed, 19
 Feb 2020 18:10:06 +0100")
Message-ID: <87tv3ml1m2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Andreas Schwab writes: > On Feb 19 2020,
 Federico Tedin wrote:
 > >> Pierre Neidhardt writes: >> >>> Thanks for looking at this, Federico!
 >>> >>> Your patch looks good to me, just one comment below: >>> >>>> ---
 a/lisp/es [...] 
 Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: ambrevar.xyz (xyz)]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (federicotedin[at]gmail.com)
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: suse.de]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.128.47 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.128.47 listed in list.dnswl.org]
X-Debbugs-Envelope-To: 39596
Cc: Pierre Neidhardt <mail@HIDDEN>, 39596 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

Andreas Schwab <schwab@HIDDEN> writes:

> On Feb 19 2020, Federico Tedin wrote:
>
>> Pierre Neidhardt <mail@HIDDEN> writes:
>>
>>> Thanks for looking at this, Federico!
>>>
>>> Your patch looks good to me, just one comment below:
>>>
>>>> --- a/lisp/eshell/em-dirs.el
>>>> +++ b/lisp/eshell/em-dirs.el
>>>> @@ -191,6 +191,9 @@ eshell-dirs-initialize
>>>>  		        (unless (ring-empty-p eshell-last-dir-ring)
>>>>  			  (expand-file-name
>>>>  			   (ring-ref eshell-last-dir-ring 0))))
>>>> +            t)
>>>> +           ("INSIDE_EMACS" ,(lambda (_indices)
>>>> +                              (format "%s,eshell" emacs-version))
>>>>              t))))
>>>
>>> Why did you unquote the lambda here?
>>
>> I need to unquote the lambda to get its value, right?
>
> Unquoting allows it to be byte-compiled.
>
> Andreas.

Wasn't aware of that, thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39596; Package emacs. Full text available.

Message received at 39596 <at> debbugs.gnu.org:


Received: (at 39596) by debbugs.gnu.org; 19 Feb 2020 17:10:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 19 12:10:16 2020
Received: from localhost ([127.0.0.1]:43331 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1j4SrX-0006dZ-R8
	for submit <at> debbugs.gnu.org; Wed, 19 Feb 2020 12:10:16 -0500
Received: from mx2.suse.de ([195.135.220.15]:34448)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <schwab@HIDDEN>) id 1j4SrV-0006dG-Go
 for 39596 <at> debbugs.gnu.org; Wed, 19 Feb 2020 12:10:14 -0500
X-Virus-Scanned: by amavisd-new at test-mx.suse.de
Received: from relay2.suse.de (unknown [195.135.220.254])
 by mx2.suse.de (Postfix) with ESMTP id 6BF48AE24;
 Wed, 19 Feb 2020 17:10:07 +0000 (UTC)
From: Andreas Schwab <schwab@HIDDEN>
To: Federico Tedin <federicotedin@HIDDEN>
Subject: Re: bug#39596: 26.3; Export INSIDE_EMACS with Eshell
References: <87a75lvds8.fsf@HIDDEN> <m1k14jpjqo.fsf@HIDDEN>
 <87blpvc9ek.fsf@HIDDEN> <87y2sylf7p.fsf@HIDDEN>
X-Yow: Sign my PETITION.
Date: Wed, 19 Feb 2020 18:10:06 +0100
In-Reply-To: <87y2sylf7p.fsf@HIDDEN> (Federico Tedin's message of "Wed, 19
 Feb 2020 17:22:18 +0100")
Message-ID: <mvmftf61p1t.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.3 (/)
X-Debbugs-Envelope-To: 39596
Cc: Pierre Neidhardt <mail@HIDDEN>, 39596 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.3 (-)

On Feb 19 2020, Federico Tedin wrote:

> Pierre Neidhardt <mail@HIDDEN> writes:
>
>> Thanks for looking at this, Federico!
>>
>> Your patch looks good to me, just one comment below:
>>
>>> --- a/lisp/eshell/em-dirs.el
>>> +++ b/lisp/eshell/em-dirs.el
>>> @@ -191,6 +191,9 @@ eshell-dirs-initialize
>>>  		        (unless (ring-empty-p eshell-last-dir-ring)
>>>  			  (expand-file-name
>>>  			   (ring-ref eshell-last-dir-ring 0))))
>>> +            t)
>>> +           ("INSIDE_EMACS" ,(lambda (_indices)
>>> +                              (format "%s,eshell" emacs-version))
>>>              t))))
>>
>> Why did you unquote the lambda here?
>
> I need to unquote the lambda to get its value, right?

Unquoting allows it to be byte-compiled.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@HIDDEN
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39596; Package emacs. Full text available.

Message received at 39596 <at> debbugs.gnu.org:


Received: (at 39596) by debbugs.gnu.org; 19 Feb 2020 16:30:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 19 11:30:22 2020
Received: from localhost ([127.0.0.1]:43323 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1j4SEw-0005jp-5F
	for submit <at> debbugs.gnu.org; Wed, 19 Feb 2020 11:30:22 -0500
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:33827)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1j4SEt-0005jQ-RC
 for 39596 <at> debbugs.gnu.org; Wed, 19 Feb 2020 11:30:20 -0500
X-Originating-IP: 92.169.129.147
Received: from bababa (lfbn-idf2-1-1315-147.w92-169.abo.wanadoo.fr
 [92.169.129.147]) (Authenticated sender: mail@HIDDEN)
 by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id F0788C0020;
 Wed, 19 Feb 2020 16:30:12 +0000 (UTC)
From: Pierre Neidhardt <mail@HIDDEN>
To: Federico Tedin <federicotedin@HIDDEN>
Subject: Re: bug#39596: 26.3; Export INSIDE_EMACS with Eshell
In-Reply-To: <87y2sylf7p.fsf@HIDDEN>
References: <87a75lvds8.fsf@HIDDEN> <m1k14jpjqo.fsf@HIDDEN>
 <87blpvc9ek.fsf@HIDDEN> <87y2sylf7p.fsf@HIDDEN>
Date: Wed, 19 Feb 2020 17:30:12 +0100
Message-ID: <87wo8i7d63.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 1.8 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Federico Tedin <federicotedin@HIDDEN> writes: > I need
 to unquote the lambda to get its value, right? Or maybe not,
 and > I'm misunderstanding
 how lambdas work. I did notice though that the > other lambdas in the list
 are unquoted. 
 Content analysis details:   (1.8 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: ambrevar.xyz]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [217.70.183.198 listed in list.dnswl.org]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: ambrevar.xyz (xyz)]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
X-Debbugs-Envelope-To: 39596
Cc: 39596 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.8 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Federico Tedin <federicotedin@HIDDEN> writes: > I need
   to unquote the lambda to get its value, right? Or maybe not, and > I'm misunderstanding
    how lambdas work. I did notice though that the > other lambdas in the list
    are unquoted. 
 
 Content analysis details:   (1.8 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: ambrevar.xyz]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [217.70.183.198 listed in list.dnswl.org]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: ambrevar.xyz (xyz)]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  1.0 BULK_RE_SUSP_NTLD      Precedence bulk and RE: from a suspicious TLD

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Federico Tedin <federicotedin@HIDDEN> writes:

> I need to unquote the lambda to get its value, right? Or maybe not, and
> I'm misunderstanding how lambdas work. I did notice though that the
> other lambdas in the list are unquoted.

I asked because the other lambdas are not unquoted on Emacs 26.3.
If it changed upstream, no problem then! :)

=2D-=20
Pierre Neidhardt
https://ambrevar.xyz/

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5NYpQACgkQm9z0l6S7
zH+bDgf+PVBzLsrbPoevKUgJDsxxezpw1ubIQcg0H1cs2/8CBm973rraaNikudfq
eVHKEALg2y1YBngUe9k/yccOnTZalaaYeVN2oJXLL5lZ9qkGlvXvn9bqWWHMWJOq
8s676pbcWTkZsb+2ssuqHiUM73u19/HfX2i9qGhacritEK1ZWv7+3sDsHJTsQXIY
GuUXNrpszXioyiIc1D84HcOksYedVm5ytBJMZOnbMOzH7ADo58qn3UYV+2euHR9c
IZkCFHR0K6ekCzygewsjEzShcb+WTEGJcDWp5wYgHFrlY6SGDpTRiHWNavGgL6d5
LT5CRvecYX9td3zrioHhn9kbYdqw3g==
=qivL
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39596; Package emacs. Full text available.

Message received at 39596 <at> debbugs.gnu.org:


Received: (at 39596) by debbugs.gnu.org; 19 Feb 2020 16:22:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 19 11:22:28 2020
Received: from localhost ([127.0.0.1]:43314 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1j4S7H-0005Wn-UR
	for submit <at> debbugs.gnu.org; Wed, 19 Feb 2020 11:22:28 -0500
Received: from mail-wm1-f52.google.com ([209.85.128.52]:54913)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <federicotedin@HIDDEN>) id 1j4S7H-0005Wb-4x
 for 39596 <at> debbugs.gnu.org; Wed, 19 Feb 2020 11:22:27 -0500
Received: by mail-wm1-f52.google.com with SMTP id n3so1311630wmk.4
 for <39596 <at> debbugs.gnu.org>; Wed, 19 Feb 2020 08:22:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=Htaf8nj6MjiG4KEbcZGpHKkGx2q6DZ1srfBF48QkivM=;
 b=euOMd6GkZqLHNxP84EGk7wXveQYJiwMIlZBXn9vcoqI/p1p2/MtUpP2A/wDETp5T4D
 MLXdsYCR+zSschId4ZeOhaYCNAAiEvmMdVmYQYcweq2Jq3LJHdU7+NNX5+aN6OkscV28
 H95AllO0tBkdb2Z6FU81D/BMldV4tx30YhAx783RjTK/wi7iiuseLDIfBPi/IsYz6mqy
 l11ix/WNQb/jJHRr2wjpzCYd/XKInM+LXpGfxMUeWOHCLJ2ooAssetJ6Bl4c9Q3i+LZk
 pupDPAuV/+hWUzmxQcDnAHB/sJB3OOX/P+7J3pCVPssefTtUL7jfxXtOQM4hPs2DpDQX
 zrrA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=Htaf8nj6MjiG4KEbcZGpHKkGx2q6DZ1srfBF48QkivM=;
 b=VJ/317VSicWj/dI6tAeKFmDjzc39yrNv4MrE7D8MfbTAAS+CJBhM7e1JF2T5dgR0DF
 S0RLDJdYKFJ6QKZ0twfDUeJr/uxGBYorBUv+kbH17wmLBR0MZyKVTJ7NmUGNRjnqHFv0
 G5MeCp2d30eRbL0xyg/EeA9WcNHMCtH1aLXHDx2cQenveOLzu09V7n2JcZxAcvRr0sjT
 OKxGDAJk57v0eoAkGPp/KxZpRAanr92AZPCterHv7Cg4BoHduNJUP7uuembmmJ450ZMS
 J37VQ9R0IUONzbfPgC6awpGZgfAIPzIwbKG+WjfuSD3EIBq9Ib0We+vnTHpvLER2sSdW
 odgw==
X-Gm-Message-State: APjAAAWJ06NcUQqosMqMU3VoieyWOdPnU8urevHdbX+dUwVx3zC0qDhk
 00MPBmwoTavCq8BH7m+L91ATgq3f
X-Google-Smtp-Source: APXvYqzHe/kM3COaxI9Yrr/Gm/QB1JskHrO87yApq55Dvqon2qwYAt/vz/Ib4LbTHpDu/M6nR5uoTg==
X-Received: by 2002:a1c:f21a:: with SMTP id s26mr8281204wmc.39.1582129340776; 
 Wed, 19 Feb 2020 08:22:20 -0800 (PST)
Received: from lead ([2a02:8109:8ac0:2ff0:8cca:6d1d:698e:b77])
 by smtp.gmail.com with ESMTPSA id f127sm429047wma.4.2020.02.19.08.22.19
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 19 Feb 2020 08:22:19 -0800 (PST)
From: Federico Tedin <federicotedin@HIDDEN>
To: Pierre Neidhardt <mail@HIDDEN>
Subject: Re: bug#39596: 26.3; Export INSIDE_EMACS with Eshell
References: <87a75lvds8.fsf@HIDDEN> <m1k14jpjqo.fsf@HIDDEN>
 <87blpvc9ek.fsf@HIDDEN>
Date: Wed, 19 Feb 2020 17:22:18 +0100
In-Reply-To: <87blpvc9ek.fsf@HIDDEN> (Pierre Neidhardt's message of
 "Wed, 19 Feb 2020 08:40:19 +0100")
Message-ID: <87y2sylf7p.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Pierre Neidhardt writes: > Thanks for looking at this,
 Federico! > > Your patch looks good to me,
 just one comment below: > >> --- a/lisp/eshell/em-dirs.el
 >> +++ b/lisp/eshell/em-dirs.el >> @@ -191,6 +191,9 @@ eshell-dirs-in [...]
 Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: ambrevar.xyz]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: ambrevar.xyz (xyz)]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (federicotedin[at]gmail.com)
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.128.52 listed in list.dnswl.org]
X-Debbugs-Envelope-To: 39596
Cc: 39596 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

Pierre Neidhardt <mail@HIDDEN> writes:

> Thanks for looking at this, Federico!
>
> Your patch looks good to me, just one comment below:
>
>> --- a/lisp/eshell/em-dirs.el
>> +++ b/lisp/eshell/em-dirs.el
>> @@ -191,6 +191,9 @@ eshell-dirs-initialize
>>  		        (unless (ring-empty-p eshell-last-dir-ring)
>>  			  (expand-file-name
>>  			   (ring-ref eshell-last-dir-ring 0))))
>> +            t)
>> +           ("INSIDE_EMACS" ,(lambda (_indices)
>> +                              (format "%s,eshell" emacs-version))
>>              t))))
>
> Why did you unquote the lambda here?

I need to unquote the lambda to get its value, right? Or maybe not, and
I'm misunderstanding how lambdas work. I did notice though that the
other lambdas in the list are unquoted.

- Fede




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39596; Package emacs. Full text available.

Message received at 39596 <at> debbugs.gnu.org:


Received: (at 39596) by debbugs.gnu.org; 19 Feb 2020 07:40:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 19 02:40:25 2020
Received: from localhost ([127.0.0.1]:41590 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1j4Jy4-0003O1-Vq
	for submit <at> debbugs.gnu.org; Wed, 19 Feb 2020 02:40:25 -0500
Received: from relay10.mail.gandi.net ([217.70.178.230]:59987)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1j4Jy2-0003Ns-G8
 for 39596 <at> debbugs.gnu.org; Wed, 19 Feb 2020 02:40:23 -0500
Received: from bababa (lfbn-idf2-1-1315-147.w92-169.abo.wanadoo.fr
 [92.169.129.147]) (Authenticated sender: mail@HIDDEN)
 by relay10.mail.gandi.net (Postfix) with ESMTPSA id 7D71E240007;
 Wed, 19 Feb 2020 07:40:20 +0000 (UTC)
From: Pierre Neidhardt <mail@HIDDEN>
To: Federico Tedin <federicotedin@HIDDEN>
Subject: Re: bug#39596: 26.3; Export INSIDE_EMACS with Eshell
In-Reply-To: <m1k14jpjqo.fsf@HIDDEN>
References: <87a75lvds8.fsf@HIDDEN> <m1k14jpjqo.fsf@HIDDEN>
Date: Wed, 19 Feb 2020 08:40:19 +0100
Message-ID: <87blpvc9ek.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 1.8 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Thanks for looking at this, Federico! Your patch looks good
 to me,
 just one comment below: > --- a/lisp/eshell/em-dirs.el > +++
 b/lisp/eshell/em-dirs.el > @@ -191, 6 +191,
 9 @@ eshell-dirs-initialize > (unless (ring-empty-p eshell-last-dir-ring)
 > (expand-file-name > (ring-ref eshell-last-dir [...] 
 Content analysis details:   (1.8 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [217.70.178.230 listed in list.dnswl.org]
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: ambrevar.xyz]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [217.70.178.230 listed in wl.mailspike.net]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: ambrevar.xyz (xyz)]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
X-Debbugs-Envelope-To: 39596
Cc: 39596 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.8 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Thanks for looking at this, Federico! Your patch looks good
    to me, just one comment below: > --- a/lisp/eshell/em-dirs.el > +++ b/lisp/eshell/em-dirs.el
    > @@ -191,6 +191,9 @@ eshell-dirs-initialize > (unless (ring-empty-p eshell-last-dir-ring)
    > (expand-file-name > (ring-ref eshell-last-dir [...] 
 
 Content analysis details:   (1.8 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: ambrevar.xyz]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [217.70.178.230 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [217.70.178.230 listed in wl.mailspike.net]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: ambrevar.xyz (xyz)]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  1.0 BULK_RE_SUSP_NTLD      Precedence bulk and RE: from a suspicious TLD
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Thanks for looking at this, Federico!

Your patch looks good to me, just one comment below:

> --- a/lisp/eshell/em-dirs.el
> +++ b/lisp/eshell/em-dirs.el
> @@ -191,6 +191,9 @@ eshell-dirs-initialize
>  		        (unless (ring-empty-p eshell-last-dir-ring)
>  			  (expand-file-name
>  			   (ring-ref eshell-last-dir-ring 0))))
> +            t)
> +           ("INSIDE_EMACS" ,(lambda (_indices)
> +                              (format "%s,eshell" emacs-version))
>              t))))

Why did you unquote the lambda here?

=2D-=20
Pierre Neidhardt
https://ambrevar.xyz/

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5M5mMACgkQm9z0l6S7
zH/kvQgAoK4jKWp9ff53/cuveh8ykqZHabF1INx4y2mbnU4Aren+VGczZ4n1XdOi
Bg93f0+eFehrpGNMIG7fbWZrXlYm5HNAVhm+TewhPj5IkhoKynwuXNEi3rax61E2
8yNvkQwxA37pM6FZxjJG+UtBf3Qmc3MjN4N7GyGZTDKatfDO1G2Ef4scImoj/HPq
bDVptQwMe9+Y51RewhPFS2GmBZonrjW1vaWpZkPr01BptpFhr6AJo13eJ2FaETLB
l3FWrJQ5k39Cqml67tac6Lj1fHBx6UOrwDJoq2ulitsYxAB60MRV9aowddxpU2jS
hNXLB/TYeJxuWHR++SE9ospC048ezQ==
=3ycH
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39596; Package emacs. Full text available.

Message received at 39596 <at> debbugs.gnu.org:


Received: (at 39596) by debbugs.gnu.org; 18 Feb 2020 23:18:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 18 18:18:49 2020
Received: from localhost ([127.0.0.1]:41462 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1j4C8f-0007mA-8l
	for submit <at> debbugs.gnu.org; Tue, 18 Feb 2020 18:18:49 -0500
Received: from mail-wm1-f50.google.com ([209.85.128.50]:51432)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <federicotedin@HIDDEN>) id 1j4C8d-0007lv-IL
 for 39596 <at> debbugs.gnu.org; Tue, 18 Feb 2020 18:18:48 -0500
Received: by mail-wm1-f50.google.com with SMTP id t23so4507064wmi.1
 for <39596 <at> debbugs.gnu.org>; Tue, 18 Feb 2020 15:18:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=dln/ZYK3DvGZ2Atgp240nPtIfShUPrBaGN78N/xmUxU=;
 b=CrMDv6SNdxk5R0bqxKR2hHCulEfXgPlff8ZNwYDisAL48TqMYNqyqhJVSbBLXHL6kY
 DCwN8WgJwLjxExl7NXV18TpNOhAuI2QK48p8CNHJ08EydFAo+a/R0vZzSfe9zfxiPnrC
 kNRZ6S62W9+iFom+7iCKs6QY0tuwtkbRRakXOat5dgCg8xCLHT87h34pBOg9xoYAwpIQ
 /E1A8VHZuDaoPt8b1NOVBhjeimvCIVTJsF0Y/cawL5QlRbRGouI+D/6nrLXJNWG1LoH7
 rFHY38rwMMKa8wNMnnW5NLYC8Me6lwnc43Z6q1sywUrYOcQ+SayCKWkG2UWXzc4UM29H
 6Xyw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=dln/ZYK3DvGZ2Atgp240nPtIfShUPrBaGN78N/xmUxU=;
 b=jx2MS+aXiLVk61VPKd5+9XHh2TpBwC+fFpb533l/mkkI5x3k6BIczDxRJ/0gHD4bil
 lD3R2W6HXF07Jv+IMTuYFEPM5xmm5ALgLxyFrdu9SPysVcK2zWWct9X/7VSEvE3bq1EF
 NDLJtdxYP3OzqfyfdwCjIxijPuGBQRHEwrViAep8588t/INqc2EzsWBGRjAqQuVoVLBs
 VkAhjAL74XinrGNoec6mnfTfe3ZtUFEmCnS5L9AISAahs+zsxvVbWPmwJxARuMXiSzgk
 11+Hz//TA3KFkVnz+Ml5CW7HSLbJ/XplGC8yvJS5Vdrc+2qFDvOQqX/9YMNdrelgxTXG
 zFCg==
X-Gm-Message-State: APjAAAV6ojz+MOvcXmFRlM8hZL2+pwDt1D9MIel+oMUofcRJtMlyySqQ
 ZgukGcPBjyKtP1HTY0efYCQlegvx
X-Google-Smtp-Source: APXvYqxvTvIdYPo1Z/TxG3Pg5StlF1FvLOGFdg1gG+73i6kk9gFnMd6d1u8SSma2TSnz8LthPlmcEA==
X-Received: by 2002:a05:600c:2254:: with SMTP id
 a20mr5118511wmm.188.1582067921354; 
 Tue, 18 Feb 2020 15:18:41 -0800 (PST)
Received: from BERMB00016 ([2a02:8109:8ac0:2ff0:f102:995d:d75f:fabc])
 by smtp.gmail.com with ESMTPSA id g15sm274746wro.65.2020.02.18.15.18.39
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 18 Feb 2020 15:18:40 -0800 (PST)
From: Federico Tedin <federicotedin@HIDDEN>
To: Pierre Neidhardt <mail@HIDDEN>
Subject: Re: bug#39596: 26.3; Export INSIDE_EMACS with Eshell
References: <87a75lvds8.fsf@HIDDEN>
Date: Wed, 19 Feb 2020 00:18:39 +0100
In-Reply-To: <87a75lvds8.fsf@HIDDEN> (Pierre Neidhardt's message of
 "Fri, 14 Feb 2020 08:17:11 +0100")
Message-ID: <m1k14jpjqo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39596
Cc: 39596 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

> Eshell does not have INSIDE_EMACS in its environment (unlike M-x shell)
> which I think is a bug as it breaks the behaviour of programs that make
> provisions for Emacs being used as a shell.
>
> See
> https://lists.gnu.org/archive/html/guix-devel/2020-02/msg00029.html
> for a discussion.
>
> Would it be possible to export this variable with Eshell?  Thanks!

I have added this feature to Eshell and created a patch, please check if
this works for you.

Additionally, I noticed that the doc string for
`eshell-variable-aliases-list' mentioned an `eshell-user-aliases-list',
variable but wasn't able to find it anywhere (neither using the Git
log), so I removed the mention.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Copy-INSIDE_EMACS-env-variable-to-subprocesses-in-Es.patch

From cf93960de7d3d92ccb7a5465851bbcb55a0f20d9 Mon Sep 17 00:00:00 2001
From: Federico Tedin <federicotedin@HIDDEN>
Date: Wed, 19 Feb 2020 00:11:35 +0100
Subject: [PATCH] Copy INSIDE_EMACS env variable to subprocesses in Eshell

* lisp/eshell/em-dirs.el (eshell-dirs-initialize): Add INSIDE_EMACS
variable to buffer-local value of eshell-variable-aliases-alist.
* lisp/eshell/esh-var.el (eshell-variable-aliases-list): Update doc
string; remove mention of eshell-user-aliases-list and explain that
variables can optionally be copied to subprocesses' environments.
* test/lisp/eshell/eshell-tests.el (eshell-test/inside-emacs-var): Add
test for the INSIDE_EMACS variable.
* etc/NEWS: Announce changes.
---
 etc/NEWS                         |  6 ++++++
 lisp/eshell/em-dirs.el           |  3 +++
 lisp/eshell/esh-var.el           | 11 ++++++-----
 test/lisp/eshell/eshell-tests.el |  9 ++++++++-
 4 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 1f8e6049a8..238184df24 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -120,6 +120,12 @@ To revert to the previous behaviour,
 unconditionally aborts the current edebug instrumentation with the
 supplied error message.
 
+** Eshell
+
+---
+*** Environment variable INSIDE_EMACS is now copied to subprocesses.
+Its value equals the result of evaluating '(format "%s,eshell" emacs-version)'.
+
 ** Tramp
 
 +++
diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el
index 1949e5dc8f..b478ee028a 100644
--- a/lisp/eshell/em-dirs.el
+++ b/lisp/eshell/em-dirs.el
@@ -191,6 +191,9 @@ eshell-dirs-initialize
 		        (unless (ring-empty-p eshell-last-dir-ring)
 			  (expand-file-name
 			   (ring-ref eshell-last-dir-ring 0))))
+            t)
+           ("INSIDE_EMACS" ,(lambda (_indices)
+                              (format "%s,eshell" emacs-version))
             t))))
 
   (when eshell-cd-on-directory
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index 327a1def46..4231be92fb 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -179,10 +179,8 @@ eshell-variable-aliases-list
 	      (eshell-apply-indices eshell-command-arguments
 				    indices)))))
   "This list provides aliasing for variable references.
-It is very similar in concept to what `eshell-user-aliases-list' does
-for commands.  Each member of this defines the name of a command,
-and the Lisp value to return for that variable if it is accessed
-via the syntax `$NAME'.
+Each member of this defines the name of a command, and the Lisp value
+to return for that variable if it is accessed via the syntax `$NAME'.
 
 If the value is a function, that function will be called with two
 arguments: the list of the indices that was used in the reference, and
@@ -190,7 +188,10 @@ eshell-variable-aliases-list
 For example, a reference of `$NAME[10][20]' would result in the
 function for alias `NAME' being called (assuming it were aliased to a
 function), and the arguments passed to this function would be the list
-'(10 20)', and nil."
+'(10 20)', and nil.
+
+Additionally, each member may specify if it should be copied to the
+environment of created subprocesses."
   :type '(repeat (list string sexp
 		       (choice (const :tag "Copy to environment" t)
 			       (const :tag "Use only in Eshell" nil)))))
diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el
index 026818ab06..f98e4ce92b 100644
--- a/test/lisp/eshell/eshell-tests.el
+++ b/test/lisp/eshell/eshell-tests.el
@@ -167,7 +167,14 @@ eshell-test/last-arg-var
   "Test using the \"last arg\" ($_) variable"
   (with-temp-eshell
    (eshell-command-result-p "+ 1 2; + $_ 4"
-                             "3\n6\n")))
+                            "3\n6\n")))
+
+(ert-deftest eshell-test/inside-emacs-var ()
+  "Test presence of \"INSIDE_EMACS\" in subprocesses"
+  (with-temp-eshell
+   (eshell-command-result-p "env"
+                            (format "INSIDE_EMACS=%s,eshell"
+                                    emacs-version))))
 
 (ert-deftest eshell-test/escape-nonspecial ()
   "Test that \"\\c\" and \"c\" are equivalent when \"c\" is not a
-- 
2.21.1 (Apple Git-122.3)


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39596; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Feb 2020 07:17:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 14 02:17:20 2020
Received: from localhost ([127.0.0.1]:60784 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1j2VE0-0005Mb-FC
	for submit <at> debbugs.gnu.org; Fri, 14 Feb 2020 02:17:20 -0500
Received: from lists.gnu.org ([209.51.188.17]:50983)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1j2VDy-0005MU-CB
 for submit <at> debbugs.gnu.org; Fri, 14 Feb 2020 02:17:19 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:51302)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <mail@HIDDEN>) id 1j2VDx-0000PV-8v
 for bug-gnu-emacs@HIDDEN; Fri, 14 Feb 2020 02:17:18 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mail@HIDDEN>) id 1j2VDv-00067i-Px
 for bug-gnu-emacs@HIDDEN; Fri, 14 Feb 2020 02:17:16 -0500
Received: from relay12.mail.gandi.net ([217.70.178.232]:32933)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mail@HIDDEN>) id 1j2VDv-00062p-Iz
 for bug-gnu-emacs@HIDDEN; Fri, 14 Feb 2020 02:17:15 -0500
Received: from mimimi (lfbn-idf2-1-1315-147.w92-169.abo.wanadoo.fr
 [92.169.129.147]) (Authenticated sender: mail@HIDDEN)
 by relay12.mail.gandi.net (Postfix) with ESMTPSA id 04314200005
 for <bug-gnu-emacs@HIDDEN>; Fri, 14 Feb 2020 07:17:11 +0000 (UTC)
From: Pierre Neidhardt <mail@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 26.3; Export INSIDE_EMACS with Eshell
Date: Fri, 14 Feb 2020 08:17:11 +0100
Message-ID: <87a75lvds8.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 217.70.178.232
X-Spam-Score: 3.9 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: Eshell does not have INSIDE_EMACS in its environment (unlike
 M-x shell) which I think is a bug as it breaks the behaviour of programs
 that make provisions for Emacs being used as a shell. See
 https://lists.gnu.org/archive/html/guix-devel/2020-02/msg00029.html
 for a discussion. 
 Content analysis details:   (3.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: gnu.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [209.51.188.17 listed in list.dnswl.org]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.7 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: ambrevar.xyz (xyz)]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 1.7 FROM_SUSPICIOUS_NTLD_FP From abused NTLD
 0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Eshell does not have INSIDE_EMACS in its environment (unlike
    M-x shell) which I think is a bug as it breaks the behaviour of programs
   that make provisions for Emacs being used as a shell. See https://lists.gnu.org/archive/html/guix-devel/2020-02/msg00029.html
    for a discussion. 
 
 Content analysis details:   (1.2 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: ambrevar.xyz]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [209.51.188.17 listed in list.dnswl.org]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.7 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: ambrevar.xyz (xyz)]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD

--=-=-=
Content-Type: text/plain


Eshell does not have INSIDE_EMACS in its environment (unlike M-x shell)
which I think is a bug as it breaks the behaviour of programs that make
provisions for Emacs being used as a shell.

See
https://lists.gnu.org/archive/html/guix-devel/2020-02/msg00029.html
for a discussion.

Would it be possible to export this variable with Eshell?  Thanks!



--=-=-=
Content-Type: multipart/signed; boundary="==-=-=";
	micalg=pgp-sha256; protocol="application/pgp-signature"

--==-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


=2D-=20
Pierre Neidhardt
https://ambrevar.xyz/

--==-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5GSXcACgkQm9z0l6S7
zH/K3Qf/WSGT2Mgq3T3+0/RoBF92gcK/5RpFT993LWuE7JUe4hOft/pCdyh3dbFA
hllXSMTxkxWVCnU0c5APxmju8NNHl14VngK+xVVczsN+GfpGgbOJ4V1ocLGwiTdl
60GvSQ3QOsSU2k+WMhTJXkIGvK+NIOKAm7WDFqQJcoFAPGmuMkpauM90hYZsr3cC
N6UR0N8FL5TGLXvw3nAuSe9Q0EHpfTK7fO6NvMzEBPCL9fOMna14tcgn6CnAMaKN
6Nc/P4oByTg+lkpJJ6WZDRHFTUWJgmp+Cmi+77wDQ1g2EZitRcdY9umhDTve/hlc
baGZp18y4f5epb6sy8afYeWiXFTJYA==
=gTaF
-----END PGP SIGNATURE-----
--==-=-=--

--=-=-=--




Acknowledgement sent to Pierre Neidhardt <mail@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#39596; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 24 Feb 2020 18:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.