GNU bug report logs - #8050
Gnus does not connect to my IMAP server any more

Previous Next

Packages: emacs, gnus;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Wed, 16 Feb 2011 01:46:02 UTC

Severity: normal

Found in version 24.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

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 8050 in the body.
You can then email your comments to 8050 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8050; Package emacs. (Wed, 16 Feb 2011 01:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 16 Feb 2011 01:46:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: Gnus does not connect to my IMAP server any more
Date: Tue, 15 Feb 2011 20:54:32 -0500
Package: Emacs
Version: 24.0.50

When I start Gnus, it seems to try and connect to my IMAP server but
never asks for my password (which I don't save in authinfo.gpg).
In just ends up saying "done", but the *Server* buffer says "offline".
If I try to use O in the *Server* buffer, it switches instantly to
"opened" but if I try to do anything that involves the IMAP server,
I get (wrong-type-argument arrayp nil) errors because nnimap-object
is nil.

The *Message* buffer says:

auth-source-search: found 2 backends matching (:max 1 :host "news2.teksavvy.com" :port ("119" "nntp"))
auth-source-search: found 0 results (max 1/1) in [object auth-source-backend "~/.authinfo.gpg" netrc "~/.authinfo.gpg" t t t auth-source-netrc-create auth-source-netrc-search] matching (:max 1 :host "news2.teksavvy.com" :port ("119" "nntp"))
auth-source-search: found 0 results (max 1/1) in [object auth-source-backend "~/.authinfo" netrc "~/.authinfo" t t t auth-source-netrc-create auth-source-netrc-search] matching (:max 1 :host "news2.teksavvy.com" :port ("119" "nntp"))
Reading /home/monnier/var/newsrc.eld...
Checking new news...
Opening connection to imap.iro.umontreal.ca via tls...
Opening TLS connection to `imap.iro.umontreal.ca'...
Opening TLS connection with `gnutls-cli --insecure -p imaps imap.iro.umontreal.ca'...done
Opening TLS connection to `imap.iro.umontreal.ca'...done
auth-source-search: found 2 backends matching (:max 1 :host ("diro" "imap.iro.umontreal.ca") :port ("143" "993" "imap" "imaps") :create nil)
auth-source-search: found 0 results (max 1/1) in [object auth-source-backend "~/.authinfo.gpg" netrc "~/.authinfo.gpg" t t t auth-source-netrc-create auth-source-netrc-search] matching (:max 1 :host ("diro" "imap.iro.umontreal.ca") :port ("143" "993" "imap" "imaps") :create nil)
auth-source-search: found 0 results (max 1/1) in [object auth-source-backend "~/.authinfo" netrc "~/.authinfo" t t t auth-source-netrc-create auth-source-netrc-search] matching (:max 1 :host ("diro" "imap.iro.umontreal.ca") :port ("143" "993" "imap" "imaps") :create nil)
auth-source-search: found 2 backends matching (:max 1 :host "news.gmane.org" :port ("119" "nntp"))
auth-source-search: found 0 results (max 1/1) in [object auth-source-backend "~/.authinfo.gpg" netrc "~/.authinfo.gpg" t t t auth-source-netrc-create auth-source-netrc-search] matching (:max 1 :host "news.gmane.org" :port ("119" "nntp"))
auth-source-search: found 0 results (max 1/1) in [object auth-source-backend "~/.authinfo" netrc "~/.authinfo" t t t auth-source-netrc-create auth-source-netrc-search] matching (:max 1 :host "news.gmane.org" :port ("119" "nntp"))
Reading active file from eso via nntp...
Opening nntp server on eso...
auth-source-search: found 2 backends matching (:max 1 :host "news.eternal-september.org" :port ("119" "nntp"))
auth-source-search: found 0 results (max 1/1) in [object auth-source-backend "~/.authinfo.gpg" netrc "~/.authinfo.gpg" t t t auth-source-netrc-create auth-source-netrc-search] matching (:max 1 :host "news.eternal-september.org" :port ("119" "nntp"))
auth-source-search: found 0 results (max 1/1) in [object auth-source-backend "~/.authinfo" netrc "~/.authinfo" t t t auth-source-netrc-create auth-source-netrc-search] matching (:max 1 :host "news.eternal-september.org" :port ("119" "nntp"))
Opening nntp server on eso...done
Reading active file from diro via nnimap...done
Reading active file via nndraft...done
Checking new news...done




In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2011-02-15 on pastel
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
configured using `configure  '--enable-maintainer-mode' 'CFLAGS=-Wall -Wno-pointer-sign -DUSE_LISP_UNION_TYPE -DSYNC_INPUT -DENABLE_CHECKING -DXASSERTS -DFONTSET_DEBUG -g -O1 -I/usr/include/GNUstep' '--with-x-toolkit=lucid''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: fr_CH.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Group

Minor modes in effect:
  gnus-undo-mode: t
  electric-pair-mode: t
  electric-indent-mode: t
  url-handler-mode: t
  global-reveal-mode: t
  reveal-mode: t
  auto-insert-mode: t
  savehist-mode: t
  minibuffer-electric-default-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
^ <down> <down> <down> <down> O <up> C <up> O <up> 
C-x 5 b * M e <tab> <return> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> q <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> M-x r e p - e m - b u <tab> <return
>

Recent messages:
Reading active file from diro via nnimap...done
Reading active file via nndraft...done
Checking new news...done
Opening connection to imap.iro.umontreal.ca via tls...
Opening TLS connection to `imap.iro.umontreal.ca'...
Opening TLS connection with `gnutls-cli --insecure -p imaps imap.iro.umontreal.ca'...done
Opening TLS connection to `imap.iro.umontreal.ca'...done
auth-source-search: found 2 backends matching (:max 1 :host ("diro" "imap.iro.umontreal.ca") :port ("143" "993" "imap" "imaps") :create nil)
auth-source-search: found 0 results (max 1/1) in [object auth-source-backend "~/.authinfo.gpg" netrc "~/.authinfo.gpg" t t t auth-source-netrc-create auth-source-netrc-search] matching (:max 1 :host ("diro" "imap.iro.umontreal.ca") :port ("143" "993" "imap" "imaps") :create nil)
auth-source-search: found 0 results (max 1/1) in [object auth-source-backend "~/.authinfo" netrc "~/.authinfo" t t t auth-source-netrc-create auth-source-netrc-search] matching (:max 1 :host ("diro" "imap.iro.umontreal.ca") :port ("143" "993" "imap" "imaps") :create nil)

Load-path shadows:
/usr/share/emacs23/site-lisp/bbdb/bbdb hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb
/usr/share/emacs23/site-lisp/bbdb/bbdb-mhe hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-mhe
/usr/share/emacs23/site-lisp/bbdb/bbdb-gnus hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-gnus
/usr/share/emacs23/site-lisp/bbdb/bbdb-migrate hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-migrate
/usr/share/emacs23/site-lisp/bbdb/bbdb-sc hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-sc
/usr/share/emacs23/site-lisp/bbdb/bbdb-snarf hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-snarf
/usr/share/emacs23/site-lisp/bbdb/bbdb-w3 hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-w3
/usr/share/emacs23/site-lisp/bbdb/bbdb-gui hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-gui
/usr/share/emacs23/site-lisp/bbdb/bbdb-print hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-print
/usr/share/emacs23/site-lisp/bbdb/bbdb-rmail hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-rmail
/usr/share/emacs23/site-lisp/bbdb/bbdb-vm hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-vm
/usr/share/emacs23/site-lisp/bbdb/bbdb-ftp hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-ftp
/usr/share/emacs23/site-lisp/bbdb/bbdb-merge hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-merge
/usr/share/emacs23/site-lisp/bbdb/bbdb-whois hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-whois
/usr/share/emacs23/site-lisp/bbdb/bbdb-com hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-com
/usr/share/emacs23/site-lisp/bbdb/bbdb-hooks hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-hooks

Features:
(shadow sort mail-extr emacsbug url-util nnfolder nndraft nnmh nnagent
nnml nnimap parse-time utf7 gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime
smime dig mailcap nntp proto-stream starttls tls gnus-cache nnir
gnus-sum macroexp nnoo gnus-group gnus-undo nnmail mail-source
format-spec server gnus-start gnus-spec gnus-int gnus-range message
sendmail rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader
gnus-win gnus gnus-ems nnheader mail-utils wid-edit noutline outline
easy-mmode flyspell ispell eldoc checkdoc regexp-opt thingatpt help-mode
easymenu view prog-mode electric url-handlers url-parse auth-source
warnings eieio byte-opt bytecomp byte-compile assoc netrc gnus-util
time-date password-cache url-vars mm-util mail-prsvr reveal autoinsert
uniquify advice help-fns advice-preload savehist minibuf-eldef cl
cl-loaddefs proof-site proof-autoloads pg-vars bbdb-autoloads agda2
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image fringe lisp-mode register page newcomment menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting x-toolkit x multi-tty emacs)




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Wed, 16 Feb 2011 21:15:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: bug-gnu-emacs <at> gnu.org, Ding Mailing List <ding <at> gnus.org>
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Wed, 16 Feb 2011 16:22:49 -0500
> I think this is fixed in the Gnus trunk as far as the auth-source
> credentials go (Lars will have to fix the nnimap code failure on empty
> credentials).

I'll try again and let you know of remaining problems.

> I have two usability questions (cross-posting to the Gnus mailing list):

> 1) should we have a global override to say "never add netrc entries", or
> should the prompt be Y/N/y/n instead of just y-or-n-p, or should the
> save question be asked only once per file, or something else?

I used to always hit "y" to the question "remember the password", and
now I simply always hit "n" to the question "save the password in
.authinfo.gpg", so it's no worse than in Emacs-23.

If hitting "n" once will remember not to prompt ever again, the only
downside I can see is if someone later decides to change her mind, so we
should have a simple way to say revert the decision in the future.
Maybe the password prompt itself could somehow provide the ability to
say "RET + save", tho it's more important for this feature to be easy to
find than to be quick.

> 2) should auth-source let-bind the password-cache timeout to something
> larger?  The default is pretty short and for auth-source I think at
> least 30 minutes are reasonable.  It could be a customizable integer.

I'm not sure what this entails, but until now, Emacs has been caching my
password for the whole session (typically several days) and
I like that.  I would not want to have to re-enter my password every
half hour.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Wed, 16 Feb 2011 21:18:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <lmi <at> gnus.org>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: 8050 <at> debbugs.gnu.org, Ding Mailing List <ding <at> gnus.org>
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Wed, 16 Feb 2011 13:26:07 -0800
Ted Zlatanov <tzz <at> lifelogs.com> writes:

> I think this is fixed in the Gnus trunk as far as the auth-source
> credentials go (Lars will have to fix the nnimap code failure on empty
> credentials).

What's a good test case to tickle the bug?

> I have two usability questions (cross-posting to the Gnus mailing list):
>
> 1) should we have a global override to say "never add netrc entries", or
> should the prompt be Y/N/y/n instead of just y-or-n-p, or should the
> save question be asked only once per file, or something else?

Hm...  if you look at how Firefox deals with this, it asks something
like "save password, don't save now, never save for this host", and I
think that's pretty nice, UX wise.  But there isn't a "never ask me
about saving passwords for any hosts ever again", I think?

> 2) should auth-source let-bind the password-cache timeout to something
> larger?  The default is pretty short and for auth-source I think at
> least 30 minutes are reasonable.  It could be a customizable integer.

I'd prefer a longer timeout than 30 minutes as the default.  Perhaps two
hours? 

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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Wed, 16 Feb 2011 21:26:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Ted Zlatanov <tzz <at> lifelogs.com>, bug-gnu-emacs <at> gnu.org,
	Ding Mailing List <ding <at> gnus.org>
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Wed, 16 Feb 2011 22:34:19 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> 2) should auth-source let-bind the password-cache timeout to something
>> larger?  The default is pretty short and for auth-source I think at
>> least 30 minutes are reasonable.  It could be a customizable integer.
>
> I'm not sure what this entails, but until now, Emacs has been caching my
> password for the whole session (typically several days) and
> I like that.  I would not want to have to re-enter my password every
> half hour.

If auth-source documents its usage of `password-cache-expiry' properly,
it shall be sufficient. I do not like packages, which overwrite my own
settings :-)

>         Stefan

Best regards, Michael.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Fri, 18 Feb 2011 00:26:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: bug-gnu-emacs <at> gnu.org, ding <at> gnus.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Thu, 17 Feb 2011 16:24:57 -0800
Ted Zlatanov <tzz <at> lifelogs.com> writes:

>>> I think this is fixed in the Gnus trunk as far as the auth-source
>>> credentials go (Lars will have to fix the nnimap code failure on empty
>>> credentials).
>
> LMI> What's a good test case to tickle the bug?
>
> Make `nnimap-credentials' return (nil nil).

I've now fixed this part, I think.

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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Fri, 18 Feb 2011 02:38:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Ted Zlatanov <tzz <at> lifelogs.com>, bug-gnu-emacs <at> gnu.org, ding <at> gnus.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Thu, 17 Feb 2011 21:37:35 -0500
>>>> I think this is fixed in the Gnus trunk as far as the auth-source
>>>> credentials go (Lars will have to fix the nnimap code failure on empty
>>>> credentials).

With today's code, I could connect again, thank you.
But the prompts are poor:
- for the user name, the prompt says something like "[USER?]diro:143",
  which is very cryptic.  While I know why there's a "143" there,
  there's no reason to expect users to know that (my .gnus doesn't
  mention any port number).  Worse: I really have no clue what the "USER?"
  is about.
- for the password, the prompt again mentioned 143, which I also thing
  is not warranted.
- then I get prompted to save the password, which is the worst of the
  three:
  - the prompt is *very* long (more than 80 chars).
  - it includes the password in cleartext (WTF?).
  - none of the extra data is really something I care about when
    deciding whether I want to save my password in .authinfo.gpg.
    It's just distracting from the main issue.


-- Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Fri, 18 Feb 2011 08:21:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Ted Zlatanov <tzz <at> lifelogs.com>, bug-gnu-emacs <at> gnu.org, ding <at> gnus.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Fri, 18 Feb 2011 00:19:58 -0800
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> But the prompts are poor:
> - for the user name, the prompt says something like "[USER?]diro:143",
>   which is very cryptic.  While I know why there's a "143" there,
>   there's no reason to expect users to know that (my .gnus doesn't
>   mention any port number).  Worse: I really have no clue what the "USER?"
>   is about.

Yes, it's quite cryptic.

The prompts should simply be

"User name for diro:imap: "

and 

"Password for diro:imap: "

Or something like that.  Well, really, the host name should be the
(real) fully qualified host name, if possible, but that may not be
feasible.

> - then I get prompted to save the password, which is the worst of the
>   three:

Yes, it should just say "Save the password for future sessions? " and
not much more.

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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Fri, 18 Feb 2011 20:46:02 GMT) Full text and rfc822 format available.

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

From: Ted Zlatanov <tzz <at> lifelogs.com>
To: bug-gnu-emacs <at> gnu.org
Cc: ding <at> gnus.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Fri, 18 Feb 2011 14:16:03 -0600
On Thu, 17 Feb 2011 21:37:35 -0500 Stefan Monnier <monnier <at> iro.umontreal.ca> wrote: 

SM> - for the user name, the prompt says something like "[USER?]diro:143",
SM>   which is very cryptic.  While I know why there's a "143" there,
SM>   there's no reason to expect users to know that (my .gnus doesn't
SM>   mention any port number).  Worse: I really have no clue what the "USER?"
SM>   is about.
SM> - for the password, the prompt again mentioned 143, which I also thing
SM>   is not warranted.
SM> - then I get prompted to save the password, which is the worst of the
SM>   three:
SM>   - the prompt is *very* long (more than 80 chars).
SM>   - it includes the password in cleartext (WTF?).

Yeah, I see now it was a mistake the way I did it.

SM>   - none of the extra data is really something I care about when
SM>     deciding whether I want to save my password in .authinfo.gpg.
SM>     It's just distracting from the main issue.

I *very much* care what goes into that file and want to see the exact
text.  So find my proposal to accomodate normal and obsessive users
alike below :)

On Fri, 18 Feb 2011 00:19:58 -0800 Lars Ingebrigtsen <larsi <at> gnus.org> wrote: 

LI> The prompts should simply be

LI> "User name for diro:imap: "

LI> and 

LI> "Password for diro:imap: "

LI> Or something like that.  Well, really, the host name should be the
LI> (real) fully qualified host name, if possible, but that may not be
LI> feasible.

OK, I'll work on improving those prompts.

>> - then I get prompted to save the password, which is the worst of the
>> three:

LI> Yes, it should just say "Save the password for future sessions? " and
LI> not much more.

How about:

"Save the $HOSTNAME password for future sessions? y/n/s/?"

where `s' shows the line we will add with the password replaced by ****?

Ted





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Fri, 18 Feb 2011 22:44:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: bug-gnu-emacs <at> gnu.org, ding <at> gnus.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Fri, 18 Feb 2011 17:43:13 -0500
>>> - then I get prompted to save the password, which is the worst of the
>>> three:
LI> Yes, it should just say "Save the password for future sessions? " and
LI> not much more.

> How about:

> "Save the $HOSTNAME password for future sessions? y/n/s/?"

The previous prompt included the ~/.authinfo.gpg file name which
I thought was good.  On the contrary, the hostname info seems redundant
since it's already been displayed by the previous 2 prompts.

> where `s' shows the line we will add with the password replaced by ****?

Here are some ways to handle the "showing the line":
1- show it in the prompt: loud, noisy, and worst of all, shows the
   password in the clear, right after you entered it via `read-passwd'
   which was careful to keep it hidden.
2- Add an `s' option to the prompt.
3- Add a second prompt (when if the user selected `y') to confirm the
   actual text that will be saved.  Can be kind of a pain for the user,
   but presumably, password aren't saved all the time.
4- not show it at all, let the user visit the file afterwards to see
   what happened if he wants to.

1 is out.  2 seems like a lot of trouble compared to using y-or-n-p
(tho, if you add an `N' option anyway to remember not to prompt next
time, the extra work is already done).  3 might be a bit annoying to
some of the users (especially those who want to save the password but
don't want to have it displayed).  4 seemed sufficient to me, but
apparently YMMV.
So yes, I'd vote for 2 or 4 (as the coder, I'd choose 4 ;-)


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Fri, 18 Feb 2011 23:07:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: bug-gnu-emacs <at> gnu.org, ding <at> gnus.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Fri, 18 Feb 2011 15:04:32 -0800
Ted Zlatanov <tzz <at> lifelogs.com> writes:

> I *very much* care what goes into that file and want to see the exact
> text.  So find my proposal to accomodate normal and obsessive users
> alike below :)

I think this is like a debugging thing.  Emacs shouldn't be a platform
to debug the applications running in it.  It should just run the
applications.  :-)

As a user, I don't care, and I shouldn't care about what format the
application stores the information in.  So even putting that option in
the prompt gives a bad User eXperience, in my opinion.  It's just
confusing.

Displaying irrelevant info is almost as bad as not displaying info the
user needs.  (Note "user", not "implementer".  :-)

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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Tue, 22 Feb 2011 22:48:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Ted Zlatanov <tzz <at> lifelogs.com>, bug-gnu-emacs <at> gnu.org, ding <at> gnus.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Tue, 22 Feb 2011 17:46:56 -0500
>> I *very much* care what goes into that file and want to see the exact
>> text.  So find my proposal to accomodate normal and obsessive users
>> alike below :)

> I think this is like a debugging thing.  Emacs shouldn't be a platform
> to debug the applications running in it.  It should just run the
> applications.  :-)

Indeed.  It's a great feature of Emacs that it is good at development an
debugging of its own code, but that shouldn't be imposed on the user.

The latest update brought in even worse behavior, BTW.  Now I get the
following prompts, in a kind of "battle for the worst prompt":
- first prompt asks me to choose the host, something like
  "host for [USER]@(diro imap.iro.umontreal.ca):(143 997 imap imap): "
  WTF?  For reference the relevant part of my gnus-secondary-select-methods
  says:
        (nnimap "diro"
                (nnimap-address "imap.iro.umontreal.ca")
                (nnimap-stream tls))

  This is a brand new prompt, which earlier Gnus could answer on its own.
- then comes the prompt for the user (which looks ugly, but at least
  makes some amount of sense, tho I guess I should change my .gnus to
  provide this info directly in gnus-secondary-select-methods).
- third prompt asks for the port to use (143 997 imap imaps).
  Again, that's a new prompt which earlier Gnus could answer on its own.
  It's slightly less hideous than the first prompt, and comes with
  the same comical completion feature (I love completion, as you may
  guess, but when it's for something which the user should not have to
  indicate at all, and for some users it's even something they don't
  know...).
- finally the real prompt for the password comes up (still looking
  pretty ugly).  Will I ever get back a simple "Password for
  monnier <at> diro: "?
- then comes one more prompt to ask me if I want to save the password,
  and this prompt is as long and ugly as last time, tho it at least
  keeps the password hidden (but taking up space nonetheless).
  The prompt I'd like here is just what we had ealier:
  "Save password in .authinfo.gpg?".

All those prompts are *long* which is *bad*.
I know that nowadays Emacs can usually resize the minibuffer on the fly,
but that's no reason to use long prompts which do nothing more than slow
the user down trying to figure out what the hell he's supposed to do.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Thu, 24 Feb 2011 01:04:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 8050 <at> debbugs.gnu.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Wed, 23 Feb 2011 20:03:10 -0500
The new code shows much fewer prompts, but now I can't connect any more.
The problem is that among the prompts it doesn't show me any more, the
"username" prompt is now missing, so Gnus then asks me

 "Password for [any user]@(imap.iro.umontreal.ca diro):(143 997 imap imaps): "

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

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

First, it's hard to parse, second I don't know what "no but use it"
might mean, I don't know what "line" I might want to "edit" (nor why
it's related to saving a password), and neither do I know what means
"skip file".  Please make it just "Save password to .authinfo.gpg? [y/n/N/?]"
or something short and simple like that.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Thu, 24 Feb 2011 15:24:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: bug-gnu-emacs <at> gnu.org, Ding Mailing List <ding <at> gnus.org>
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Thu, 24 Feb 2011 10:22:55 -0500
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."

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

SM> I don't know what "line" I might want to "edit" (nor why it's
SM> related to saving a password), 

> authinfo/netrc files are line-based.

That's an irrelevant detail.  Obviously those files store several
passwords, so they contain a "list/set" of "entries".  Whether those
entries are represented by a single line doesn't matter (you'd still
want to be able to see/edit the whole record even if it was represented
by a multi-line chunk of text or some fixed-length binary
representation, or whathaveyou).

> 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.

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

SM> and neither do I know what means "skip file".
> It means "go to the next source in the auth-sources list, I don't want
> to change this one."

Then it's not "skip file" but "other file".

SM> Please make it just "Save password to .authinfo.gpg?  [y/n/N/?]"  or
SM> something short and simple like that.

> I was trying to avoid the help popup but you're right the prompt is too
> verbose.

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

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

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

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

> 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;

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

> two, you don't want to use the password

I don't know what that could mean.  The user has just gone through the
trouble of typing the password, so surely she wants to use it somehow.
The other N I can think of is "don't remember this password even in this
session", which corresponds to one of the 2 options in Emacs-23 (where
you had no option to save the password, but you had to choose between
"save for the session" or "not save for the session").

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

Definitely.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Fri, 25 Feb 2011 04:54:01 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <lmi <at> gnus.org>
To: 8050 <at> debbugs.gnu.org
Cc: Ding Mailing List <ding <at> gnus.org>
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Thu, 24 Feb 2011 20:29:36 -0800
Ted Zlatanov <tzz <at> lifelogs.com> writes:

> 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.

I think it's definitely too intrusive.

The question that's relevant is "do you want to save the password?"
That's the only thing a normal user could possibly be interested in, and
it's a yes or no question.

Asking the user to "e"-dit the netrc line would be for Gnus to prompt
the user on `C-c C-c' "do you want to (s)end the message or (e)dit the
MIME representation of the message before sending?"  The latter is only
interesting for people who are implementing the MIME encoding, and not
any user.  The same goes for the .netrc stuff.

If you want to add a debugging mode to auth-source that allows you to
edit the .netrc lines, that's fine, but it's not fine to confuse users
on something as basic as password management.

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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Fri, 25 Feb 2011 17:28:03 GMT) Full text and rfc822 format available.

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

From: Ted Zlatanov <tzz <at> lifelogs.com>
To: <8050 <at> debbugs.gnu.org>
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Fri, 25 Feb 2011 11:27:52 -0600
[Message part 1 (text/plain, inline)]
Sending my replies as a digest.  They didn't show up after a few hours;
sorry if you see duplicates.

Ted

[Message part 2 (message/rfc822, inline)]
Subject: Topics
Topics:
   Re: bug#8050: Gnus does not connect to my IMAP server any more
   Re: bug#8050: Gnus does not connect to my IMAP server any more
[Message part 3 (message/rfc822, inline)]
From: Ted Zlatanov <tzz <at> lifelogs.com>
To: ding <at> gnus.org
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Fri, 25 Feb 2011 05:21:45 -0600
On Thu, 24 Feb 2011 20:29:36 -0800 Lars Magne Ingebrigtsen <lmi <at> gnus.org> wrote: 

LMI> Ted Zlatanov <tzz <at> lifelogs.com> writes:
>> 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.

LMI> I think it's definitely too intrusive.

LMI> The question that's relevant is "do you want to save the password?"
LMI> That's the only thing a normal user could possibly be interested in, and
LMI> it's a yes or no question.

I disagree.  It's a single extra letter in a y/n prompt.  I don't see
how it's intrusive.  You can set auth-source-never-save to t right now
and never even see the y/n prompt.  I've accomodated all the prompting
suggestions but I'm not removing that functionality.

LMI> Asking the user to "e"-dit the netrc line would be for Gnus to prompt
LMI> the user on `C-c C-c' "do you want to (s)end the message or (e)dit the
LMI> MIME representation of the message before sending?"  The latter is only
LMI> interesting for people who are implementing the MIME encoding, and not
LMI> any user.  The same goes for the .netrc stuff.

No, because the netrc file is not raw data but structured information.
(Although that kind of editing the raw MIME sounds very useful for
debugging and testing MIME support.)

It's like adding a command to edit the score file or having two ways to
edit the topic parameters (`G c' and `G p').  Emacs thrives on power
users; let's not oversimplify the interface.

LMI> If you want to add a debugging mode to auth-source that allows you to
LMI> edit the .netrc lines, that's fine, but it's not fine to confuse users
LMI> on something as basic as password management.

It's not confusing.  But maybe `e' should be "add the auth info and then
edit the netrc file, allowing `C-c C-c' to save it" which would be more
in line with what `G p' and score file editing do.  And then we can add
that command to Gnus and Emacs in general so you can edit your
auth-sources authinfo/netrc files quickly (in the global scope you would
have to choose the file with some extra UI).  Yeah, that sounds like
useful functionality.

Ted




[Message part 4 (message/rfc822, inline)]
From: Ted Zlatanov <tzz <at> lifelogs.com>
To: ding <at> gnus.org
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Fri, 25 Feb 2011 05:50:24 -0600
On Fri, 25 Feb 2011 05:21:45 -0600 Ted Zlatanov <tzz <at> lifelogs.com> wrote: 

TZ> I disagree.  It's a single extra letter in a y/n prompt.  I don't see
TZ> how it's intrusive.  You can set auth-source-never-save to t right now
TZ> and never even see the y/n prompt.  I've accomodated all the prompting
TZ> suggestions but I'm not removing that functionality.

I changed `auth-source-never-save' to `auth-source-save-behavior' which
defaults to 'ask and allows t and nil to always and never save,
respectively.  I think it DTRT but let me know if not.

Ted




[Message part 5 (text/plain, inline)]
-- 

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Sat, 05 Mar 2011 12:35:01 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: bug-gnu-emacs <at> gnu.org
Cc: ding <at> gnus.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Sat, 05 Mar 2011 13:17:51 +0100
Ted Zlatanov <tzz <at> lifelogs.com> writes:

> LMI> The question that's relevant is "do you want to save the password?"
> LMI> That's the only thing a normal user could possibly be interested in, and
> LMI> it's a yes or no question.
>
> I disagree.  It's a single extra letter in a y/n prompt.  I don't see
> how it's intrusive.  You can set auth-source-never-save to t right now
> and never even see the y/n prompt.  I've accomodated all the prompting
> suggestions but I'm not removing that functionality.

It's an extra letter, but it's a completely incomprehensible extra
choice for the users.  I know that when I'm using something, I don't
want to be faced with options that I have no possible interest in.

The normal reaction to such a prompt is "oh, should I edit this?  How
should I edit this?  Do I need to edit this?"

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





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Sat, 05 Mar 2011 20:15:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 8050 <at> debbugs.gnu.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Sat, 05 Mar 2011 15:13:53 -0500
The saga continues:

Now I'm not asked for a host name and a port any more (just realized in
the mean time that those questions were not only unexpected but even
subtler than I thought since they're not about how/where to connect (the
connection is already established at that point) but about which
password to use).  Good.

- But when I'm asked for a user name there is no default, whereas earlier
  my local user name was used as default (which happens to work for me on
  most of the machines to which I can connect).  Please use the local user
  name as default in that prompt.

- Also when I'm then asked for a password, the prompt says "Password for
  user foo, host bar" which is more verbose but not more clear than
  "Password for foo <at> bar" used in earlier Gnus.

- I'm asked whether to save the password regardless of whether the
  password and user names are correct or not.  That's really bad.

- When I was asked whether to save my password, the cursor was not shown in
  the prompt, which looked weird.  Maybe it was a temporary redisplay
  problem (I hit `n' mechanically pretty quickly, so maybe Emacs didn't
  have time to display the cursor).
  
- If the connection fails (e.g. bad password or bad user name), I don't
  get asked again, instead Gnus continues in offline mode.

- After refusing to save the password in authinfo.gpg, I get a message
  along the lines of "auth-source-search: CREATED 1 results ...".
  I don't care whether "results" is replaced by "result" when there's
  only 1, but this looks like a debug message which should disappear.
  Usually, I'd assume it is just a forgotten debug message, but given
  the atrocious prompts I've seen in this thread, I'm a bit
  more cautious.


-- Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Tue, 08 Mar 2011 01:27:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Mon, 07 Mar 2011 18:10:38 -0500
SM> - Also when I'm then asked for a password, the prompt says "Password for
SM> user foo, host bar" which is more verbose but not more clear than
SM> "Password for foo <at> bar" used in earlier Gnus.

> That's the default prompt.  Every package can supply their own which
> makes sense in context.  So nnimap.el could supply the password prompt
> "IMAP password for user %u, host %h:%p" for instance.  Does that seem OK
> to you?  If so I can add it to nnimap.el.

I mostly care about nnimap for now because it's the only case I bumped
into, but I can't imagine why it would be better to use "user foo, host
bar" for the default, since all uses I can think of will want to
override it with the "foo <at> bar" syntax instead.

SM> - I'm asked whether to save the password regardless of whether the
SM> password and user names are correct or not.  That's really bad.

> auth-source.el doesn't know at that time whether the authentication will
> be successful.  I think you're saying we need an `auth-source-save'
> function to be called after the fact instead of a ":create t" parameter.

Yes.

> But what about the case where the server is down and yet you know the
> password is good?  Do we throw it away?

Yes.  I *never* know that the password is good (maybe I'm
a pathologically poor typist, but I can't be the only one who's been
surprised a few times to see his password rejected even tho he thought
it was typed properly).

SM> - When I was asked whether to save my password, the cursor was not shown in
SM> the prompt, which looked weird.  Maybe it was a temporary redisplay
SM> problem (I hit `n' mechanically pretty quickly, so maybe Emacs didn't
SM> have time to display the cursor).

> I'm not sure about that one, I'm just using `read-passwd'.

No, you misread: I'm talking about the prompt to save the password
(i.e. the one with y/n/N/e/?), not the prompt to read the password.
  
SM> - If the connection fails (e.g. bad password or bad user name), I don't
SM> get asked again, instead Gnus continues in offline mode.

> nnimap.el could use `auth-source-forget+' and then retry that query.
> But as above, I think you're saying we need to save/cache AFTER
> authentication success.

Yes, fixing the previous one might fix this one, I just know this also
needs to work right.

SM> - After refusing to save the password in authinfo.gpg, I get a message
SM> along the lines of "auth-source-search: CREATED 1 results ...".
SM> I don't care whether "results" is replaced by "result" when there's
SM> only 1, but this looks like a debug message which should disappear.
> I think it makes sense to show confirmation that we just added to your
> passwords.  It's a rare event and deserves notice.

Two things:
1- then make it look nice, like "Saved password for foo <at> bar into <file>".
   The current text really looks like debug output.
2- I just replied "n" before, so I did *not* want it saved (tho I do
   want it saved for the session), so it is not a rare event at all.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Tue, 08 Mar 2011 21:36:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Tue, 08 Mar 2011 16:34:53 -0500
>                          (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?

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

Notes:
- I added the host name to the user prompt (usually the user name
  may be different in different hosts for the same user, so most such
  prompts do include a hostname/realm).
- I left the user name in the host prompt, even though that sounds
  backward to me (kind of like choosing the street number before the
  street name).
- I removed the quotes which just made each of the branches be
  acceptable when `r' has value `quote'.
         
> I'll put something in.  This makes sense but is extra work for the
> auth-source API users, unfortunately.

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

>>> I'm not sure about that one, I'm just using `read-passwd'.

SM> No, you misread: I'm talking about the prompt to save the password
SM> (i.e. the one with y/n/N/e/?), not the prompt to read the password.

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

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

SM> Two things:
SM> 1- then make it look nice, like "Saved password for foo <at> bar into <file>".
SM> The current text really looks like debug output.
> All the output from auth-source starts with the function name.

I call that debug output and is not OK for normal messages.

> The line you mention can be put in the background in favor of the
> output you specified.  But, again, auth-source does NOT just save
> passwords, and there's no guarantee that a host or a port were
> specified.  So the message will look different.

The case where a user and host were specified is likely to be the main
one for most users, so it's worth handling it specially.

SM> 2- I just replied "n" before, so I did *not* want it saved (tho I do
SM> want it saved for the session), so it is not a rare event at all.
> OK, I'll show it only when the data is saved.

Good, thank you.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Wed, 09 Mar 2011 03:05:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Tue, 08 Mar 2011 22:04:17 -0500
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?

Oh, I didn't even remember read-char-choice, but yes, that's probably
a better starting point.  We should actually make y-or-n-p use
read-char-choice.

> 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.

I don't know what that would look like in your y/n/N/e/? case.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Wed, 09 Mar 2011 20:22:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Wed, 09 Mar 2011 13:34:06 -0500
> I added `auth-source-read-char-choice' to do the prompting.  It will use
> `read-char-choice' opportunistically and construct the a/b/c prompt
> supplement automatically.

Good.

> If you want me to modify `y-or-n-p' to use `read-char-choice' let me
> know and I'll submit a patch.

That would be a good change, yes, please.

>>> 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.

SM> I don't know what that would look like in your y/n/N/e/? case.

> Try (dropdown-list '("choose one: y" "............n" "............N"))
> since that's how it will look with the new
> `auth-source-char-read-choice' function.

Hmm... I'm not sure it's an improvement over the simple
"y/n/N/e/?" prompt.  For completions and other cases where the total
text is too long to fit on a single line, such a dropdown-list can make
sense, but for this particular case it just reminds of me people using
tons of different typefaces in Word document.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Thu, 10 Mar 2011 02:17:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Wed, 09 Mar 2011 21:16:41 -0500
> Can you close this bug or let me know what else is needed?

I'll close it as soon as I confirm the new behavior fixes the problems.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#8050; Package emacs,gnus. (Sat, 12 Mar 2011 03:44:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Fri, 11 Mar 2011 22:43:00 -0500
>> Can you close this bug or let me know what else is needed?
> I'll close it as soon as I confirm the new behavior fixes the problems.

Here's the update:
- It's much better, almost right.
- The user prompt says "user blabla: monnier", rather than "user blabla
  (default monnier): ".  I.e. the `initial-content' should be empty, and
  the user name should be passed as `default' instead.
- The "save password" prompt shows up not only after I entered the
  password, but also when re-connecting (and using the password kept in
  memory).


        Stefan




Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Mon, 14 Mar 2011 13:59:01 GMT) Full text and rfc822 format available.

Notification sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
bug acknowledged by developer. (Mon, 14 Mar 2011 13:59:02 GMT) Full text and rfc822 format available.

Message #76 received at 8050-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: 8050-done <at> debbugs.gnu.org
Subject: Re: bug#8050: Gnus does not connect to my IMAP server any more
Date: Mon, 14 Mar 2011 09:58:41 -0400
>>>> Can you close this bug or let me know what else is needed?
>>> I'll close it as soon as I confirm the new behavior fixes the problems.

SM> Here's the update:
SM> - It's much better, almost right.
SM> - The user prompt says "user blabla: monnier", rather than "user blabla
SM> (default monnier): ".  I.e. the `initial-content' should be empty, and
SM> the user name should be passed as `default' instead.

> Fixed.

SM> - The "save password" prompt shows up not only after I entered the
SM> password, but also when re-connecting (and using the password kept in
SM> memory).

> This is fixed too.

Thanks, looks fine now,


        Stefan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 12 Apr 2011 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 91 days ago.

Previous Next


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