GNU bug report logs - #36286
26.2.90; auth-source-creation-prompts has not effect?

Previous Next

Package: emacs;

Reported by: Xu Chunyang <mail <at> xuchunyang.me>

Date: Wed, 19 Jun 2019 06:53:01 UTC

Severity: minor

Tags: fixed

Found in version 26.2.90

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 36286 in the body.
You can then email your comments to 36286 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#36286; Package emacs. (Wed, 19 Jun 2019 06:53:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Xu Chunyang <mail <at> xuchunyang.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 19 Jun 2019 06:53:01 GMT) Full text and rfc822 format available.

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

From: Xu Chunyang <mail <at> xuchunyang.me>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.2.90; auth-source-creation-prompts has not effect?
Date: Wed, 19 Jun 2019 14:52:09 +0800
C-h f auth-source-search provides this example:

  (let ((auth-source-creation-defaults '((user . "defaultUser")
                                          (A    . "default A")))
         (auth-source-creation-prompts
          '((password . "Enter IMAP password for %h:%p: "))))
    (auth-source-search :host '("nonesuch" "twosuch") :type 'netrc :max 1
                        :P "pppp" :Q "qqqq"
                        :create '(A B Q)))

however I don't see any "Enter IMAP password ..." when I run the example
with C-x C-e, instead I see these prompts:

  [any port] user name for nonesuch [defaultUser]:
  [any port] password for defaultUser <at> nonesuch:
  Enter A (defaultUser <at> nonesuch:[any port]) [default A]: 

What format auth-source-creation-prompts should be? Its docstring
doesn't say.

By the way I can't help to complain auth-source's API is very difficult
to work with. Its docstring and info documentation is not very
helpful. For example, I can't understand how :require and :create in
auth-source-search works after struggling for 1 hour. And I can't get
auth-source-forget to work.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36286; Package emacs. (Thu, 20 Jun 2019 15:10:01 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Xu Chunyang <mail <at> xuchunyang.me>
Cc: 36286 <at> debbugs.gnu.org
Subject: Re: bug#36286: 26.2.90; auth-source-creation-prompts has not effect?
Date: Thu, 20 Jun 2019 11:08:59 -0400
Xu Chunyang <mail <at> xuchunyang.me> writes:

> C-h f auth-source-search provides this example:
>
>   (let ((auth-source-creation-defaults '((user . "defaultUser")
>                                           (A    . "default A")))
>          (auth-source-creation-prompts
>           '((password . "Enter IMAP password for %h:%p: "))))
>     (auth-source-search :host '("nonesuch" "twosuch") :type 'netrc :max 1
>                         :P "pppp" :Q "qqqq"
>                         :create '(A B Q)))
>
> however I don't see any "Enter IMAP password ..." when I run the
> example

Seems to works if I replace `password' with `secret'.

> with C-x C-e, instead I see these prompts:
>
>   [any port] user name for nonesuch [defaultUser]:
>   [any port] password for defaultUser <at> nonesuch:
>   Enter A (defaultUser <at> nonesuch:[any port]) [default A]: 
>
> What format auth-source-creation-prompts should be? Its docstring
> doesn't say.

It does actually mention secret in the paragraph above that example:

     If the user, host, or port are missing, the alist
    ‘auth-source-creation-prompts’ will be used to look up the
    prompts IN THAT ORDER (so the ‘user’ prompt will be queried first,
    then ‘host’, then ‘port’, and finally ‘secret’).

But having a broken example doesn't help.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36286; Package emacs. (Sat, 30 Jan 2021 10:12:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: Xu Chunyang <mail <at> xuchunyang.me>, 36286 <at> debbugs.gnu.org
Subject: Re: bug#36286: 26.2.90; auth-source-creation-prompts has not effect?
Date: Sat, 30 Jan 2021 11:10:52 +0100
Noam Postavsky <npostavs <at> gmail.com> writes:

>> C-h f auth-source-search provides this example:
>>
>>   (let ((auth-source-creation-defaults '((user . "defaultUser")
>>                                           (A    . "default A")))
>>          (auth-source-creation-prompts
>>           '((password . "Enter IMAP password for %h:%p: "))))
>>     (auth-source-search :host '("nonesuch" "twosuch") :type 'netrc :max 1
>>                         :P "pppp" :Q "qqqq"
>>                         :create '(A B Q)))
>>
>> however I don't see any "Enter IMAP password ..." when I run the
>> example
>
> Seems to works if I replace `password' with `secret'.

I've now done this in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 30 Jan 2021 10:12:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 36286 <at> debbugs.gnu.org and Xu Chunyang <mail <at> xuchunyang.me> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 30 Jan 2021 10:12:02 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. (Sat, 27 Feb 2021 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 57 days ago.

Previous Next


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