From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?J=FCrgen_H=F6tzel?= Newsgroups: gmane.emacs.help Subject: Re: password.el: A minor mode to hide sensitive information (passwords) using overlays. Date: Wed, 21 Nov 2012 16:59:27 +0100 Message-ID: References: <878v9w4mhm.fsf@gmx.de> <87vcczicsa.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1353513616 26171 80.91.229.3 (21 Nov 2012 16:00:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Nov 2012 16:00:16 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Michael Albinus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 21 17:00:27 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TbCir-0008PL-S7 for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Nov 2012 17:00:21 +0100 Original-Received: from localhost ([::1]:56278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbCie-0002P6-4j for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Nov 2012 11:00:08 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbCiP-0002NT-Rf for help-gnu-emacs@gnu.org; Wed, 21 Nov 2012 11:00:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbCiO-0000vh-5s for help-gnu-emacs@gnu.org; Wed, 21 Nov 2012 10:59:53 -0500 Original-Received: from gerolde.archlinux.org ([66.211.214.132]:42797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbCiO-0000vH-1B for help-gnu-emacs@gnu.org; Wed, 21 Nov 2012 10:59:52 -0500 Original-Received: from mail-vb0-f41.google.com (mail-vb0-f41.google.com [209.85.212.41]) by gerolde.archlinux.org (Postfix) with ESMTPSA id 3E59390054 for ; Wed, 21 Nov 2012 10:59:49 -0500 (EST) Original-Received: by mail-vb0-f41.google.com with SMTP id v13so8693110vbk.0 for ; Wed, 21 Nov 2012 07:59:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding :x-gm-message-state; bh=wjyJsFmv9X+xYLD0WZScbR2QYzs6Z3jH6+jn/P8uod8=; b=QwNDZMKsJ6UJox8q7cCSZxXOvlL2vU+brMXK9zflFstMnEFl56t2uavUglcna+lgBD lGunYktZSvSTFeHQj9OXYhBiNz74tq8iME4eUFy4Q+CWBi8rOS3YCIh77inRDECCMdBF JdonJvEb0qduusS+rIUqJ4sJHI6VD2d/oczI0Ti56eqCMpRElYDOBBF1y485YyZWdj1+ f9REDSmLL2qWbtJWC0Rz4K3sfsg+0Ita5rYDxoWorlKGUkemOuwfne6B4gstbDQlsel+ eUyN8rkXXAfhvIlTfjCQhAZ3pyWS7D3C9SwAzOaRQNsBZiPe5mo8irU9FIwn3RrBj/XE HOog== Original-Received: by 10.220.154.83 with SMTP id n19mr28630755vcw.49.1353513588716; Wed, 21 Nov 2012 07:59:48 -0800 (PST) Original-Received: by 10.220.10.7 with HTTP; Wed, 21 Nov 2012 07:59:27 -0800 (PST) X-Originating-IP: [213.61.190.206] In-Reply-To: <87vcczicsa.fsf@gmx.de> X-Gm-Message-State: ALoCoQmE4cOGVWKZxwYp2ytAOxsX8TVyGdujhSEteEtoIBPSLmvY5YrsUKVQQYM+s47eLA/aTO6d X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 66.211.214.132 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87835 Archived-At: Hi Michael, 2012/11/21 Michael Albinus : > J=FCrgen H=F6tzel writes: > >> Hi Michael, > > Hi J=FCrgen, > >> 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:]]+") Thanks. That makes sense: Done. > 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. Thanks. Also done. > 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 > and 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. Yes, there is no easy solution. I implemented it using the overlay insert h= ook, because i can easily distinguish my overlays from other overlays and don't wanted to fiddle with user key bindings which may be already customized. I did not knew about the 'read-only' option: Thanks. I will check it out! J=FCrgen