On Wed, 23 Feb 2011 15:36:40 -0800 Lars Ingebrigtsen wrote: LI> Ted Zlatanov writes: LI> It needs to ask for the user name, too, doesn't it? >> >> Maybe. Right now it's guessed. People seem to prefer fewer prompts and >> you can always `e'dit the line afterwards. I mentioned that in my reply >> to Simon Josefsson just now, too. LI> It needs to prompt for the user name. I mean, really. It needs to. LI> Otherwise most people will not have a working setup if they connect to LI> gmail, for instance. OK. I added a user name prompt and removed that default. The default prompts are not great but should be OK. I wrote `auth-source-format-prompt' in the attached patch because I don't want to depend on all the Gnus format spec stuff. I figured it was a simple enough task and it seems to work. On Wed, 23 Feb 2011 15:35:34 -0800 Lars Ingebrigtsen wrote: LI> Ted Zlatanov writes: >> It should have said "Password for [any user]@foo:imap?" and I guess >> that's a bug (fix just went in) . The "any user" and "any port" part is >> necessary IMO to make the intent clear. >> >> If the port is numeric your proposal is not so good: >> >> "143 password at foo: " LI> But it'll never be "143 password" -- since "imap" is first in the list. LI> It's a good point, though -- I think it would be way more readable if LI> there's a parameter to auth-source that lets the caller specify what LI> we're asking the user for. LI> So a :service "IMAP" would be nice, and then you can just drop showing LI> the port number at all. Yeah, that sounds good. I don't like that it pollutes the search spec, though. How about something like (let ((auth-source-creation-prompts '(user "IMAP user name for %h? "))) ... auth-source-search invocation ... Remember we support more than user, host, port, and password. The query string can have any parameter and the prompts need to support it. I attach a patch that does all this. See what you think. >> The user doesn't necessarily know to edit the .authinfo file. He may >> not even know what that is. LI> The prompt asks whether to save it to the .authinfo.gpg file, so the LI> user knows that it exists. It's a very easily readable file, so 1) the LI> user knows it exists, 2) the user can open it all they want, and 3) they LI> can edit it trivially, if they so choose. LI> Instead they're faced with this rather complex choice where any normal LI> user will surmise that they're somehow supposed to edit the line for LI> Gnus to work. And that's not good. The problem is, I don't know how to make it less complex and don't want to make it less functional. Ted