diff options
| -rw-r--r-- | itches/emacs/read-passwd-reveal.patch | 28 | ||||
| -rw-r--r-- | itches/emacs/tracker.org | 63 |
2 files changed, 6 insertions, 85 deletions
diff --git a/itches/emacs/read-passwd-reveal.patch b/itches/emacs/read-passwd-reveal.patch deleted file mode 100644 index 09eba80..0000000 --- a/itches/emacs/read-passwd-reveal.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/lisp/subr.el b/lisp/subr.el -index 06ea503da6..da9253cedd 100644 ---- a/lisp/subr.el -+++ b/lisp/subr.el -@@ -2820,6 +2820,7 @@ read-passwd-map - ;; minibuffer-local-map along the way! - (let ((map (make-sparse-keymap))) - (set-keymap-parent map minibuffer-local-map) -+ (define-key map "\C-c\C-c" #'read-passwd-toggle-visibility) - (define-key map "\C-u" #'delete-minibuffer-contents) ;bug#12570 - map) - "Keymap used while reading passwords.") -@@ -2830,6 +2831,14 @@ read-password--hide-password - (put-text-property (+ i beg) (+ 1 i beg) - 'display (string (or read-hide-char ?*)))))) - -+(defun read-passwd-toggle-visibility () -+ (interactive) -+ (if (member #'read-password--hide-password post-command-hook) -+ (progn -+ (remove-hook 'post-command-hook #'read-password--hide-password t) -+ (remove-text-properties (minibuffer-prompt-end) (point-max) '(display))) -+ (add-hook 'post-command-hook #'read-password--hide-password nil t))) -+ - (defun read-passwd (prompt &optional confirm default) - "Read a password, prompting with PROMPT, and return it. - If optional CONFIRM is non-nil, read the password twice to make sure. - diff --git a/itches/emacs/tracker.org b/itches/emacs/tracker.org index 7572d48..e87e552 100644 --- a/itches/emacs/tracker.org +++ b/itches/emacs/tracker.org @@ -378,62 +378,11 @@ The bug report snowballed into unconditionally, - my first patch committed [[https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-29&id=c4988840598b7da84b25d21a1936ce1ab6f6d666][in my own name]] 😲 *** minibuffer -**** TODO Add command to toggle password visibility -***** cover letter -Hello Emacs, - -On occasion, e.g. when saving .authinfo.gpg, I'd like to briefly peek at -the password I'm typing. Entering the password twice is an appreciated -safeguard, but I know I'm perfectly able to make the same typo twice in -a row; I'd love for read-passwd to offer a command to toggle the -password visibility. - -(I'm dismissing the "write it in the clear, then cut it and paste it" -solution, since I don't want to add the kill ring nor my desktop -environment's clipboard manager to the equation) - -I'm attaching a proof-of-concept. Additional considerations, in no -particular order: - -- For the binding, I wanted something easy to mash quickly, but - something more mnemonic might be in order? - -- Some applications out there show the password while the keyboard - shortcut (or the mouse button) remains pressed, and hide it back as - soon as it is released; I like the idea, but I have no idea whether - that's feasible with Emacs. - -- The (member …) check could be replaced with e.g. (get-char-property - (minibuffer-prompt-end) 'display); that's how I implemented it at - first. It would fail to turn hiding off when the user has not entered - anything though. - -- I don't know how much documentation this new command would warrant: - - - Should it be mentioned in read-passwd's docstring? C-u isn't now, - but it was way back when, before 2012-04-11 "* lisp/subr.el - (read-passwd): Use read-string." (088be6fbd2). - - - Should it be mentioned in the manual? delete-minibuffer-contents - is documented of course, but not under "(elisp) Reading a - Password". - - - a NEWS entry, maybe? AFAICT C-u was never announced there. - -(On a side-note, which might warrant another bug report, I wonder if -anything could be done to advertise read-passwd-map bindings more. -Sure, C-h b shows these bindings, but users have no reason to assume -that read-passwd has extra bindings in addition to regular minibuffer -ones, so why would they reach for C-h b?) - -Let me know if this sounds like something useful. If so, and if the -implementation is acceptable as-is, I'll work on documentation as soon -as I have a clearer idea of where I should add some (and whether some -documentation should be added for C-u as well). - -Thank you for your time. - -TODO:[[file:read-passwd-reveal.patch][attach]]. +**** TODO [[bug:69237]] Add command to toggle password visibility +:PROPERTIES: +:Role: watcher +:Kudos: Michael Albinus,implementing +:END: **** TODO Add completing read for links To harmonize ~org-open-at-point~'s =*Select Link*= & ~gnus-summary-browse-url~'s =URL to browse= prompts; allow matching on @@ -1033,7 +982,7 @@ Kludge: *** DONE +[[https://github.com/magit/magit/pull/4207][magit/magit#4207]]+ [[https://github.com/magit/magit/pull/4213][magit/magit#4213]] Autoload magit-file-mode-map correctly :PROPERTIES: :Role: author -:Kudos: tarsius +:Kudos: tarsius,fixing :END: The initial state of affairs: |
