Ethan Glasser-Camp <ethan.glasser.c...@gmail.com> writes:

> Hi!

Hi Ethan,

> In `emacs -Q`, I tried loading the new version of `auth-info-password
> ` but I'm not sure I did it right. I did the following in `*scratch*`:

In "emacs -Q", no password is created automagically, for a reason. Move
your init file away, and call "emacs" instead.

> (setq auth-sources (cons "secrets:Login" auth-sources))
> ("secrets:Login" "~/.authinfo" "~/.authinfo.gpg" "~/.netrc")

That's different from what I have recommended for test. Please use
(setq auth-sources '("secrets:Login")) instead, we don't want to be
intermixed with "~/.authinfo" actions.

> (setq auth-source-debug t
>       auth-source-save-behavior 'ask
>       secrets-debug t)
> t
>
> (defun auth-info-password (auth-info)
>   "Return the :secret password from the AUTH-INFO."
>   (let ((secret (plist-get auth-info :secret)))
>     (while (functionp secret)
>       (setq secret (funcall secret)))
>     secret))
> auth-info-password

Fine. And to be *really* sure, call also "M-x auth-source-forget-all-cached",
before you open "/sudo::".

> Ethan

Best regards, Michael.

Reply via email to