[gnus git] branch master updated: n0-15-87-gef91044 =1= Add nnimap-user to nnimap.el.

Ted Zlatanov <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  ef9104456fa7e844c795c4bf130c4b8c97cc34b9 (commit)
      from  b3da4bfe19d9501b4cd56b4c121cacc9247f2ae6 (commit)


- Log -----------------------------------------------------------------
commit ef9104456fa7e844c795c4bf130c4b8c97cc34b9
Author: Ted Zlatanov <[email protected]>
Date:   Thu Apr 21 19:37:56 2011 -0500

    Add nnimap-user to nnimap.el.
    
    * nnimap.el (nnimap-user): New backend variable.
    (nnimap-open-connection-1): Use it.
    (nnimap-credentials): Accept user parameter so it's explicit what user
    name is desired.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 19f07e4..04fa72f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,4 +1,9 @@
-2011-04-21  Teodor Zlatanov  <[email protected]>
+2011-04-22  Teodor Zlatanov  <[email protected]>
+
+	* nnimap.el (nnimap-user): New backend variable.
+	(nnimap-open-connection-1): Use it.
+	(nnimap-credentials): Accept user parameter so it's explicit what user
+	name is desired.
 
 	* gnus-sum.el (gnus-extra-headers): Add Keywords, Cc, and Gcc to
 	default.
diff --git a/lisp/nnimap.el b/lisp/nnimap.el
index afdea18..f819c17 100644
--- a/lisp/nnimap.el
+++ b/lisp/nnimap.el
@@ -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 @@ textual parts.")
     (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 @@ textual parts.")
 				 (list
 				  nnimap-address
 				  (nnoo-current-server 'nnimap)))
-                                ports))))
+                                ports
+                                nnimap-user))))
 		  (setq nnimap-object nil)
 		(let ((nnimap-inhibit-logging t))
 		  (setq login-result

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog |    7 ++++++-
 lisp/nnimap.el |    9 +++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.