[Top][All Lists]

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

Re: password.el: A minor mode to hide sensitive information (passwords)

From: Michael Albinus
Subject: Re: password.el: A minor mode to hide sensitive information (passwords) using overlays.
Date: Wed, 21 Nov 2012 09:24:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Jürgen Hötzel <address@hidden> writes:

> Hi Michael,

Hi Jürgen,

> I introduced a new custom variable password-mode-password-prefix-regexs:
> So you can change this.

That looks much better now. Maybe you could polish a little bit the
default. I would make the colon optional, then .netrc or .authinfo files
are supported out of the box. And maybe you shall allow any space class
characters after the prefix. My proposal for a default value would be

  '("Password:?[[:space:]]+" "Passwort:?[[:space:]]+")

You might also mention in the docstring of that custom option, that the
regexps must not contain parentheses for grouping, otherwise your match
wouldn't work. Shy groups are OK.

Another minor annoyance is, that your code is activated only in case of
*inserting* a character. I have no simple solution at hand, because
there isn't a hook when deleting a character. Maybe you could remap keys
<delete-char> and <backspace> for the password string region, but I
don't know whether this covers all use cases.

Delete/undo is also problematic, because you don't know first hand which
password to enter as confirmation.

An alternative approach could be to mark the region which contains the
password with the `read-only' property and catch the `text-read-only'
error, which is raised when somebody tries to modify this region. In the
error handler, you could call your password change mechanery.

> Jürgen

Best regards, Michael.

reply via email to

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