Stefan Kangas <stefankangas@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 57635) by debbugs.gnu.org; 12 Sep 2022 01:01:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 11 21:01:17 2022 Received: from localhost ([127.0.0.1]:43753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oXXp7-0005iz-0R for submit <at> debbugs.gnu.org; Sun, 11 Sep 2022 21:01:17 -0400 Received: from mail-pj1-f42.google.com ([209.85.216.42]:52041) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <jporterbugs@HIDDEN>) id 1oXXp2-0005ij-2J for 57635 <at> debbugs.gnu.org; Sun, 11 Sep 2022 21:01:16 -0400 Received: by mail-pj1-f42.google.com with SMTP id m3so6521038pjo.1 for <57635 <at> debbugs.gnu.org>; Sun, 11 Sep 2022 18:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :date:message-id:from:references:cc:to:subject:from:to:cc:subject :date; bh=uT1Nz8zbWMkTwle340k3hOTBDNoOYyna4jrOdh/A/V8=; b=lCBy3nhzSQm/EFiMnKDF7+EhM4zvveIxfsFgwThtLJNsg8Qm+19dyOlcUAHHV7NW4p HpmRflmRZ6NCkcKFnf+JEto+ZqLrsaFZnZFuqByB7Bh19nZJ/26GDERC+syR4B0eW/iz c4sKtFSbrbY39QcOrEatjZgiBl0v8lduy9GwEk942MgNFLsazVuZ95I27Egs3b0wJq8A oJVlNoGS4AYobcQYf4/Galdq+umOWV/e0jE/O/AU0oTo/Dauk0JxxLJIQqHM842HxDl4 Inc/lHq8WozdVWIVRQK1WattbVJo7m36xCl5LS2vVDIi4c/LYTg0SKMEKflThNtAb7P3 WUKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :date:message-id:from:references:cc:to:subject:x-gm-message-state :from:to:cc:subject:date; bh=uT1Nz8zbWMkTwle340k3hOTBDNoOYyna4jrOdh/A/V8=; b=iH8AGFfYUhxID78jT8bY3Q7Fo7rnHy/ZNI8SBqdC5r4b7NorwnfA9364tePGbL7HwP hbM07KsTDAQkvViCIPV2i5Yr+YJtNSZMZ/+BWdhcqfDUIDnAJw2qUa/TyDRSbTOiDIVI QAM5ji3HWRqeMn6H5p8wGMLEo5aHefBxrZYLnqPuQ0XfoaK9pbVcaoo5xOjTfouwTCwx 2m+O36LOnzADxF3ei26Y1a3l9iOxCVOvtxyj9O75DnOhH8YZlB1AcPgOGj671mgsd+BI gd4MWER71/mwF5OK1CToWoUR2MkA6y4Viv+haFUm41MW/ZGurH6RkSB1FUHcxHtJ3V1L wUTQ== X-Gm-Message-State: ACgBeo14pe2dUIkb7SeZeDuR578RZilDNFKXVYFoliYY54u6+GaTnmhR syM74wzzFyJ4zHSirYlqJjCAUPb9xi4= X-Google-Smtp-Source: AA6agR5xFDaC5luR924V1p5iR6L6fgc0QAYnfW5S8nPGxc476TsmvAbur0bEf6iNzMX0VftA8VgkwA== X-Received: by 2002:a17:903:120c:b0:172:728a:3b24 with SMTP id l12-20020a170903120c00b00172728a3b24mr24001860plh.61.1662944466120; Sun, 11 Sep 2022 18:01:06 -0700 (PDT) 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 199-20020a6214d0000000b0053e22c7f135sm4008781pfu.141.2022.09.11.18.01.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 11 Sep 2022 18:01:05 -0700 (PDT) Subject: Re: bug#57635: 29.0.50; Look into using generator.el's CPS machinery to replace 'eshell-do-eval' To: Stefan Monnier <monnier@HIDDEN> References: <1766577e-022f-87ae-873e-875d84078891@HIDDEN> <jwv8rmvnym0.fsf-monnier+emacs@HIDDEN> From: Jim Porter <jporterbugs@HIDDEN> Message-ID: <302b247c-2269-78ca-07e2-ad6c6f93fe1d@HIDDEN> Date: Sun, 11 Sep 2022 18:01:04 -0700 MIME-Version: 1.0 In-Reply-To: <jwv8rmvnym0.fsf-monnier+emacs@HIDDEN> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57635 Cc: 57635 <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 (-) On 9/7/2022 5:45 AM, Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > Indeed, the idea would be to replace the commands that launch processes > with "yields" to an external loop (that just launches the next process > and then calls the generator again). That part should be fairly straightforward; there's already 'eshell-eval-command' and friends ('eshell-resume-command', 'eshell-resume-eval', and 'eshell-do-eval'), which work pretty much like this already. Looking through this, I see a few main differences between how Eshell does things and how generator.el does things: ---------------------------------------- 1) Eshell uses (throw 'eshell-defer) to yield This is probably easy to fix, since it's only used in a couple places, and it looks like it's purely an implementation detail. 2) Eshell doesn't have anything like 'iter-defun' Eshell just evaluates a Lisp form directly (you can see this by tracing 'eshell-eval-command' and then running some external process in Eshell). I'm not sure how hard it would be to get generator.el to be ok with this. 3) Eshell allows replacing a form by throwing 'eshell-replace-command' This is the trickiest part (to me, anyway). It's typically used by Eshell built-in commands when they want to give up and run an external process, though it can be used for a bunch of other things. I'm not sure what the best way to handle this via generator.el would be. Is there any straightforward way to do this? ---------------------------------------- If anyone has ideas, I'm all ears. This is pretty far down into the weeds of Lisp metaprogramming, so I'm just making some educated guesses here. I think doing this would be a big improvement for Eshell though, since I've already bumped up against a few cases that really look like they're just bugs in 'eshell-do-eval'. Moving to generator.el would hopefully fix those and make Eshell easier to maintain/improve.
bug-gnu-emacs@HIDDEN
:bug#57635
; Package emacs
.
Full text available.Received: (at 57635) by debbugs.gnu.org; 7 Sep 2022 12:46:02 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 07 08:46:02 2022 Received: from localhost ([127.0.0.1]:53868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oVuRO-0002Rv-A7 for submit <at> debbugs.gnu.org; Wed, 07 Sep 2022 08:46:02 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:2010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1oVuRN-0002Rb-88 for 57635 <at> debbugs.gnu.org; Wed, 07 Sep 2022 08:46:01 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D2DAE807AF; Wed, 7 Sep 2022 08:45:55 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id AB0AC804AB; Wed, 7 Sep 2022 08:45:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1662554754; bh=5dkkgEIKJpIGJbbMlfpvSqW5dS/YCAmVheTuReBJMu4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=FWYCaIei3in2yBIobO9H1O4OIMWfw+YtuLy+ODvhpkI9uHHNdwSdpniu7ny3B16b5 vTIyWU3wNOBkCBz6LlxHKhUnDmRyJaB8Z3w15FqxkQIMfvf8Zzyv4n1UWca7xALUml 9b0iRZ6FO06/ZM7cNDnO77ER17t1iNzNYtfhPGTP949WauSwyFmB3iNWmY2mCkn/Kx 0lyfqGS8zx2+bPAT378/7ilvVq4dbB9SujIdInBdwPd1g6LUg0QLh3m44lfGpebPt6 0LxRnxbKYQ7OOe3HIo6j0lzc0u4HXpiOueOSrOjD8aLeghUqORhfR5q1s8iuNXrHQV vAStkZdAyO+ow== Received: from pastel (unknown [157.52.9.190]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8780B120500; Wed, 7 Sep 2022 08:45:54 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> To: Jim Porter <jporterbugs@HIDDEN> Subject: Re: bug#57635: 29.0.50; Look into using generator.el's CPS machinery to replace 'eshell-do-eval' In-Reply-To: <1766577e-022f-87ae-873e-875d84078891@HIDDEN> (Jim Porter's message of "Tue, 6 Sep 2022 20:58:00 -0700") Message-ID: <jwv8rmvnym0.fsf-monnier+emacs@HIDDEN> References: <1766577e-022f-87ae-873e-875d84078891@HIDDEN> Date: Wed, 07 Sep 2022 08:45:52 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.068 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57635 Cc: 57635 <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: -3.3 (---) > In order to make long-running Eshell commands behave more-nicely, Eshell > uses iterative evaluation of many commands so that it can return control > back to the rest of Emacs. This has a lot of similarity to how > generator.el works. Indeed, the idea would be to replace the commands that launch processes with "yields" to an external loop (that just launches the next process and then calls the generator again). Stefan
bug-gnu-emacs@HIDDEN
:bug#57635
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 7 Sep 2022 03:58:06 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 06 23:58:06 2022 Received: from localhost ([127.0.0.1]:53112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1oVmCU-00016r-Fg for submit <at> debbugs.gnu.org; Tue, 06 Sep 2022 23:58:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:56618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <jporterbugs@HIDDEN>) id 1oVmCS-00016k-Op for submit <at> debbugs.gnu.org; Tue, 06 Sep 2022 23:58:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <jporterbugs@HIDDEN>) id 1oVmCS-0006In-JL for bug-gnu-emacs@HIDDEN; Tue, 06 Sep 2022 23:58:04 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:35367) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <jporterbugs@HIDDEN>) id 1oVmCQ-00022J-Le for bug-gnu-emacs@HIDDEN; Tue, 06 Sep 2022 23:58:04 -0400 Received: by mail-pf1-x435.google.com with SMTP id 123so3964364pfy.2 for <bug-gnu-emacs@HIDDEN>; Tue, 06 Sep 2022 20:58:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:content-language:mime-version:date :message-id:to:subject:from:from:to:cc:subject:date; bh=3/Q7dSUW/X7y1bx8J5aM0LNFJmOwLauFM5DPy5rvB8Y=; b=DCwDCK7V4E05qc5bS9ajx/iaAhd5v1rt2Gha9fn8nGeCDtCJ+qcVo7UuPGy90fr9xG TJxLxaT5vwq590bG4hICqXVqhyiL+fzKCkEvrYf9t7/OEM0l2DJF8iD7AWMnD4H/EG6V oRP74PEPTDXKdIz8S+Yi+01qhkZfjAWnXVq28INDaL0m88mp3OQJF7aRNbFX6A34Ftig xq8tH6W/VVCdIoK7M+/Y/mHm/ZYxfsMo/X8P+njC9YKSZkOLFVZRlZUCuJt+tWzgcxDq EoNRAEPxgza/7kvMCwgCLR0QFjSU1a3p+1ahlQeoaBaYs5BEbMtSmTLioYM9cJ22sRtv uSvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:mime-version:date :message-id:to:subject:from:x-gm-message-state:from:to:cc:subject :date; bh=3/Q7dSUW/X7y1bx8J5aM0LNFJmOwLauFM5DPy5rvB8Y=; b=ECjtEGYLIBSg3V3I9alm1gNtiobyKgB5klRmeQsjqwPONGZWE/Fyx+sm/sgDBJGwG5 3nyAriuzH97HVFdH9m49rKhvAhu/pyUyHvfuuCRr4U28IVKMn2WneaSb/Q+K2A+Bp1zK 53ZGG0A8uz4+PYfDncbAzWyNXQ2fgvsjlBcO7JVyNnNxFx5kD/KPrWgq2iNIiq4XIitf zeZ8y9V3/6N4ckrZf/kakM3xVDQiW+8ynkOcl7GI+DWSU/q0B8x62Ee3azv74r4KSex7 I+sGQyFnam3u9rpZLQIPZqkh4pYI3tfm5fD1+QUbAk45s5xTMvx5OmqKs+3YmzYk9OCc bfRQ== X-Gm-Message-State: ACgBeo3UpYDDhJ2ApFwz2Qar6NJjA2Na4pIMW9kXMM/n1HpAC7QyyNC/ xm8NYFtq3b+qsYXWK/hcgjvNKX5iE9w= X-Google-Smtp-Source: AA6agR6CqWIhhqaz3w2BpTRWrl07WrKrhWFYcGqs4w0FM9OhI3hm15k7Xqw/jLr8dAKBzdGd9X1LNg== X-Received: by 2002:a63:6643:0:b0:42b:c05e:e3a9 with SMTP id a64-20020a636643000000b0042bc05ee3a9mr1650520pgc.513.1662523081010; Tue, 06 Sep 2022 20:58:01 -0700 (PDT) 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 5-20020a17090a190500b001fe444b2245sm9822931pjg.25.2022.09.06.20.57.59 for <bug-gnu-emacs@HIDDEN> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Sep 2022 20:58:00 -0700 (PDT) X-Mozilla-News-Host: news://news.gmane.org:119 From: Jim Porter <jporterbugs@HIDDEN> Subject: 29.0.50; Look into using generator.el's CPS machinery to replace 'eshell-do-eval' To: bug-gnu-emacs@HIDDEN Message-ID: <1766577e-022f-87ae-873e-875d84078891@HIDDEN> Date: Tue, 6 Sep 2022 20:58:00 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=jporterbugs@HIDDEN; helo=mail-pf1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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: -2.3 (--) In order to make long-running Eshell commands behave more-nicely, Eshell uses iterative evaluation of many commands so that it can return control back to the rest of Emacs. This has a lot of similarity to how generator.el works. This would hopefully help prevent obscure bugs in Eshell, such as bug#54190. In that bug, Stefan mentions[1]: > Looks like a bug somewhere in the `eshell-do-eval` machinery, yes. > Until we find the problem (or rewrite `eshell-do-eval` on top of the CPS > converter of `generator.el`), I think reverting this change (and adding > a comment pointing to this bug) sounds like a great plan. [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54190#17
Jim Porter <jporterbugs@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#57635
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.