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

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

bug#12117: read-passwd deletes prompt


From: Juri Linkov
Subject: bug#12117: read-passwd deletes prompt
Date: Thu, 02 Aug 2012 11:07:06 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (x86_64-pc-linux-gnu)

A new implementation of `read-passwd' allows the user to delete
characters from the minibuffer's prompt, i.e. when the user
mistypes the password and wants to retype it after clearing with
a few of DELs, typing more DEL will start removing characters
from the prompt.

This can be reproduced by visiting a GPG encrypted file that uses
`epa-passphrase-callback-function' that calls `read-passwd'.

The problem is that `find-file-noselect-1' binds `inhibit-read-only' to t
before calling `insert-file-contents':

            (let ((inhibit-read-only t))
              (insert-file-contents filename t))

The simplest test case to demonstrate the problem is to type DEL
after evaluating:

  (let ((inhibit-read-only t))
    (read-passwd "Password: "))

What is expected is: instead of deleting characters from the prompt
DEL should display the message "Text is read-only".

One solution is to let-bind `inhibit-read-only' to nil either
in `read-passwd' or in `epa-passphrase-callback-function',
or maybe in both?





reply via email to

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