all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#12117: read-passwd deletes prompt
@ 2012-08-02  8:07 Juri Linkov
  2012-08-06 22:00 ` Stefan Monnier
  2012-08-15  4:03 ` Stefan Monnier
  0 siblings, 2 replies; 5+ messages in thread
From: Juri Linkov @ 2012-08-02  8:07 UTC (permalink / raw)
  To: 12117

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?





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-15  4:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-02  8:07 bug#12117: read-passwd deletes prompt Juri Linkov
2012-08-06 22:00 ` Stefan Monnier
2012-08-07  0:04   ` Juri Linkov
2012-08-07 15:08     ` Stefan Monnier
2012-08-15  4:03 ` Stefan Monnier

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.