Subject: Re: bug#73768: 'read-passwd-mode' can clobber user defined mode lines

From: Michael Albinus <[email-masked]>
Date: Fri, 18 Oct 2024 11:13:18 +0200

martin rudalics <[email-masked]> writes:

Hi Martin,

>> As long as you are satisfied with seeing the eye at the end of the mode
>> line which for narrow windows can be hidden.  Have you considered using
>> 'mode-line-front-space' instead?
>
> I tried that now and it seems to work well here.  Have a look.

Unfortunately, it doesn't seem to work with your recipe

--8<---------------cut here---------------start------------->8---
emacs -Q --eval "(setq default-frame-alist '((minibuffer . nil)))

evaluate via M-:

(with-selected-window (get-buffer-window "*scratch*" t)
  (with-selected-window (split-window nil -5)
    (set-window-buffer nil (get-buffer-create "*text*"))
    (read-passwd "PWD:")))
--8<---------------cut here---------------end--------------->8---

I also believe that modifying mode-line-front-space is rather a
hack. Nobody seems to do this in Emacs' lisp/ directory. And the
documentation of this variable doesn't encourage its random
modification.

I propose to apply the patch with modifying global-mode-string to
emacs-30. A more sophisticated solution could be in the master branch
then. Yes, the password icon could be invisible due to short window
width, but this might be acceptable.

WDYT?

> martin

Best regards, Michael.