GNU bug report logs - #35523
26.1.92; Please add "PIN" to password-word-equivalents

Previous Next

Package: emacs;

Reported by: Eric Hanchrow <eric.hanchrow <at> gmail.com>

Date: Wed, 1 May 2019 12:27:02 UTC

Severity: minor

Tags: fixed, patch

Found in version 26.1.92

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35523 in the body.
You can then email your comments to 35523 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#35523; Package emacs. (Wed, 01 May 2019 12:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eric Hanchrow <eric.hanchrow <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 01 May 2019 12:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eric Hanchrow <eric.hanchrow <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1.92; Please add "PIN" to password-word-equivalents
Date: Wed, 1 May 2019 08:25:41 -0400
[Message part 1 (text/plain, inline)]
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))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35523; Package emacs. (Wed, 01 May 2019 12:59:01 GMT) Full text and rfc822 format available.

Message #8 received at 35523 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Eric Hanchrow <eric.hanchrow <at> gmail.com>
Cc: 35523 <at> debbugs.gnu.org
Subject: Re: bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
Date: Wed, 01 May 2019 08:58:33 -0400
Eric Hanchrow <eric.hanchrow <at> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35523; Package emacs. (Wed, 01 May 2019 14:22:02 GMT) Full text and rfc822 format available.

Message #11 received at 35523 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: Eric Hanchrow <eric.hanchrow <at> gmail.com>, 35523 <at> debbugs.gnu.org
Subject: Re: bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
Date: Wed, 01 May 2019 15:21:25 +0100
Noam Postavsky <npostavs <at> gmail.com> writes:

> Eric Hanchrow <eric.hanchrow <at> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35523; Package emacs. (Wed, 01 May 2019 14:32:02 GMT) Full text and rfc822 format available.

Message #14 received at 35523 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> gmail.com
To: 35523 <at> debbugs.gnu.org
Cc: Eric Hanchrow <eric.hanchrow <at> gmail.com>
Subject: Re: bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
Date: Wed, 01 May 2019 10:31:22 -0400
[Message part 1 (text/plain, inline)]
[forwarding to list, please use "Reply All" to keep 35523 <at> debbugs.gnu.org on Cc]

[Message part 2 (message/rfc822, inline)]
From: Eric Hanchrow <eric.hanchrow <at> gmail.com>
To: Noam Postavsky <npostavs <at> 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
> 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.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35523; Package emacs. (Wed, 01 May 2019 14:58:01 GMT) Full text and rfc822 format available.

Message #17 received at 35523 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> gmail.com
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 35523 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>,
 Eric Hanchrow <eric.hanchrow <at> gmail.com>
Subject: Re: bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
Date: Wed, 01 May 2019 10:57:33 -0400
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> Noam Postavsky <npostavs <at> gmail.com> writes:
>
>> Eric Hanchrow <eric.hanchrow <at> 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).





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35523; Package emacs. (Wed, 01 May 2019 14:58:02 GMT) Full text and rfc822 format available.

Message #20 received at 35523 <at> debbugs.gnu.org (full text, mbox):

From: Eric Hanchrow <eric.hanchrow <at> gmail.com>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Noam Postavsky <npostavs <at> gmail.com>, 35523 <at> debbugs.gnu.org
Subject: Re: bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
Date: Wed, 1 May 2019 10:57:28 -0400
On Wed, May 1, 2019 at 10:21 AM Basil L. Contovounesios <contovob <at> tcd.ie> wrote:

> Would the function custom-reevaluate-setting be of use here?

That works beautifully; thanks!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35523; Package emacs. (Sat, 04 May 2019 17:43:02 GMT) Full text and rfc822 format available.

Message #23 received at 35523 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Eric Hanchrow <eric.hanchrow <at> gmail.com>
Cc: 35523 <at> debbugs.gnu.org
Subject: Re: bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
Date: Sat, 04 May 2019 13:42:02 -0400
[Message part 1 (text/plain, inline)]
severity 35523 minor
tags 35523 + patch
quit

Eric Hanchrow <eric.hanchrow <at> 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?

[0001-Add-pin-to-password-word-equivalents-Bug-35523.patch (text/x-diff, inline)]
From a5382d158fd2d047c73f018b6fc8d0a2888f57a0 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> 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


Severity set to 'minor' from 'wishlist' Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 04 May 2019 17:43:02 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 04 May 2019 17:43:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35523; Package emacs. (Thu, 06 Jun 2019 23:32:02 GMT) Full text and rfc822 format available.

Message #30 received at 35523 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Eric Hanchrow <eric.hanchrow <at> gmail.com>
Cc: 35523 <at> debbugs.gnu.org
Subject: Re: bug#35523: 26.1.92; Please add "PIN" to password-word-equivalents
Date: Thu, 06 Jun 2019 19:30:57 -0400
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





Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 06 Jun 2019 23:32:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 35523 <at> debbugs.gnu.org and Eric Hanchrow <eric.hanchrow <at> gmail.com> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 06 Jun 2019 23:32:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 05 Jul 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.