From unknown Tue Jun 17 22:18:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57635: 29.0.50; Look into using generator.el's CPS machinery to replace 'eshell-do-eval' Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Sep 2022 03:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57635 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 57635@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16625230864273 (code B ref -1); Wed, 07 Sep 2022 03:59:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Sep 2022 03:58:06 +0000 Received: from localhost ([127.0.0.1]:53112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVmCU-00016r-Fg for submit@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 ) id 1oVmCS-00016k-Op for submit@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 ) id 1oVmCS-0006In-JL for bug-gnu-emacs@gnu.org; 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 ) id 1oVmCQ-00022J-Le for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2022 23:58:04 -0400 Received: by mail-pf1-x435.google.com with SMTP id 123so3964364pfy.2 for ; 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 (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 Message-ID: <1766577e-022f-87ae-873e-875d84078891@gmail.com> 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@gmail.com; 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 From unknown Tue Jun 17 22:18:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57635: 29.0.50; Look into using generator.el's CPS machinery to replace 'eshell-do-eval' Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Sep 2022 12:46:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57635 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Jim Porter Cc: 57635@debbugs.gnu.org Received: via spool by 57635-submit@debbugs.gnu.org id=B57635.16625547629436 (code B ref 57635); Wed, 07 Sep 2022 12:46:03 +0000 Received: (at 57635) by debbugs.gnu.org; 7 Sep 2022 12:46:02 +0000 Received: from localhost ([127.0.0.1]:53868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVuRO-0002Rv-A7 for submit@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 ) id 1oVuRN-0002Rb-88 for 57635@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 In-Reply-To: <1766577e-022f-87ae-873e-875d84078891@gmail.com> (Jim Porter's message of "Tue, 6 Sep 2022 20:58:00 -0700") Message-ID: References: <1766577e-022f-87ae-873e-875d84078891@gmail.com> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 From unknown Tue Jun 17 22:18:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57635: 29.0.50; Look into using generator.el's CPS machinery to replace 'eshell-do-eval' Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Sep 2022 01:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57635 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 57635@debbugs.gnu.org Received: via spool by 57635-submit@debbugs.gnu.org id=B57635.166294447722014 (code B ref 57635); Mon, 12 Sep 2022 01:02:01 +0000 Received: (at 57635) by debbugs.gnu.org; 12 Sep 2022 01:01:17 +0000 Received: from localhost ([127.0.0.1]:43753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXXp7-0005iz-0R for submit@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 ) id 1oXXp2-0005ij-2J for 57635@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@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) References: <1766577e-022f-87ae-873e-875d84078891@gmail.com> From: Jim Porter Message-ID: <302b247c-2269-78ca-07e2-ad6c6f93fe1d@gmail.com> Date: Sun, 11 Sep 2022 18:01:04 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 13 09:47:46 2022 Received: (at control) by debbugs.gnu.org; 13 Oct 2022 13:47:46 +0000 Received: from localhost ([127.0.0.1]:60026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiyYs-0005Dv-8Q for submit@debbugs.gnu.org; Thu, 13 Oct 2022 09:47:46 -0400 Received: from mail-oi1-f170.google.com ([209.85.167.170]:43632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiyYn-0005CJ-0t for control@debbugs.gnu.org; Thu, 13 Oct 2022 09:47:41 -0400 Received: by mail-oi1-f170.google.com with SMTP id g10so1753033oif.10 for ; Thu, 13 Oct 2022 06:47:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=fRhbfIVOt0g1Gwwgy9iAqGuChB6k/GfjgrP8kyOXKVk=; b=hMCwfyW7xvRS03z5AWv0bA2qKozBlY7zfiRbe2ywpuwy/yNdg3xMVKZhBtW9obS0AK yWwBBITDsrGV75L2itbqWX3O5fgQoVM1eB0iF94GW4YfakUVMta+VfzjkPtic/Z2TjDu MVhitM3bkiAE5Zlt/5ClIkHhq9DaYkyJavHtEyj5oK9QxjEfBbdfAcQG+n32DQYifohu b7rxG3dyJKsk2p//6yDytX0lOIuKfQ9OUWJSFKDdRQo76R0+ygbA7X530wJSl0Gpk8YM Oo//euTKnXPnMkFZC7r1KWeKxtKr5JJbtFsW5VMbok/u7qjFg+aXehnpJ428OlemeuU3 sd4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=fRhbfIVOt0g1Gwwgy9iAqGuChB6k/GfjgrP8kyOXKVk=; b=gGXiU/aAVq2Bt6teIvKUptMaoKOsUE6JyiFUaiytqWXabu5Oj5doOoJGF+VHeuIFYk 0Gy/CAlEX3KWCgGHx3h75rQ9L441xhnc2ckT9nyQttzbiCfGFGY4z8L00+mjqTrOiO+u k0hPY7XPdNJJ54sFgH4CK9kmVZn/D/lcztJcdTHM5W9ACu+R5bT7l+cHnsl0uVpKcEcQ CU13M/mEDkRMjH56O4uqIjXzZ0l6j7GIf2Vfuh+Wkk/R28HcJJHvd7Nunow6kLFdSpfA LaPnbBIpGtXxVNMBjNdEMn69UR9b3iL1CRBjhPhikfEjTV70XLh/sUPwOsptn2STsmEN 4H2Q== X-Gm-Message-State: ACrzQf0oLH5GzsRxu2XmL9MlBAoAi2ALswQKIxaUCtKh1Sd7iUmNJxtD sGFwvrfTthBxqZ4uIimHHCmWTwgVfm/496VKhN81hULM X-Google-Smtp-Source: AMsMyM6tla+KCY34G9edq4cM6sVPpdIfbC89Gxn4jmJP4/GxhQl0gl//5m7zoOE3QZYgE7pap4MxkbNVCZlgWPhi9iM= X-Received: by 2002:a05:6808:1186:b0:353:b77a:a481 with SMTP id j6-20020a056808118600b00353b77aa481mr4735021oil.199.1665668854458; Thu, 13 Oct 2022 06:47:34 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 13 Oct 2022 15:47:34 +0200 From: Stefan Kangas X-Hashcash: 1:20:221013:control@debbugs.gnu.org::FBoK1Eo9tAHmgAM8:2VRW MIME-Version: 1.0 Date: Thu, 13 Oct 2022 15:47:34 +0200 Message-ID: Subject: control message for bug #57635 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) severity 57635 wishlist quit From unknown Tue Jun 17 22:18:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57635: 29.0.50; Look into using generator.el's CPS machinery to replace 'eshell-do-eval' Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Dec 2022 01:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57635 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 57635@debbugs.gnu.org Received: via spool by 57635-submit@debbugs.gnu.org id=B57635.167115304525861 (code B ref 57635); Fri, 16 Dec 2022 01:11:01 +0000 Received: (at 57635) by debbugs.gnu.org; 16 Dec 2022 01:10:45 +0000 Received: from localhost ([127.0.0.1]:45987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5zFN-0006j3-3a for submit@debbugs.gnu.org; Thu, 15 Dec 2022 20:10:45 -0500 Received: from mail-pj1-f52.google.com ([209.85.216.52]:38494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5zFK-0006il-Kw for 57635@debbugs.gnu.org; Thu, 15 Dec 2022 20:10:42 -0500 Received: by mail-pj1-f52.google.com with SMTP id z8-20020a17090abd8800b00219ed30ce47so4481852pjr.3 for <57635@debbugs.gnu.org>; Thu, 15 Dec 2022 17:10:42 -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:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=yya943CWrmzQwJn+xXMcsPb3K5gqTE7c+FESXiHUkkU=; b=ghqD22SNAvwMXNbfOa77Z/5yqymDWeJR2Ee0/4ypEsjbwhrktY/zaDVhTlijkUIdtm vdVCZsqYGjtLB4G+ZZhkpS1QoPSMOS3VrqGOyUrnIaw5P0o+mX9EcPjSv1Zob2k9DXBA MSm7JHrnMyBJUsJT7dYSdvdXhLv4r7QyFokgi7MVpL0GR+DeRLGDL1UqNpoaUvExef/W JwsEra0RJa6iorZGOm9WRQAKaTQWHxC6Xk1DZMyvd0HWQcbwipxpXUTtcqUYg3DYXAaq HA9j5KQNpZ6lHZ954IaVkVO659gnoELkpUPeraH0BiQ33Sv7nlkOXSKZFEdyojOaFnQ5 nK+w== 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:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yya943CWrmzQwJn+xXMcsPb3K5gqTE7c+FESXiHUkkU=; b=jrIc0cxS5e0c1FG3Omb30jtaPBSICX2mmWdxorjT2YmdRahCvSLd/BLGbLeJ6XfTB5 ZBvicWo9KY6guSYUlrJf8DVebpEDkUOmieQAK0DBf4nkjr1v/nvektxuzZBrhASeuR+5 kGwk6DX8MOMxajj08EaB2f3lolW7Yb2O9OGRAqjF6T/elFfmLQRv8EaQCxdb45EaEvO6 7mCBKGp8GJVjpyxEEba51TO6P51LRu20EElcTgMOXcW7aQoGyk7B8s5AfEtHHJwxE30o cOhEbH1MppPT7GMNdWKAMF0/HH9QdbVZmpoC5gojjhJvX5HHTxT3FCH882uBofbFACeZ BrAQ== X-Gm-Message-State: ANoB5plCxiBuY5MpdivO8/9Kv8U2+p7Ry8HpV2kq+Fn26XJazWfTAqgl JMGkn9igrGNbMG97AXfRD8j0cu/hp90= X-Google-Smtp-Source: AA0mqf5Na+wCjHMxC0TX68qstBg7YB0dN97s2iaHZSV0XkxDuqoEfYgf5OCbzAf6OOrGmzeZ/+YssA== X-Received: by 2002:a17:902:ab8d:b0:187:467f:c76c with SMTP id f13-20020a170902ab8d00b00187467fc76cmr27325125plr.51.1671153036872; Thu, 15 Dec 2022 17:10:36 -0800 (PST) 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 t6-20020a1709027fc600b001769e6d4fafsm275014plb.57.2022.12.15.17.10.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Dec 2022 17:10:36 -0800 (PST) Message-ID: Date: Thu, 15 Dec 2022 17:10:35 -0800 MIME-Version: 1.0 Content-Language: en-US References: <1766577e-022f-87ae-873e-875d84078891@gmail.com> From: Jim Porter In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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: >> 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). Maybe an even better solution would be to use Emacs threads. This should do everything that Eshell needs, plus hopefully add the ability to add some basic job control as well. (Well, one day...) I hacked something up that seems to work for simple cases, and it shouldn't be *too* hard to get it working more generally. This will be a big change for Eshell, so it might make sense to create a feature branch when I have a little more to show. However, I can already see how this will eliminate the need for a number of workarounds in Eshell's command invocation logic.