bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#69237: 30.0.50; Toggle password visibility


From: Kévin Le Gouguec
Subject: bug#69237: 30.0.50; Toggle password visibility
Date: Thu, 22 Feb 2024 22:30:48 +0000
User-agent: Gnus/5.13 (Gnus v5.13)

Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:

> We have `read-passwd', which reads a password in the minibuffer, hiding
> the input. However, modern password input boxes outside Emacs allow to
> show/hide the input while typing.
>
> The appended patch tries to implement this feature. The minibuffer in
> `read-passwd' has bound TAB to a function, which toggles visibility of
> the typed input.
>
> On graphic displays, the mode-line has an additional indicator for
> whowing/hiding the typed password. Clicking on this indicator with
> mouse-1 toggles the password visibility.
>
> Comments?

Thank you so much for working on this!  I've had my own half-baked
implementation of this for months; never took the time to polish it up
and submit.

No strong feelings re. keybindings; I've been using C-c C-c because I
wanted something easy to mash, but TAB fits that criterion as well.  Not
sure we can leverage any well-established mnemonic from other keymaps;
FWIW…

* TAB could be familiar to some outline users, but they'll probably
associate that binding to (un)folding, not necessarily hiding/revealing;

* hideshow has multiple bindings for "toggle-hiding", so not sure we can
count on any single one having enough "mindshare".

(Not too worried about needing to input TAB verbatim - I tend to
naturally reach for C-q TAB when I need to do that, since in most
contexts Emacs has a useful command bound to TAB instead of
self-insert-command)


Other than the keybinding, the only other musing I have is regarding the
indicator: wondering if icons.el could help trim some of the boilerplate
down.  In any case, it would give the user some degree of control over
how the indicator is shown (via the icon-preference option) even if we
don't provide 'emoji nor 'symbol variants.

Not overly familiar with that library though - if that's something you
think might be worth looking into, the define-icon forms in outline.el
might help you assess how helpful the library would actually be.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]