* bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
@ 2019-05-01 12:25 Eric Hanchrow
2019-05-01 12:58 ` Noam Postavsky
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Eric Hanchrow @ 2019-05-01 12:25 UTC (permalink / raw
To: 35523
[-- Attachment #1: Type: text/plain, Size: 6633 bytes --]
Where I work, I often run a command that prompts me like this:
PIN for erichan:
The current default value of comint-password-prompt-regexp doesn't hide
my typing, but I imagine it would if "PIN" were one of the elements of
password-word-equivalents.
In related news: it's surprisingly difficult to control this behavior by
simply customizing password-word-equivalents; afaict, that variable has
an effect only when comint.el loads, which appears to happen before my
custom file gets loaded. So I've had to resort to putting this into my
init file, which makes me sad:
;; Setting this in custom.el doesn't work, because that gets loaded
;; _after_ comint gets loaded :-| And this variable's entire purpose
;; in life is to affect the definition of
;; comint-password-prompt-regexp, which is defined with a defvar, and
;; defvars only have an effect the first time they're evaluated, which
;; has probably already happened. So we need to turn back the clock,
;; undefine that variable, and then re-run the defvar. Oy gott.
;; Also I refuse to glom something to the end of
;; comint-password-prompt-regexp, that's too horrible.
(progn
(setq password-word-equivalents
'("PIN" "password" "passcode" "passphrase" "pass phrase"))
(makunbound 'comint-password-prompt-regexp)
(load "comint"))
In GNU Emacs 26.1.92 (build 2, x86_64-pc-linux-gnu)
of 2019-04-09 built on dev-dsk-erichan-2c-d0f79429.us-west-2.amazon.com
Repository revision: 9e865ede793adf2cc10b92889050eddb1c8f1b40
Recent messages:
Searched 0/1 files
Searched 1/1 files
Navigate to definition
Mark saved where search started
Annotating...
Redisplaying annotation...done (Spanned from 9993.5 to 74.5 days old)
Annotating... done
Scanning for dabbrevs...done
dabbrev-expand: Search failed: "comint-password-prompt-regexp"
Scanning for dabbrevs...done
Configured using:
'configure --without-x'
Configured features:
SOUND GPM NOTIFY LIBSELINUX GNUTLS LIBXML2 ZLIB THREADS
Important settings:
value of $LC_ALL: en_US.UTF-8
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Shell
Minor modes in effect:
magit-auto-revert-mode: t
global-git-commit-mode: t
async-bytecomp-package-mode: t
projectile-mode: t
global-hl-line-mode: t
savehist-mode: t
global-flycheck-mode: t
pyvenv-mode: t
global-auto-revert-mode: t
shell-procfs-dirtrack-mode: t
recentf-mode: t
ido-everywhere: t
diff-auto-refine-mode: t
override-global-mode: t
tooltip-mode: t
global-eldoc-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
/home/erichan/.emacs.d/lisp/xr hides /home/erichan/.emacs.d/elpa/xr-1.11/xr
Features:
(shadow sort mail-extr emacsbug sendmail vc-annotate vc vc-dispatcher
dabbrev bug-reference magit-extras cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs misearch
multi-isearch magit-bookmark magit-submodule magit-obsolete magit-blame
magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch
magit-clone magit-remote magit-commit magit-sequence magit-notes
magit-worktree magit-tag magit-merge magit-branch magit-reset
magit-files magit-refs magit-status magit magit-repos magit-apply
magit-wip magit-log which-func magit-diff smerge-mode magit-core
magit-autorevert magit-margin magit-transient magit-process magit-mode
transient git-commit magit-git magit-section magit-utils crm log-edit
message rmc rfc822 mml mml-sec epa epg mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader pcvs-util add-log
with-editor async-bytecomp async server helpful imenu trace edebug
info-look shut-up f dash-functional elisp-refs loop projectile hl-line
term/xterm xterm elec-pair savehist twisted-mode work-log-mode flycheck
elisp-slime-nav bookmark edit-list pp highlight-indentation flymake-proc
flymake mwheel warnings company-capf company pcase help-fns radix-tree
elpy find-file-in-project ivy delsel colir color ivy-overlay ffap
thingatpt windmove elpy-shell pyvenv esh-var esh-io esh-cmd esh-opt
esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util
elpy-profile elpy-django s elpy-refactor subr-x python tramp-sh tramp
tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete
parse-time advice json map files-x etags xref project cus-edit cus-start
cus-load browse-kill-ring eww puny mm-url gnus nnheader gnus-util rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr
url-queue url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util mailcap shr image svg xml dom browse-url
format-spec ws-butler dired-subtree dired-hacks-utils dash wat derived
autorevert filenotify recentf tree-widget wid-edit ido vc-git diff-mode
ibuf-ext ibuffer ibuffer-loaddefs ibuf-macs cl time-date dired-x dired
dired-loaddefs grep compile comint ansi-color ring regexp-opt find-func
edmacro kmacro adaptive-wrap rotate cl-extra help-mode face-remap tls
gnutls use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core finder-inf info tool-bar package easymenu epg-config
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib rx mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type tabulated-list
replace newcomment text-mode elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow isearch timer select mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads inotify
multi-tty make-network-process emacs)
Memory information:
((conses 16 598710 54586)
(symbols 48 42411 3)
(miscs 40 1872 3816)
(strings 32 120990 17425)
(string-bytes 1 3967876)
(vectors 16 75804)
(vector-slots 8 1857278 229290)
(floats 8 422 2997)
(intervals 56 40959 11894)
(buffers 992 36)
(heap 1024 56248 16345))
[-- Attachment #2: Type: text/html, Size: 8575 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
2019-05-01 12:25 bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents Eric Hanchrow
@ 2019-05-01 12:58 ` Noam Postavsky
2019-05-01 14:21 ` Basil L. Contovounesios
2019-05-01 14:31 ` npostavs
2019-05-04 17:42 ` Noam Postavsky
2 siblings, 1 reply; 8+ messages in thread
From: Noam Postavsky @ 2019-05-01 12:58 UTC (permalink / raw
To: Eric Hanchrow; +Cc: 35523
Eric Hanchrow <eric.hanchrow@gmail.com> writes:
> Where I work, I often run a command that prompts me like this:
>
> PIN for erichan:
>
> The current default value of comint-password-prompt-regexp doesn't hide
> my typing, but I imagine it would if "PIN" were one of the elements of
> password-word-equivalents.
Yes, I agree it makes sense to add it.
> In related news: it's surprisingly difficult to control this behavior by
> simply customizing password-word-equivalents; afaict, that variable has
> an effect only when comint.el loads, which appears to happen before my
> custom file gets loaded.
You could try loading your custom file earlier, or loading comint
later. Otherwise, you can still avoid the extra load:
(when (boundp 'comint-password-prompt-regexp)
(setq password-word-equivalents
'("PIN" "password" "passcode" "passphrase" "pass phrase"))
;; Reset to new standard value.
(setq comint-password-prompt-regexp
(eval (car (get 'comint-password-prompt-regexp 'standard-value)))))
But yeah, defcustoms with computed default values can be troublesome.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
2019-05-01 12:58 ` Noam Postavsky
@ 2019-05-01 14:21 ` Basil L. Contovounesios
2019-05-01 14:57 ` Eric Hanchrow
2019-05-01 14:57 ` npostavs
0 siblings, 2 replies; 8+ messages in thread
From: Basil L. Contovounesios @ 2019-05-01 14:21 UTC (permalink / raw
To: Noam Postavsky; +Cc: Eric Hanchrow, 35523
Noam Postavsky <npostavs@gmail.com> writes:
> Eric Hanchrow <eric.hanchrow@gmail.com> writes:
>
>> In related news: it's surprisingly difficult to control this behavior by
>> simply customizing password-word-equivalents; afaict, that variable has
>> an effect only when comint.el loads, which appears to happen before my
>> custom file gets loaded.
>
> You could try loading your custom file earlier, or loading comint
> later. Otherwise, you can still avoid the extra load:
>
> (when (boundp 'comint-password-prompt-regexp)
> (setq password-word-equivalents
> '("PIN" "password" "passcode" "passphrase" "pass phrase"))
> ;; Reset to new standard value.
> (setq comint-password-prompt-regexp
> (eval (car (get 'comint-password-prompt-regexp 'standard-value)))))
Would the function custom-reevaluate-setting be of use here?
--
Basil
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
2019-05-01 12:25 bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents Eric Hanchrow
2019-05-01 12:58 ` Noam Postavsky
@ 2019-05-01 14:31 ` npostavs
2019-05-04 17:42 ` Noam Postavsky
2 siblings, 0 replies; 8+ messages in thread
From: npostavs @ 2019-05-01 14:31 UTC (permalink / raw
To: 35523; +Cc: Eric Hanchrow
[-- Attachment #1: Type: text/plain, Size: 82 bytes --]
[forwarding to list, please use "Reply All" to keep 35523@debbugs.gnu.org on Cc]
[-- Attachment #2: Type: message/rfc822, Size: 1408 bytes --]
From: Eric Hanchrow <eric.hanchrow@gmail.com>
To: Noam Postavsky <npostavs@gmail.com>
Subject: Re: bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
Date: Wed, 1 May 2019 09:06:02 -0400
Message-ID: <CAHZoxq_y82hEfArHr2PFz0c2RoTvDbWcX0mep8L9=9HEEZvn+Q@mail.gmail.com>
> You could try loading your custom file earlier, or loading comint
> later.
I considered that, but rejected it; it's not blindingly obvious how or
when comint gets loaded, and thus unclear how early I'd need to load
my custom file (nor what else I might break by moving its loading
around). I fear that juggling the timing like that would become an
endless game of whack-a-mole.
> Otherwise, you can still avoid the extra load:
>
> (when (boundp 'comint-password-prompt-regexp)
> (setq password-word-equivalents
> '("PIN" "password" "passcode" "passphrase" "pass phrase"))
> ;; Reset to new standard value.
> (setq comint-password-prompt-regexp
> (eval (car (get 'comint-password-prompt-regexp 'standard-value)))))
Aha, that must be deep "defvar" magic. I'd never heard of
'standard-value before.
I think I'll stick with reloading the whole library; it's clearer to me.
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
2019-05-01 14:21 ` Basil L. Contovounesios
@ 2019-05-01 14:57 ` Eric Hanchrow
2019-05-01 14:57 ` npostavs
1 sibling, 0 replies; 8+ messages in thread
From: Eric Hanchrow @ 2019-05-01 14:57 UTC (permalink / raw
To: Basil L. Contovounesios; +Cc: Noam Postavsky, 35523
On Wed, May 1, 2019 at 10:21 AM Basil L. Contovounesios <contovob@tcd.ie> wrote:
> Would the function custom-reevaluate-setting be of use here?
That works beautifully; thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
2019-05-01 14:21 ` Basil L. Contovounesios
2019-05-01 14:57 ` Eric Hanchrow
@ 2019-05-01 14:57 ` npostavs
1 sibling, 0 replies; 8+ messages in thread
From: npostavs @ 2019-05-01 14:57 UTC (permalink / raw
To: Basil L. Contovounesios; +Cc: Noam Postavsky, Eric Hanchrow, 35523
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
> Noam Postavsky <npostavs@gmail.com> writes:
>
>> Eric Hanchrow <eric.hanchrow@gmail.com> writes:
>>
>>> In related news: it's surprisingly difficult to control this behavior by
>>> simply customizing password-word-equivalents; afaict, that variable has
>>> an effect only when comint.el loads, which appears to happen before my
>>> custom file gets loaded.
>>
>> You could try loading your custom file earlier, or loading comint
>> later. Otherwise, you can still avoid the extra load:
>>
>> (when (boundp 'comint-password-prompt-regexp)
>> (setq password-word-equivalents
>> '("PIN" "password" "passcode" "passphrase" "pass phrase"))
>> ;; Reset to new standard value.
>> (setq comint-password-prompt-regexp
>> (eval (car (get 'comint-password-prompt-regexp 'standard-value)))))
>
> Would the function custom-reevaluate-setting be of use here?
Yes, that should work (unless there is an unwanted saved-value, I think
that only happens if you've customized and saved during the current
session).
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
2019-05-01 12:25 bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents Eric Hanchrow
2019-05-01 12:58 ` Noam Postavsky
2019-05-01 14:31 ` npostavs
@ 2019-05-04 17:42 ` Noam Postavsky
2019-06-06 23:30 ` Noam Postavsky
2 siblings, 1 reply; 8+ messages in thread
From: Noam Postavsky @ 2019-05-04 17:42 UTC (permalink / raw
To: Eric Hanchrow; +Cc: 35523
[-- Attachment #1: Type: text/plain, Size: 495 bytes --]
severity 35523 minor
tags 35523 + patch
quit
Eric Hanchrow <eric.hanchrow@gmail.com> writes:
> Where I work, I often run a command that prompts me like this:
>
> PIN for erichan:
>
> The current default value of comint-password-prompt-regexp doesn't hide
> my typing, but I imagine it would if "PIN" were one of the elements of
> password-word-equivalents.
So technicalities of (re)setting custom option values aside, anyone have
objections to adding "pin" to password-word-equivalents?
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1324 bytes --]
From a5382d158fd2d047c73f018b6fc8d0a2888f57a0 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sat, 4 May 2019 13:20:42 -0400
Subject: [PATCH] Add "pin" to password-word-equivalents (Bug#35523)
* lisp/international/mule-conf.el (password-word-equivalents): Add "pin".
---
lisp/international/mule-conf.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el
index c84dc819d1..69a505d306 100644
--- a/lisp/international/mule-conf.el
+++ b/lisp/international/mule-conf.el
@@ -1585,7 +1585,7 @@ (aset latin-extra-code-table ?\225 t)
(aset latin-extra-code-table ?\226 t)
(defcustom password-word-equivalents
- '("password" "passcode" "passphrase" "pass phrase"
+ '("password" "passcode" "passphrase" "pass phrase" "pin"
; These are sorted according to the GNU en_US locale.
"암호" ; ko
"パスワード" ; ja
@@ -1636,7 +1636,7 @@ (defcustom password-word-equivalents
English. Different case choices should not be assumed to be
included; callers should bind `case-fold-search' to t."
:type '(repeat string)
- :version "24.4"
+ :version "27.1"
:group 'processes)
;; The old code-pages library is obsoleted by coding systems based on
--
2.11.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
2019-05-04 17:42 ` Noam Postavsky
@ 2019-06-06 23:30 ` Noam Postavsky
0 siblings, 0 replies; 8+ messages in thread
From: Noam Postavsky @ 2019-06-06 23:30 UTC (permalink / raw
To: Eric Hanchrow; +Cc: 35523
tags 35523 fixed
close 35523 27.1
quit
> So technicalities of (re)setting custom option values aside, anyone have
> objections to adding "pin" to password-word-equivalents?
I guess not, pushed to master.
a14eb43215 2019-06-06T19:29:42-04:00 "Add "pin" to password-word-equivalents (Bug#35523)"
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=a14eb43215b5cbb99175d2b23f582011948b2eaa
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-06-06 23:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-01 12:25 bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents Eric Hanchrow
2019-05-01 12:58 ` Noam Postavsky
2019-05-01 14:21 ` Basil L. Contovounesios
2019-05-01 14:57 ` Eric Hanchrow
2019-05-01 14:57 ` npostavs
2019-05-01 14:31 ` npostavs
2019-05-04 17:42 ` Noam Postavsky
2019-06-06 23:30 ` Noam Postavsky
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.