unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
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 19:03:42 +0200	[thread overview]
Message-ID: <831qzjj7dd.fsf@gnu.org> (raw)
In-Reply-To: <b058af75-44c1-6163-7c37-a1317a496f40@gmail.com> (message from Jim Porter on Wed, 2 Mar 2022 22:35:22 -0800)

> From: Jim Porter <jporterbugs@gmail.com>
> Date: Wed, 2 Mar 2022 22:35:22 -0800
> 
> +(defmacro eshell-with-temp-command (command &rest body)
> +  "Narrow the buffer to COMMAND and execute the forms in BODY.

What does it mean to "narrow the buffer to COMMAND"?

Imagine that the user only sees this one line of the doc string --
that actually happens in apropos commands.  How can such a user
understand what this macro does?

> +COMMAND can either be a string, or a cons cell demarcating a
> +buffer region.  If COMMAND is a string, temporarily insert it
> +into the buffer before narrowing.  Point will be set to the
> +beginning of the narrowed region.

After reading this several time and looking at the implementation, I'm
beginning to think that COMMAND is not a good name for this argument.

> +(defun eshell-parse-inner-double-quote (bound)
> +  "Parse the inner part of a double quoted string.
> +The string to parse starts at point and ends at BOUND.
> +
> +If Eshell is currently parsing a quoted string and there are any
> +backslash-escaped characters, this will return the unescaped
> +string, updating point to BOUND.  Otherwise, this returns nil and
> +leaves point where it was."

This seems to just unescape characters in the string?  If so, "parse"
is not the best name for it, and the first line of the doc string
should say "unescape", not "parse".

Thanks.





  parent reply	other threads:[~2022-03-03 17:03 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 [this message]
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
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=831qzjj7dd.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).