diff options
| author | Teodor Zlatanov | 2011-04-22 01:01:32 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2011-04-22 01:01:32 +0000 |
| commit | 5e68f8614fa019ae831a6d48de01322202880274 (patch) | |
| tree | 19320cc0a561b564421c4a1884f0422e3ba0dbfc | |
| parent | a6e77075d4056ce25269fe2797bf10de8e2af4a8 (diff) | |
| download | emacs-5e68f8614fa019ae831a6d48de01322202880274.tar.gz emacs-5e68f8614fa019ae831a6d48de01322202880274.zip | |
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.
| -rw-r--r-- | lisp/gnus/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/gnus/nnimap.el | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 57182504331..4a8311f6e0a 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,4 +1,9 @@ | |||
| 1 | 2011-04-21 Teodor Zlatanov <tzz@lifelogs.com> | 1 | 2011-04-22 Teodor Zlatanov <tzz@lifelogs.com> |
| 2 | |||
| 3 | * nnimap.el (nnimap-user): New backend variable. | ||
| 4 | (nnimap-open-connection-1): Use it. | ||
| 5 | (nnimap-credentials): Accept user parameter so it's explicit what user | ||
| 6 | name is desired. | ||
| 2 | 7 | ||
| 3 | * gnus-sum.el (gnus-extra-headers): Add Keywords, Cc, and Gcc to | 8 | * gnus-sum.el (gnus-extra-headers): Add Keywords, Cc, and Gcc to |
| 4 | default. | 9 | default. |
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index afdea185dd3..f819c17afe8 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -58,6 +58,9 @@ | |||
| 58 | (defvoo nnimap-address nil | 58 | (defvoo nnimap-address nil |
| 59 | "The address of the IMAP server.") | 59 | "The address of the IMAP server.") |
| 60 | 60 | ||
| 61 | (defvoo nnimap-user nil | ||
| 62 | "Username to use for authentication to the IMAP server.") | ||
| 63 | |||
| 61 | (defvoo nnimap-server-port nil | 64 | (defvoo nnimap-server-port nil |
| 62 | "The IMAP port used. | 65 | "The IMAP port used. |
| 63 | If nnimap-stream is `ssl', this will default to `imaps'. If not, | 66 | If nnimap-stream is `ssl', this will default to `imaps'. If not, |
| @@ -283,13 +286,14 @@ textual parts.") | |||
| 283 | (push (current-buffer) nnimap-process-buffers) | 286 | (push (current-buffer) nnimap-process-buffers) |
| 284 | (current-buffer))) | 287 | (current-buffer))) |
| 285 | 288 | ||
| 286 | (defun nnimap-credentials (address ports) | 289 | (defun nnimap-credentials (address ports user) |
| 287 | (let* ((auth-source-creation-prompts | 290 | (let* ((auth-source-creation-prompts |
| 288 | '((user . "IMAP user at %h: ") | 291 | '((user . "IMAP user at %h: ") |
| 289 | (secret . "IMAP password for %u@%h: "))) | 292 | (secret . "IMAP password for %u@%h: "))) |
| 290 | (found (nth 0 (auth-source-search :max 1 | 293 | (found (nth 0 (auth-source-search :max 1 |
| 291 | :host address | 294 | :host address |
| 292 | :port ports | 295 | :port ports |
| 296 | :user user | ||
| 293 | :require '(:user :secret) | 297 | :require '(:user :secret) |
| 294 | :create t)))) | 298 | :create t)))) |
| 295 | (if found | 299 | (if found |
| @@ -408,7 +412,8 @@ textual parts.") | |||
| 408 | (list | 412 | (list |
| 409 | nnimap-address | 413 | nnimap-address |
| 410 | (nnoo-current-server 'nnimap))) | 414 | (nnoo-current-server 'nnimap))) |
| 411 | ports)))) | 415 | ports |
| 416 | nnimap-user)))) | ||
| 412 | (setq nnimap-object nil) | 417 | (setq nnimap-object nil) |
| 413 | (let ((nnimap-inhibit-logging t)) | 418 | (let ((nnimap-inhibit-logging t)) |
| 414 | (setq login-result | 419 | (setq login-result |