From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#54227: 29.0.50; [PATCH] Inconsistencies with Eshell variable interpolation Date: Thu, 03 Mar 2022 21:50:46 +0200 Message-ID: <83o82mizmx.fsf@gnu.org> References: <831qzjj7dd.fsf@gnu.org> <83r17ij2rh.fsf@gnu.org> <6f4c480d-90ea-fbb4-ae5c-dc07dd32026e@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26916"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54227@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 03 20:57:26 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 1nPrZl-0006ur-BA for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Mar 2022 20:57:25 +0100 Original-Received: from localhost ([::1]:47288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPrZk-0004Hl-CS for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Mar 2022 14:57:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPrTa-0000dK-CP for bug-gnu-emacs@gnu.org; Thu, 03 Mar 2022 14:51:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nPrTa-0006wn-2I for bug-gnu-emacs@gnu.org; Thu, 03 Mar 2022 14:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nPrTZ-0008SI-Ld for bug-gnu-emacs@gnu.org; Thu, 03 Mar 2022 14:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Mar 2022 19:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54227 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 54227-submit@debbugs.gnu.org id=B54227.164633705632491 (code B ref 54227); Thu, 03 Mar 2022 19:51:01 +0000 Original-Received: (at 54227) by debbugs.gnu.org; 3 Mar 2022 19:50:56 +0000 Original-Received: from localhost ([127.0.0.1]:43824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPrTT-0008Ry-M6 for submit@debbugs.gnu.org; Thu, 03 Mar 2022 14:50:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPrTS-0008Rm-Ii for 54227@debbugs.gnu.org; Thu, 03 Mar 2022 14:50:54 -0500 Original-Received: from [2001:470:142:3::e] (port=56726 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPrTN-0006vP-9G; Thu, 03 Mar 2022 14:50:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Q7Gkh856wl/HGVE6EJOMHSY37ro22YgF/ka4Y+YhQxk=; b=khQdrrj2F5Jr gzGLxeppmzDc7+xZurUv8VaAWl7kWdwaektaxk283JmcbbzvAYSrCrGVv6/HxjJFj0PpN7M1PSLxn 0QPdW3POcQDeyCqiRrMWnfcBSnCzrXFxc8zDL6XoFNy0Y0nHaB2CD9hcV8t8vzgkgMTjX3XDt6vmx wv845X5IG6Bch5lptIW1YhqIkSPHOUlhU9KlxDKBSHNs2tZZqmETUEfbfJcZnFHXaWosfQupTX2Eh aj2Z2QMxZSXWQGmVYfX0c6z9o+OWnjYPcNVFIQgBCZVhYWAj4IYP2x2Fk120eFZex3lAWujrXbfdl lBfhOhtHgY6qmses+mfkeQ==; Original-Received: from [87.69.77.57] (port=3744 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPrTM-0002pm-LB; Thu, 03 Mar 2022 14:50:49 -0500 In-Reply-To: <6f4c480d-90ea-fbb4-ae5c-dc07dd32026e@gmail.com> (message from Jim Porter on Thu, 3 Mar 2022 11:29:49 -0800) 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" Xref: news.gmane.io gmane.emacs.bugs:227972 Archived-At: > Cc: 54227@debbugs.gnu.org > From: Jim Porter > Date: Thu, 3 Mar 2022 11:29:49 -0800 > > On 3/3/2022 10:43 AM, Eli Zaretskii wrote: > >> Cc: 54227@debbugs.gnu.org > >> From: Jim Porter > >> Date: Thu, 3 Mar 2022 09:56:14 -0800 > >> > >> If you have any ideas about how to improve the wording, I'm happy to > >> update it though. I'll try to keep thinking as well. > > > > Something like the below: > > > > (defmacro eshell-with-temp-command (region &rest body) > > "Narrow the buffer to REGION and execute the forms in BODY. > > > > REGION is a cons cell (START . END) that specifies the region > > to which to narrow the buffer. REGION can also be a string, > > in which case the macro temporarily inserts it into the > > buffer at point, and narrows the buffer to the inserted string. > > Before executing BODY, point is set to the beginning of the > > narrowed REGION. > > Thanks, updated to use that docstring. > > >> diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi > >> index 5581e5cd9e..47f8902d5a 100644 > >> --- a/doc/misc/eshell.texi > >> +++ b/doc/misc/eshell.texi > >> @@ -1043,15 +1043,16 @@ Dollars Expansion > [snip] > >> > >> -Multiple sets of indices can also be specified. For example, if > >> -@var{var} is a list of lists, @samp{$@var{var}[0][0]} is equivalent to > >> -@samp{(caar @var{var})}. > >> +Multiple sets of indices can also be specified. For example, if > >> +@var{var} is @samp{((1 2) (3 4))}, then @samp{$@var{var}[0][1]} will > >> +expand to @code{2}. > > > > I would add to the last sentence: ", i.e.@: the second element of the > > first list member (all indices are zero-based)." > > Ok, added. > > > Also, it sounds like you just dropped the ball on the alist use case? > > I think we just had different ideas of how much detail was necessary. > Given your above comment, I think I have a better idea of the level of > detail, so I've expanded this section into a table. The single paragraph > was a little too dense, so breaking it out into separate blocks for each > data type makes it easier to provide a more thorough explanation. > > >> -(defun eshell-parse-inner-double-quote (bound) > >> - "Parse the inner part of a double quoted string. > >> +(defun eshell-unescape-inner-double-quote (bound) > >> + "Unescape the inner part of a double quoted string. > > > > "Unescape escaped characters of a double-quoted string." > > Done, though I worded it as, "Unescape escaped characters inside a > double-quoted string." I wanted to be extra-clear that this only > operates on the bits *between* the double-quotes, but doesn't do > anything with the surrounding double-quotes themselves. Thanks, this now LGTM.