From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/56257 Path: main.gmane.org!not-for-mail From: Mark Plaksin Newsgroups: gmane.emacs.gnus.general Subject: nnimap.el: small patch to skip "Store password?" prompt Date: Mon, 02 Feb 2004 21:46:39 -0500 Sender: ding-owner@lists.math.uh.edu Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1075776484 2583 80.91.224.253 (3 Feb 2004 02:48:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 Feb 2004 02:48:04 +0000 (UTC) Original-X-From: ding-owner+M4797@lists.math.uh.edu Tue Feb 03 03:47:56 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AnqbT-0006li-00 for ; Tue, 03 Feb 2004 03:47:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1AnqaT-0008EI-00; Mon, 02 Feb 2004 20:46:53 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1AnqaL-0008EA-00 for ding@lists.math.uh.edu; Mon, 02 Feb 2004 20:46:45 -0600 Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by justine.libertine.org (Postfix) with ESMTP id 5A2C23A003D for ; Mon, 2 Feb 2004 20:46:43 -0600 (CST) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AnqaI-00063R-00 for ; Tue, 03 Feb 2004 03:46:42 +0100 Original-Received: from water.tss.usg.edu ([168.24.245.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue Feb 3 02:46:42 2004 Original-Received: from happy by water.tss.usg.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue Feb 3 02:46:42 2004 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 29 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: water.tss.usg.edu User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:KsJmzGDNZwzPJTVkHe8LwQ76grY= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:56257 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:56257 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)