On Wed, 24 Aug 2022, Aner Zakobar wrote:
Hi! First timer here.
Welcome!
For your consideration, patch to add support for no-symbols password generation to Emacs. This currently is supported, but is not reflected in an interactive call, so I tended to do this through terminal.
Thanks. Your patch looks good. I am just wondering if adding a new option is better than adding the new command. What do you think about the following patch?
From d2165e27a946bed12a531897c5cf72c2f97b94b3 Mon Sep 17 00:00:00 2001
From: Tino Calancha <[email protected]> Date: Sat, 27 Aug 2022 20:59:44 +0200 Subject: [PATCH] emacs: Add option password-store-exclude-symbols When non-nil, exclude symbols when creating a new password. Default value is nil, i.e., symbols included. --- contrib/emacs/password-store.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/contrib/emacs/password-store.el b/contrib/emacs/password-store.el index 1d23090..5bafcef 100644 --- a/contrib/emacs/password-store.el +++ b/contrib/emacs/password-store.el @@ -46,6 +46,11 @@ :group 'password-store :type 'number) +(defcustom password-store-exclude-symbols nil + "Exclude symbols when creating a new password." + :group 'password-store + :type 'boolean) + (defcustom password-store-time-before-clipboard-restore (if (getenv "PASSWORD_STORE_CLIP_TIME") (string-to-number (getenv "PASSWORD_STORE_CLIP_TIME")) @@ -344,10 +349,12 @@ Default PASSWORD-LENGTH is `password-store-password-length'." (interactive (list (password-store--completing-read) (when current-prefix-arg (abs (prefix-numeric-value current-prefix-arg))))) - (unless password-length (setq password-length password-store-password-length)) ;; A message with the output of the command is not printed because ;; the output contains the password. - (password-store--run-generate entry password-length t) + (password-store--run-generate + entry + (or password-length password-store-password-length) + 'force password-store-exclude-symbols) nil) ;;;###autoload -- 2.30.2
