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#60942: 30.0.50; [PATCH] Indices in Eshell variable interpolation don't work with async subcommands Date: Wed, 18 Jan 2023 23:37:12 -0800 Message-ID: References: <20e5cb2f-aabe-53fd-d3af-81ec5ff11e7b@gmail.com> <83wn5jyq69.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8684"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60942@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 19 08:38:25 2023 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 1pIPVA-00026j-W3 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Jan 2023 08:38:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIPUp-00047x-SM; Thu, 19 Jan 2023 02:38: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 1pIPUo-00047p-Jy for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2023 02:38: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 1pIPUo-0005n4-Bs for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2023 02:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pIPUo-000763-2x for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2023 02:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Jan 2023 07:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60942 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 60942-submit@debbugs.gnu.org id=B60942.167411384127233 (code B ref 60942); Thu, 19 Jan 2023 07:38:02 +0000 Original-Received: (at 60942) by debbugs.gnu.org; 19 Jan 2023 07:37:21 +0000 Original-Received: from localhost ([127.0.0.1]:42436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIPU8-00075A-ND for submit@debbugs.gnu.org; Thu, 19 Jan 2023 02:37:20 -0500 Original-Received: from mail-pj1-f41.google.com ([209.85.216.41]:56098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIPU6-00074x-N6 for 60942@debbugs.gnu.org; Thu, 19 Jan 2023 02:37:19 -0500 Original-Received: by mail-pj1-f41.google.com with SMTP id dw9so1532785pjb.5 for <60942@debbugs.gnu.org>; Wed, 18 Jan 2023 23:37:18 -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=4RAAkoBlpg2kwTgnXMvVzeh1me1PavRuGrXvRIxOH/I=; b=jwB7Hw6ILINRsqvQoy83pvwhi9/FPEZjY7ndM03zaHsokpALHtc9ygmhQjN/XOVE4K s1Jf1CmDadqVEe0HA65+LlMqYK7ODxeEDDNJFtuY0BNXy6O4Pxzly1VLEgcdM9Y68kg6 rdaTw9kE+Xpzgf2caQcP2ggWvH/bM/FBAkDzxL4lCzb9Rj04+9OQmW+um5LXAgmYlHTy Es7sOy3bInscy00F0Wk8N1/kFqCAioa7LSbB7P7Iu+yiDeof20WUkjkuxIf/E4U2jYm9 wJSoC1T0aHx7DrWc2jIlEWULYqwypwf6tmNvsuuo7PzNto8UFNvXErPAhCKYCQG2RDO2 ay2g== 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=4RAAkoBlpg2kwTgnXMvVzeh1me1PavRuGrXvRIxOH/I=; b=sBKS42ImTb6oOFMPkuU4d484lrhn+6ZvBaZNrj2EqZDsq2mclBGpUGHVHGxjNXe93E AspiJ05xyizJSd53PwV/jxYB7i9mZZC4hb6vZ5bE5chBOTyWpSfS2sb3QSB5QHQb1uDc S7HA10i3J0Cx++WAOPNUVZ0heaxrFoatJ2M1p7f8s63YOGEWbcogR0Sf//niv5ns3vFS vznK7Ph7d0f8iDUaHmVmuisInD8rGKh2GQ3vk9tMmkO+ROYE7eN4Da+VtinkRU67iu4W 1emr0veMgM8+vZ19/3TT0uHSibXkWWhJprR+mH8Nh8ayKtvk1Eap1BwTbqdSJZqozWXJ j+UA== X-Gm-Message-State: AFqh2kpugO8v1e2DQeNsRqL3ZlPzcAd3kSMOVgoAfV0h2prjzTgQeGP9 B661X9w6N/Ynxg7f0fegxRvVGdMFq+LW3g== X-Google-Smtp-Source: AMrXdXtTevWd0Q5l1z0C8JwPO/cm9bOnL4GBv0jMrgzmxiBNgTyjwf7cyknzoqCJ317prh2c8yR2jg== X-Received: by 2002:a17:90a:f606:b0:228:f6cc:dc4f with SMTP id bw6-20020a17090af60600b00228f6ccdc4fmr10385272pjb.10.1674113832653; Wed, 18 Jan 2023 23:37:12 -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 c22-20020a6566d6000000b0045dc85c4a5fsm16379331pgw.44.2023.01.18.23.37.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Jan 2023 23:37:12 -0800 (PST) Content-Language: en-US In-Reply-To: <83wn5jyq69.fsf@gnu.org> 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:253681 Archived-At: On 1/18/2023 10:49 PM, Eli Zaretskii wrote: > Why do you remove a non-internal function? We cannot possibly do that > if this is going to be installed on the emacs-29 branch. But even if > you are going to install on master, why not leave that function alone? > Some code somewhere could be using it, and we don't usually remove > functions before a period of deprecation. I can keep 'eshell-eval-indices' around and mark it obsolete if you prefer; it wouldn't hurt anything. I could also fix this bug in that function, though it would be an inferior fix compared to the new 'eshell-indices' function, so we definitely want that new function (or something very similar). I'm not sure fixing 'eshell-eval-indices' is worth it though, since I'd be very surprised if anyone called that function directly. For context, 'eshell-eval-indices' is a function I added in Emacs 29 to fix some related issues with indices[1], but at the time I didn't fully understand Eshell's internals and so implemented the fix incorrectly (though it works for most common cases). It probably could have been marked as internal at the time, but Eshell doesn't seem to do that regularly, even for functions that external code would be very unlikely to find useful. [1] In particular, the second case in my original message fails even more severely in Emacs 28: ~/config $ echo $exec-path[${echo 0}] Wrong type argument: number-or-marker-p, (eshell-escape-arg (let ((indices 'nil)) (eshell-convert (eshell-command-to-value (eshell-as-subcommand (eshell-trap-errors (eshell-named-command "echo" (list #("0" 0 1 (number t))))))))))