Gnus development mailing list
 help / color / mirror / Atom feed
From: Mark Plaksin <happy@mcplaksin.org>
Subject: nnimap.el: small patch to skip "Store password?" prompt
Date: Mon, 02 Feb 2004 21:46:39 -0500	[thread overview]
Message-ID: <m3u128rib4.fsf@water.tss.usg.edu> (raw)

Here's a small patch to nnimap.el which allows you to skip the "Store
password for this session?" prompt.  If nnimap-store-password is t, the
password will always be stored and you won't be prompted.

I always want nnimap to store my passwords so this saves me a few
keystrokes.

--- imap.el	2004-02-02 21:37:49.000000000 -0500
+++ imap.el.happy	2004-02-02 21:40:20.000000000 -0500
@@ -311,6 +311,9 @@
 (defvar imap-error nil
   "Error codes from the last command.")
 
+(defvar nnimap-store-password
+  "If t store password without prompting.")
+
 ;; Internal constants.  Change theese and die.
 
 (defconst imap-default-port 143)
@@ -824,7 +827,8 @@
 		(setq ret t
 		      imap-username user)
 		(if (and (not imap-password)
-			 (y-or-n-p "Store password for this session? "))
+			 (or nnimap-store-password
+			     (y-or-n-p "Store password for this session? ")))
 		    (setq imap-password passwd)))
 	    (message "Login failed...")
 	    (setq passwd nil)




             reply	other threads:[~2004-02-03  2:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-03  2:46 Mark Plaksin [this message]
2004-03-12 19:17 ` Reiner Steib
2004-03-12 19:46   ` Simon Josefsson

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=m3u128rib4.fsf@water.tss.usg.edu \
    --to=happy@mcplaksin.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).