bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#8050: Gnus does not connect to my IMAP server any more


From: Ted Zlatanov
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Tue, 08 Mar 2011 15:57:10 -0600
User-agent: Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (gnu/linux)

On Tue, 08 Mar 2011 16:34:53 -0500 Stefan Monnier <monnier@IRO.UMontreal.CA> 
wrote: 

>> (case r
>> ('secret "%p password for user %u, host %h: ")
>> ('user "%p user name: ")
>> ('host "%p host name for user %u: ")
>> ('port "%p port for user %u and host %h: "))
>> (format "Enter %s (%%u@%%h:%%p): " r)))

>> Can you please propose specific replacements?

SM>          (case r
SM>            (secret "%p password for %u@%h: ")
SM>            (user "%p user name for %h: ")
SM>            (host "%p host name for user %u: ")
SM>            (port "%p port for %u@%h: "))
SM>          (format "Enter %s (%%u@%%h:%%p): " r)))

Great, thanks.  I added this.

SM> Notes:
SM> - I added the host name to the user prompt (usually the user name
SM>   may be different in different hosts for the same user, so most such
SM>   prompts do include a hostname/realm).
SM> - I left the user name in the host prompt, even though that sounds
SM>   backward to me (kind of like choosing the street number before the
SM>   street name).

That's the best we can do with default prompts.  The caller should use
something better since they know what they need already.

SM> - I removed the quotes which just made each of the branches be
SM>   acceptable when `r' has value `quote'.

Heh, I didn't see that.  Thanks for catching it.
         
>> I'll put something in.  This makes sense but is extra work for the
>> auth-source API users, unfortunately.

SM> I know, but the difference in user experience is enormous.

You're right, and thanks for making me do it right :)

>> It uses:
>> (while (not done)
>> (message "%s" prompt)
>> (setq k (read-char))
>> ...)

SM> And that leads to an absence of cursor in the minibuffer, even though
SM> it's fundamentally a prompt.  Why not copy y-or-n-p from subr.el as
SM> a starting point?
SM> If you can factor out the commonality, I'd be happy to provide
SM> a "prompt-maker" function and then define y-or-n-p in terms of that
SM> prompt-maker.

Can I really be the only one to need this?  Weird.  I actually used
`read-char-choice' first but XEmacs doesn't support it.  Perhaps Gnus
should provide a compatibility wrapper that uses it opportunistically.
Would you rather go the "prompt-maker" route?

I really like the way dropdown-list.el does selection (see
http://www.emacswiki.org/cgi-bin/wiki/dropdown-list.el, "overlays stolen
from company-mode.el").  It shows the list of choices inside the buffer
as a true popup.  To me that looks much better than y-or-n-p if the
terminal supports it.  If Emacs doesn't have anything similar, I think
it's a nice addition to the core UI functionality.  Let me know and I'll
propose it on emacs-devel if necessary.

Ted


reply via email to

[Prev in Thread] Current Thread [Next in Thread]