all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* nnimap-user setting?
@ 2011-04-13 17:22 Stefan Monnier
  2011-04-14 15:05 ` Ted Zlatanov
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2011-04-13 17:22 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen, Simon Josefsson; +Cc: emacs-devel

I'm apparently among the very few users who resist the temptation to
save their IMAP password into the authinfo file, but I find that in such
a case it is annoying to have to confirm the user name each and
every time.

So I think a patch like the one below would make sense (tho re-using
nnimap-authenticator to store the user name would work as well).


        Stefan


--- lisp/gnus/nnimap.el	2011-04-02 23:41:03 +0000
+++ lisp/gnus/nnimap.el	2011-04-12 13:43:13 +0000
@@ -58,6 +58,9 @@
 (defvoo nnimap-address nil
   "The address of the IMAP server.")
 
+(defvoo nnimap-user nil
+  "Username to use for authentication to the IMAP server.")
+
 (defvoo nnimap-server-port nil
   "The IMAP port used.
 If nnimap-stream is `ssl', this will default to `imaps'.  If not,
@@ -283,13 +286,14 @@
     (push (current-buffer) nnimap-process-buffers)
     (current-buffer)))
 
-(defun nnimap-credentials (address ports)
+(defun nnimap-credentials (address ports user)
   (let* ((auth-source-creation-prompts
           '((user  . "IMAP user at %h: ")
             (secret . "IMAP password for %u@%h: ")))
          (found (nth 0 (auth-source-search :max 1
                                            :host address
                                            :port ports
+                                           :user user
                                            :require '(:user :secret)
                                            :create t))))
     (if found
@@ -408,7 +412,8 @@
 				 (list
 				  nnimap-address
 				  (nnoo-current-server 'nnimap)))
-                                ports))))
+                                ports
+                                nnimap-user))))
 		  (setq nnimap-object nil)
 		(let ((nnimap-inhibit-logging t))
 		  (setq login-result




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

end of thread, other threads:[~2011-04-22 13:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-13 17:22 nnimap-user setting? Stefan Monnier
2011-04-14 15:05 ` Ted Zlatanov
2011-04-15 19:52   ` Stefan Monnier
2011-04-15 20:31     ` Ted Zlatanov
2011-04-16 15:14       ` Stefan Monnier
2011-04-16 15:27         ` Ted Zlatanov
2011-04-18 19:12           ` Stefan Monnier
2011-04-19 13:05             ` Ted Zlatanov
2011-04-19 13:46               ` Stefan Monnier
2011-04-22  0:38                 ` Ted Zlatanov
2011-04-22 13:14                   ` Ted Zlatanov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.