From: Eli Zaretskii <eliz@gnu.org>
To: Jim Porter <jporterbugs@gmail.com>
Cc: 54227@debbugs.gnu.org
Subject: bug#54227: 29.0.50; [PATCH] Inconsistencies with Eshell variable interpolation
Date: Thu, 03 Mar 2022 21:50:46 +0200 [thread overview]
Message-ID: <83o82mizmx.fsf@gnu.org> (raw)
In-Reply-To: <6f4c480d-90ea-fbb4-ae5c-dc07dd32026e@gmail.com> (message from Jim Porter on Thu, 3 Mar 2022 11:29:49 -0800)
> Cc: 54227@debbugs.gnu.org
> From: Jim Porter <jporterbugs@gmail.com>
> 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 <jporterbugs@gmail.com>
> >> 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.
next prev parent reply other threads:[~2022-03-03 19:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 6:35 bug#54227: 29.0.50; [PATCH] Inconsistencies with Eshell variable interpolation Jim Porter
2022-03-03 13:58 ` Lars Ingebrigtsen
2022-03-03 16:57 ` Eli Zaretskii
2022-03-03 17:03 ` Eli Zaretskii
2022-03-03 17:56 ` Jim Porter
2022-03-03 18:43 ` Eli Zaretskii
2022-03-03 19:29 ` Jim Porter
2022-03-03 19:50 ` Eli Zaretskii [this message]
2022-03-05 20:06 ` Jim Porter
2022-03-05 21:44 ` Jim Porter
2022-03-07 12:52 ` Eli Zaretskii
2022-03-08 3:38 ` Jim Porter
2022-03-08 13:56 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83o82mizmx.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=54227@debbugs.gnu.org \
--cc=jporterbugs@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).