Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Cc: bug-gnu-emacs@gnu.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Thu, 24 Feb 2011 10:29:58 -0600	[thread overview]
Message-ID: <87fwrd2y61.fsf@lifelogs.com> (raw)
In-Reply-To: <jwvoc61zd1d.fsf-monnier+emacs@gnu.org>

On Thu, 24 Feb 2011 10:22:55 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote: 

SM> And when asking me whether to save the password (which it asks even
SM> tough the authentication fails :-() the prompt is again too verbose
SM> asking me

SM> "Add to .authinfo.gpg? (y)es/(n)o but use it/(e)dit line/(s)kip file"

SM> First, it's hard to parse, second I don't know what "no but use it"
SM> might mean, 

>> It means "don't write it to the file but remember the password."

SM> Just call it "(n)o", then (after all, the question is "Add to
SM> .authinfo.gpg?"); especially since you don't offer the option to not
SM> remember the password.

Should I offer that option?  I don't think it's useful.

>> You may want to edit the line in case you want to change it before it's
>> written.  Lars also thought this was not good but I feel strongly this
>> is useful functionality and it's not too intrusive.

SM> What's the advantage of editing it before (which requires this funky
SM> prompt, or an additional prompt) rather than after (which requires no
SM> special support)?  Why is Gnus the only application that finds this
SM> functionality useful enough to pester every user every time it asks for
SM> a password?

This is auth-source.el which is used by other Emacs libraries.  So it's
not a Gnus peculiarity, it's auth-source's.

I don't think the prompt is pestering.  This is supposed to be a rare
event.  You would edit the line so you don't have to edit the file
later, of course.  The special edit support here saves the user a
find-file later and doesn't interrupt the mental flow of "I entered some
info, now I want to review/edit/save/forget it."

I can add a "never edit, always save" and a "never edit, never save"
options through a customized variable to auth-source.  Would that work?

>> "Save password" does not describe what's going on fully.

SM> Why not?  Maybe the problem is that it does more.

That's not a problem.  We need to refine the prompts but I believe
auth-source.el is the only way (so far) to connect disparate storage
backends like netrc, Secrets API, and others.  The price for that
flexibility is that we don't just prompt for passwords.  If the search
has good defaults we will only prompt for passwords, e.g.

(auth-source-search :host "nonesuch" :user "tzz" :port "imap" :create t :max 1)

will prompt for just the password and the prompt will look good.

I'm trying hard to minimize the number of prompts and to streamline the
process.  I am willing to add the customizations to let users bypass the
whole process and hope it DTRT.

>> Maybe just "save to $file" would be better than "add to $file."

SM> Fine by me, tho in either case it would be good to hint at *what* is
SM> saved, so "save password" would be welcome.

"Save auth info to $file"?  We're saving authentication tokens and
connection parameters so I hope that summarizes it well.

>> The prompting could be, compared to the old 
>> "(y)es/(n)o but use it/(e)dit line/(s)kip file":

>> y/n/N/e/s/? => (y)es, save; (n)o but use the info; (N)o and don't use
>> the info and don't ask again; (e)dit the line; (s)kip this file.

>> I see two cases for (N): one, you want to use the password just entered
>> and don't want to be asked to *save* again;

SM> Yes, that would be the one I want to type.

I did this and added a ?? option.  That pops up a help window but I
think I'm doing something incorrectly because it doesn't get dismissed.
I added 

        (when (get-buffer-window bufname)
          (delete-window (get-buffer-window bufname)))

after the prompt but I think help-mode has a way to dismiss the help
window more readily.  It seems every Emacs package does this a little
differently from the others so I'm not sure what's the right way.

>> Do you think that skipping to the next file in auth-sources is not
>> useful?

SM> Definitely.

I've removed the ?s option in the prompt and pushed out the changes.

Thanks for your help.

Ted




  reply	other threads:[~2011-02-24 16:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <jwv8vxg7nt4.fsf-monnier+@gnu.org>
     [not found] ` <mailman.0.1298509609.2066.bug-gnu-emacs@gnu.org>
2011-02-24 12:50   ` Ted Zlatanov
2011-02-24 15:22     ` Stefan Monnier
2011-02-24 16:29       ` Ted Zlatanov [this message]
2011-02-25  4:29     ` Lars Magne Ingebrigtsen
2011-02-25 11:21       ` Ted Zlatanov
2011-02-25 11:50         ` Ted Zlatanov
2011-03-05 12:17         ` Lars Magne Ingebrigtsen
     [not found] ` <mailman.17.1299357452.24947.bug-gnu-emacs@gnu.org>
     [not found]   ` <874o7e23i8.fsf@lifelogs.com>
     [not found]     ` <mailman.2.1299548219.4111.bug-gnu-emacs@gnu.org>
     [not found]       ` <87lj0ptv9y.fsf@lifelogs.com>
2011-03-08 19:49         ` Ted Zlatanov
     [not found] <mailman.12.1297821996.25725.bug-gnu-emacs@gnu.org>
2011-02-16 18:29 ` Ted Zlatanov
2011-02-16 21:22   ` Stefan Monnier
2011-02-16 21:34     ` Michael Albinus
2011-02-16 22:08     ` Ted Zlatanov
2011-02-18  0:24       ` Lars Ingebrigtsen
2011-02-18  2:37         ` Stefan Monnier
2011-02-18  8:19           ` Lars Ingebrigtsen
2011-02-18 10:54           ` Steinar Bang
2011-02-18 20:16           ` Ted Zlatanov
2011-02-18 22:43             ` Stefan Monnier
2011-02-22 21:51               ` Ted Zlatanov
2011-02-18 23:04             ` Lars Ingebrigtsen
2011-02-22 22:46               ` Stefan Monnier
2011-02-16 21:26   ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fwrd2y61.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).