GNU bug report logs -
#74626
30.0.91; mini buffer password prompt mismatches shell buffer's
Previous Next
Reported by: Van Ly <van.ly <at> SDF.ORG>
Date: Sat, 30 Nov 2024 16:21:02 UTC
Severity: normal
Found in version 30.0.91
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 74626 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Van Ly via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:
> Hello,
Hi,
> When using ssh to connect to a machine, the password prompt is expected
> to be identical in the shell buffer and mini buffer.
>
> The mini buffer's prompt seems to make use of only the last character.
>
> See
>
> http://sdf.org/~van.ly/img/emacs-30-0-91-password-prompt.webp
>
> The shell buffer's password prompt shows
>
> van <at> 192.168.1.144's password:
>
> The mini buffer shows
>
> 4's password:
Thanks for the report.
I can reproduce the problem. In fact, there are two issues:
- comint-password-prompt-regexp uses "'s" in order to search for a password
prompt. That's fine for password prompts like "van <at> 192.168.1.144's
password:", however, everything before this "'s" is ignored when the
minibuffer prompt is assembled.
- The string the password prompt is looked for is "van <at> 192.168.1.144's
password:". In comint-watch-for-password-prompt, the "" is removed,
but while searching for the password prompt. As a result,
(match-string 0 string) returns a wrong substring (just one position
left).
The problem does not happen with Emacs 29. The culprit seems to be
commit 1a55e957ae57, which has changed the implementation of
comint-watch-for-password-prompt. The appended patch fixes this for me
in Emacs 30. Could you, please, check?
Jim, do you have a comment?
Best regards, Michael.
[Message part 2 (text/x-patch, attachment)]
This bug report was last modified 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.