From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: Re: nnimap-user setting?
Date: Thu, 14 Apr 2011 10:05:39 -0500 [thread overview]
Message-ID: <87zkns98l8.fsf@lifelogs.com> (raw)
In-Reply-To: jwv4o62xe4s.fsf-monnier+emacs@gnu.org
[-- Attachment #1: Type: text/plain, Size: 703 bytes --]
On Wed, 13 Apr 2011 14:22:47 -0300 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
SM> I'm apparently among the very few users who resist the temptation to
SM> save their IMAP password into the authinfo file, but I find that in such
SM> a case it is annoying to have to confirm the user name each and
SM> every time.
SM> So I think a patch like the one below would make sense (tho re-using
SM> nnimap-authenticator to store the user name would work as well).
Maybe it's better to use this new `nnimap-user' backend variable
directly. IOW, if it's set, it should override anything from
auth-source, and the auth-source search should not use `nnimap-user',
just the host and the ports. WDYT?
Ted
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnimap-user.patch --]
[-- Type: text/x-diff, Size: 787 bytes --]
diff --git a/lisp/nnimap.el b/lisp/nnimap.el
index afdea18..1cf275d 100644
--- a/lisp/nnimap.el
+++ b/lisp/nnimap.el
@@ -55,6 +55,9 @@
(nnoo-declare nnimap)
+(defvoo nnimap-user nil
+ "Username to use for authentication to the IMAP server. Overrides the username obtained from auth-source-search.")
+
(defvoo nnimap-address nil
"The address of the IMAP server.")
@@ -412,7 +415,8 @@ textual parts.")
(setq nnimap-object nil)
(let ((nnimap-inhibit-logging t))
(setq login-result
- (nnimap-login (car credentials) (cadr credentials))))
+ (nnimap-login (or nnimap-user (car credentials))
+ (cadr credentials))))
(if (car login-result)
(progn
;; Save the credentials if a save function exists
next prev parent reply other threads:[~2011-04-14 15:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-13 17:22 nnimap-user setting? Stefan Monnier
2011-04-14 15:05 ` Ted Zlatanov [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zkns98l8.fsf@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.