From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#59469: Adding a simpler duplication of the issue Date: Mon, 21 Nov 2022 20:56:16 -0800 Message-ID: <136fc764-48a4-4b03-c520-bd6ef16d9a50@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3489"; mail-complaints-to="usenet@ciao.gmane.io" To: Milan Zimmermann , 59469@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 22 05:57:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxLLS-0000mj-Jd for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Nov 2022 05:57:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxLLD-0006qL-N1; Mon, 21 Nov 2022 23:57:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxLLC-0006qC-LC for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 23:57:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oxLLC-0005eM-AH for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 23:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oxLLB-0003h2-Mc for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 23:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Nov 2022 04:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59469 X-GNU-PR-Package: emacs Original-Received: via spool by 59469-submit@debbugs.gnu.org id=B59469.166909298814155 (code B ref 59469); Tue, 22 Nov 2022 04:57:01 +0000 Original-Received: (at 59469) by debbugs.gnu.org; 22 Nov 2022 04:56:28 +0000 Original-Received: from localhost ([127.0.0.1]:49394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxLKd-0003gF-Mv for submit@debbugs.gnu.org; Mon, 21 Nov 2022 23:56:27 -0500 Original-Received: from mail-pf1-f182.google.com ([209.85.210.182]:45581) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxLKZ-0003fy-9q for 59469@debbugs.gnu.org; Mon, 21 Nov 2022 23:56:26 -0500 Original-Received: by mail-pf1-f182.google.com with SMTP id v28so13291572pfi.12 for <59469@debbugs.gnu.org>; Mon, 21 Nov 2022 20:56:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=Jqn+tsqaall8uo1O/jauIh50AujUhZ/O3hJ/o7IjQaA=; b=efcEnVDmqEhcOWhHlzVrpnVk5AJuP143nWdCSB5nCS0dlcxLzu5r3lVfO1WRYo2gRK I8owJYnPw4ttPrjrmqymKXCQiSfb3n0pj0o7qknwBPKx8VWL5vWZZU30W6oyGJtQNMeX Up/azvPvRuCvthy2N2FI+9dCod6glWMqNNzN3AM0A7aKlkp25zUsp40vAEE+X7S5acG9 BJjjH2B2G+j9KwEg247+QAbLGlaN6O/zeQj5tIrU7dBBjXRpwMqSuiofowQp5ADtLLhS 9ITT31fSH4UMBWdhDgs3CzMfFKwUvCI5OrsPccLZr2RCoHvmhA9ZLmnP6dIelFIj5Mtl bPFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Jqn+tsqaall8uo1O/jauIh50AujUhZ/O3hJ/o7IjQaA=; b=zQlDUR9JsZetpT12FWkWUi+wHY+46IjXrD3K+cXwA/zz3H8v/CUPRzajqgVwtc8Y5j vv92rDW+jIzfKiP4BKrsXGhuABMboe9PjSm1YtYCUNu+yMGU/B5pJiKCOAaOE5sQ4tHo p4V9wpOns++VpwHIN0CPMjCF69bS6ANLKFGwDubB3tqp/sBzDX81m5kjfnWwPCnCuHBR HCmMmCz9WwivBODibdej6Cg5LCXEFaHZfQq8aBrnnmFKZt4wSYwrqSOkqVbgYDCCPmhN peA6B5q1zmOB09HH5DSaA0SJI/VO54z6+ToltXjCT5wGGbqpsL2RiSjF/oRhmdnQ+4l4 GKjA== X-Gm-Message-State: ANoB5pkkwdsnmPN3BtkqOAvjyJsg12OqIRWauZcylxOBDFzmyv/Uc6/H maTkP5zmaeaRMuOeo0egW9w= X-Google-Smtp-Source: AA0mqf4hvLdG0cJUcDYJvi1m9QEnzZCZIiK1pJCzI109fLg+cqEMCDDcMe8i/rzajaRCXg4J1j/Fbw== X-Received: by 2002:a62:1444:0:b0:572:d54:9647 with SMTP id 65-20020a621444000000b005720d549647mr24059452pfu.82.1669092977443; Mon, 21 Nov 2022 20:56:17 -0800 (PST) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id ob6-20020a17090b390600b0020b21019086sm692652pjb.3.2022.11.21.20.56.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Nov 2022 20:56:16 -0800 (PST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248604 Archived-At: On 11/21/2022 6:50 PM, Milan Zimmermann wrote: > A simpler duplication shows the issue is below. [snip] > Same bug: After the call to non-elisp program, /usr/bin/gzip, a > previously exported variable bbb (exported inside the block) is nullified. I'm not entirely sure, but I have a suspicion that this is due to Eshell's deferred commands. Deferred commands tell Eshell to stop processing synchronously and yield to the rest of Emacs. It's a way of keeping long-running commands (e.g. external processes) from hanging the rest of Emacs. Unfortunately, the logic to do this (see 'eshell-do-eval') was written before lexical binding was added to Emacs Lisp, and I think this is the cause of quite a few subtle bugs with Eshell command evaluation. Fixing that is bug#57635, which would leverage the generator.el internals to do this. Of course, I could be wrong. This is reaching well past my comfort zone for Emacs Lisp, but this sure seems like an issue with 'eshell-do-eval'. I'd certainly like to fix this one day, since it's blocking a few other things I want to do in Eshell, but I think it'll be a pretty big project.