From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: rprior@protonmail.com, 46609@debbugs.gnu.org
Subject: bug#46609: Fix shell password prompt in minibuffer (bug 43302)
Date: Thu, 18 Feb 2021 16:29:40 +0100 [thread overview]
Message-ID: <874ki9wg0r.fsf@gnus.org> (raw)
In-Reply-To: <83blch5tel.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Feb 2021 16:42:42 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
>> > + (when (string-match "[\n]+$" string)
>> > + (setq string (replace-match "" t t string)))
>>
>> This should probably be "\n+\\'", because we only want to remove
>> newlines from the end of the string, and not newlines from the middle of
>> the string, presumably? ("$" means "match end of line", not "match end
>> of string".)
>
> Do we want to remove more than one newline?
It's just used as the prompt for a `read-string' call, so I think so?
Having a prompt end with a newline is just confusing.
(This (and the preceding two lines) should just be rewritten to use
`string-trim'.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2021-02-18 15:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-18 1:13 bug#46609: Fix shell password prompt in minibuffer (bug 43302) Ryan Prior via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-18 11:44 ` Lars Ingebrigtsen
2021-02-18 11:50 ` Andreas Schwab
2021-02-18 11:56 ` Lars Ingebrigtsen
2021-02-18 14:42 ` Eli Zaretskii
2021-02-18 15:29 ` Lars Ingebrigtsen [this message]
2021-02-18 14:39 ` Eli Zaretskii
2021-02-18 14:47 ` Lars Ingebrigtsen
2021-02-18 15:01 ` Eli Zaretskii
2021-02-18 15:26 ` Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874ki9wg0r.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=46609@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=rprior@protonmail.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.