Gnus development mailing list
 help / color / mirror / Atom feed
* Using the new auth-source
@ 2011-02-17 22:53 Lars Ingebrigtsen
  2011-02-17 23:06 ` Lars Ingebrigtsen
  2011-02-18  9:05 ` Steinar Bang
  0 siblings, 2 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2011-02-17 22:53 UTC (permalink / raw)
  To: ding

I've been busy the last few days, so I haven't pulled the new
auth-source stuff before now.

It's kinda confusing.  I'm first presented with this prompt:

Enter host for [USER?](imap.gmail.com imap.gmail.com):(143 993 imap imaps) (TAB to see the choices): 

TAB then completes to the host name?  And then it queries me for a user
name?  And then it queries me for the port!?  And then it asks me for
the password?

This is very confusing.  Why is it asking me for the host name and the
port number, when these are given by Gnus/nnimap?

This is in addition to all the credentials being in ~/.authinfo already,
so it shouldn't be asking me anything, really.

So it something broken in my setup, or is this how auth-info is supposed
to query people now?  And if so, why?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using the new auth-source
  2011-02-17 22:53 Using the new auth-source Lars Ingebrigtsen
@ 2011-02-17 23:06 ` Lars Ingebrigtsen
  2011-02-17 23:46   ` Lars Ingebrigtsen
  2011-02-18  9:05 ` Steinar Bang
  1 sibling, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2011-02-17 23:06 UTC (permalink / raw)
  To: ding

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Enter host for [USER?](imap.gmail.com imap.gmail.com):(143 993 imap
> imaps) (TAB to see the choices):

I've now fixed the double host name in nnimap.

> This is very confusing.  Why is it asking me for the host name and the
> port number, when these are given by Gnus/nnimap?

Edebugging the code, this is the culprit:

      (dolist (backend filtered-backends)
        (setq found-here (apply
                          (slot-value backend 'search-function)
                          :backend backend
                          :create create
                          :delete delete
                          spec))

It's doing two backends, ~/.authinfo.gpg and ~/.authinfo, and since the
first doesn't exist, it tries to create it.  So it should probably do a
two-pass thing without :create to see if any of them return credentials.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using the new auth-source
  2011-02-17 23:06 ` Lars Ingebrigtsen
@ 2011-02-17 23:46   ` Lars Ingebrigtsen
  2011-02-18 10:49     ` Steinar Bang
                       ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2011-02-17 23:46 UTC (permalink / raw)
  To: ding

Lars Ingebrigtsen <larsi@gnus.org> writes:

> It's doing two backends, ~/.authinfo.gpg and ~/.authinfo, and since the
> first doesn't exist, it tries to create it.  So it should probably do a
> two-pass thing without :create to see if any of them return credentials.

I've now implemented this, and it Works For Me.  Ted, could you look it
over and fix the bugs I (no doubt) introduced?  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using the new auth-source
  2011-02-17 22:53 Using the new auth-source Lars Ingebrigtsen
  2011-02-17 23:06 ` Lars Ingebrigtsen
@ 2011-02-18  9:05 ` Steinar Bang
  1 sibling, 0 replies; 11+ messages in thread
From: Steinar Bang @ 2011-02-18  9:05 UTC (permalink / raw)
  To: ding

Basically the same questions I asked myself yesterday. :-)




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using the new auth-source
  2011-02-17 23:46   ` Lars Ingebrigtsen
@ 2011-02-18 10:49     ` Steinar Bang
  2011-02-18 11:59     ` Raphael Kubo da Costa
  2011-02-18 20:22     ` Ted Zlatanov
  2 siblings, 0 replies; 11+ messages in thread
From: Steinar Bang @ 2011-02-18 10:49 UTC (permalink / raw)
  To: ding

>>>>> Lars Ingebrigtsen <larsi@gnus.org>:

> I've now implemented this, and it Works For Me.  Ted, could you look
> it over and fix the bugs I (no doubt) introduced?  :-)

Works for me as well, with only my old ~/.authinfo file present.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using the new auth-source
  2011-02-17 23:46   ` Lars Ingebrigtsen
  2011-02-18 10:49     ` Steinar Bang
@ 2011-02-18 11:59     ` Raphael Kubo da Costa
  2011-02-18 12:12       ` Katsumi Yamaoka
  2011-02-18 20:22     ` Ted Zlatanov
  2 siblings, 1 reply; 11+ messages in thread
From: Raphael Kubo da Costa @ 2011-02-18 11:59 UTC (permalink / raw)
  To: ding

Lars Ingebrigtsen wrote:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
> 
>> It's doing two backends, ~/.authinfo.gpg and ~/.authinfo, and since the
>> first doesn't exist, it tries to create it.  So it should probably do a
>> two-pass thing without :create to see if any of them return credentials.
> 
> I've now implemented this, and it Works For Me.  Ted, could you look it
> over and fix the bugs I (no doubt) introduced?  :-)

This commit (747da72a4e98056d9da1881012390a788ffdc0bd) makes me unable to 
log into my Gmail IMAP account.

I get the following warnings when byte-compiling Gnus:

In auth-source-search:
auth-source.el:581:39:Warning: reference to free variable `backend'
auth-source.el:567:31:Warning: assignment to free variable `backend'

Then when I start Gnus I immediately get the following error:

Warning: Unable to open server nnimap+Personal due to: Symbol's value as 
variable is void: backend




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using the new auth-source
  2011-02-18 11:59     ` Raphael Kubo da Costa
@ 2011-02-18 12:12       ` Katsumi Yamaoka
  2011-02-18 12:20         ` Raphael Kubo da Costa
  0 siblings, 1 reply; 11+ messages in thread
From: Katsumi Yamaoka @ 2011-02-18 12:12 UTC (permalink / raw)
  To: ding

Raphael Kubo da Costa <kubito@gmail.com> wrote:
> I get the following warnings when byte-compiling Gnus:

> In auth-source-search:
> auth-source.el:581:39:Warning: reference to free variable `backend'
> auth-source.el:567:31:Warning: assignment to free variable `backend'

Mee too.  I'm not sure of it but this seems to solve the problem:

--- auth-source.el~	2011-02-18 01:46:05.637646083 +0000
+++ auth-source.el	2011-02-18 12:09:34.784606979 +0000
@@ -511,5 +511,5 @@
                      collect (nth i spec)))
          (found (auth-source-recall spec))
-         filtered-backends accessor-key found-here goal matches)
+         backend filtered-backends accessor-key found-here goal matches)
 
     (if (and found auth-source-do-cache)



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using the new auth-source
  2011-02-18 12:12       ` Katsumi Yamaoka
@ 2011-02-18 12:20         ` Raphael Kubo da Costa
  2011-02-18 15:47           ` Raphael Kubo da Costa
  0 siblings, 1 reply; 11+ messages in thread
From: Raphael Kubo da Costa @ 2011-02-18 12:20 UTC (permalink / raw)
  To: ding

Katsumi Yamaoka wrote:

> Raphael Kubo da Costa <kubito@gmail.com> wrote:
>> I get the following warnings when byte-compiling Gnus:
> 
>> In auth-source-search:
>> auth-source.el:581:39:Warning: reference to free variable `backend'
>> auth-source.el:567:31:Warning: assignment to free variable `backend'
> 
> Mee too.  I'm not sure of it but this seems to solve the problem:
> 
> --- auth-source.el~	2011-02-18 01:46:05.637646083 +0000
> +++ auth-source.el	2011-02-18 12:09:34.784606979 +0000
> @@ -511,5 +511,5 @@
>                       collect (nth i spec)))
>           (found (auth-source-recall spec))
> -         filtered-backends accessor-key found-here goal matches)
> +         backend filtered-backends accessor-key found-here goal matches)
>  
>      (if (and found auth-source-do-cache)

I can confirm it solves the warnings ant the error I was getting. Now I get 
the following error when starting Gnus:

Unable to open server nnimap+Personal due to: Wrong type argument: (or 
eieio-object-p class-p), nil




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using the new auth-source
  2011-02-18 12:20         ` Raphael Kubo da Costa
@ 2011-02-18 15:47           ` Raphael Kubo da Costa
  2011-02-18 22:09             ` Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Raphael Kubo da Costa @ 2011-02-18 15:47 UTC (permalink / raw)
  To: ding

Raphael Kubo da Costa wrote:

> Katsumi Yamaoka wrote:
> 
>> Raphael Kubo da Costa <kubito@gmail.com> wrote:
>>> I get the following warnings when byte-compiling Gnus:
>> 
>>> In auth-source-search:
>>> auth-source.el:581:39:Warning: reference to free variable `backend'
>>> auth-source.el:567:31:Warning: assignment to free variable `backend'
>> 
>> Mee too.  I'm not sure of it but this seems to solve the problem:
>> 
>> --- auth-source.el~	2011-02-18 01:46:05.637646083 +0000
>> +++ auth-source.el	2011-02-18 12:09:34.784606979 +0000
>> @@ -511,5 +511,5 @@
>>                       collect (nth i spec)))
>>           (found (auth-source-recall spec))
>> -         filtered-backends accessor-key found-here goal matches)
>> +         backend filtered-backends accessor-key found-here goal matches)
>>  
>>      (if (and found auth-source-do-cache)
> 
> I can confirm it solves the warnings ant the error I was getting. Now I
> get the following error when starting Gnus:
> 
> Unable to open server nnimap+Personal due to: Wrong type argument: (or
> eieio-object-p class-p), nil

OK, so the problems seems to be here (in auth-source-search):

      ;; If we didn't find anything, then we allow the backend(s) to                                                                                                                                         
      ;; create the entries.                                                                                                                                                                                 
      (when (and create
                 (not matches))
        (let ((match (apply
                      (slot-value backend 'search-function)
                      :backend backend
                      :create create
                      :delete delete
                      spec)))
          (when match
            (push (list backend match) matches))))

`backend' should probably be referenced inside a loop (such as the `dolist' 
loop before the code I've pasted). OTOH, if I do enclose the `let' call in a 
(dolist backend filtered-backends), I am prompted twice for the same data 
here (I'm finally able to connect to the IMAP server, though).




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using the new auth-source
  2011-02-17 23:46   ` Lars Ingebrigtsen
  2011-02-18 10:49     ` Steinar Bang
  2011-02-18 11:59     ` Raphael Kubo da Costa
@ 2011-02-18 20:22     ` Ted Zlatanov
  2 siblings, 0 replies; 11+ messages in thread
From: Ted Zlatanov @ 2011-02-18 20:22 UTC (permalink / raw)
  To: ding

On Thu, 17 Feb 2011 15:46:23 -0800 Lars Ingebrigtsen <larsi@gnus.org> wrote: 

LI> Lars Ingebrigtsen <larsi@gnus.org> writes:
>> It's doing two backends, ~/.authinfo.gpg and ~/.authinfo, and since the
>> first doesn't exist, it tries to create it.  So it should probably do a
>> two-pass thing without :create to see if any of them return credentials.

LI> I've now implemented this, and it Works For Me.  Ted, could you look it
LI> over and fix the bugs I (no doubt) introduced?  :-)

I'll take a look ASAP and do the other prompt fixes we discussed, but
probably not today.

Ted




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Using the new auth-source
  2011-02-18 15:47           ` Raphael Kubo da Costa
@ 2011-02-18 22:09             ` Lars Ingebrigtsen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2011-02-18 22:09 UTC (permalink / raw)
  To: ding

Raphael Kubo da Costa <kubito@gmail.com> writes:

> `backend' should probably be referenced inside a loop (such as the `dolist' 
> loop before the code I've pasted). OTOH, if I do enclose the `let' call in a 
> (dolist backend filtered-backends), I am prompted twice for the same data 
> here (I'm finally able to connect to the IMAP server, though).

This should now be fixed.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-02-18 22:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-17 22:53 Using the new auth-source Lars Ingebrigtsen
2011-02-17 23:06 ` Lars Ingebrigtsen
2011-02-17 23:46   ` Lars Ingebrigtsen
2011-02-18 10:49     ` Steinar Bang
2011-02-18 11:59     ` Raphael Kubo da Costa
2011-02-18 12:12       ` Katsumi Yamaoka
2011-02-18 12:20         ` Raphael Kubo da Costa
2011-02-18 15:47           ` Raphael Kubo da Costa
2011-02-18 22:09             ` Lars Ingebrigtsen
2011-02-18 20:22     ` Ted Zlatanov
2011-02-18  9:05 ` Steinar Bang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).