all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: "Jürgen Hötzel" <juergen@archlinux.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: password.el: A minor mode to hide sensitive information (passwords) using overlays.
Date: Wed, 21 Nov 2012 09:24:37 +0100	[thread overview]
Message-ID: <87vcczicsa.fsf@gmx.de> (raw)
In-Reply-To: <CANmXxHONJhWdSCJvU_ZN=DETD0ozNQjJr=41cJm1twKBYo0B=g@mail.gmail.com> ("Jürgen Hötzel"'s message of "Tue, 20 Nov 2012 16:33:45 +0100")

Jürgen Hötzel <juergen@archlinux.org> 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	other threads:[~2012-11-21  8:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CANmXxHPu5LOr872o7FPWjZvThXHcn_ik3OLbTEzb7bTJVucBhQ@mail.gmail.com>
2012-11-20 10:06 ` password.el: A minor mode to hide sensitive information (passwords) using overlays Michael Albinus
2012-11-20 15:33   ` Jürgen Hötzel
2012-11-21  8:24     ` Michael Albinus [this message]
2012-11-21 15:59       ` Jürgen Hötzel

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=87vcczicsa.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=juergen@archlinux.org \
    /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.