From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/52097 Path: main.gmane.org!not-for-mail From: deskpot@despammed.com (Vasily Korytov) Newsgroups: gmane.emacs.gnus.general Subject: [fwd] A patch for gpg-passphrase-forget Date: Thu, 01 May 2003 19:36:54 +0400 Sender: ding-owner@lists.math.uh.edu Message-ID: <87k7daisq1.fsf@unix.home> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1051804138 16157 80.91.224.249 (1 May 2003 15:48:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 1 May 2003 15:48:58 +0000 (UTC) Original-X-From: ding-owner+M640@lists.math.uh.edu Thu May 01 17:48:55 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19BGIH-00048A-00 for ; Thu, 01 May 2003 17:48:21 +0200 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 19BGJI-00062M-00; Thu, 01 May 2003 10:49:24 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19BGAL-0005nD-00 for ding@lists.math.uh.edu; Thu, 01 May 2003 10:40:09 -0500 Original-Received: (qmail 65419 invoked by alias); 1 May 2003 15:40:09 -0000 Original-Received: (qmail 65414 invoked from network); 1 May 2003 15:40:09 -0000 Original-Received: from main.gmane.org (80.91.224.249) by sclp3.sclp.com with SMTP; 1 May 2003 15:40:09 -0000 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19BG98-0003QG-00 for ; Thu, 01 May 2003 17:38:54 +0200 Mail-Followup-To: ding@gnus.org X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19BG97-0003Px-00 for ; Thu, 01 May 2003 17:38:53 +0200 Original-Lines: 74 Original-X-Complaints-To: usenet@main.gmane.org Mail-Copies-To: never User-Agent: Gnus/5.090023 (Oort Gnus v0.23) XEmacs/21.4 (Portable Code) Cancel-Lock: sha1:5+5PNCIucFHb4DOHCAezyBPqDUU= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:52097 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:52097 --=-=-= A while ago I've sent a patch to gpg.el to Florian Weimer. I don't know the reason, but it isn't in current Gnus. So, resending it -- this time to Gnus community. --=-=-= Content-Type: message/rfc822 Content-Disposition: inline To: Florian Weimer Subject: A patch for gpg-passphrase-forget X-Attribution: VK From: deskpot@myrealbox.com (Vasily Korytov) Date: Wed, 29 Jan 2003 02:27:58 +0300 Message-ID: <87el6wrh1d.fsf@unix.home> User-Agent: Gnus/5.090015 (Oort Gnus v0.15) XEmacs/21.4 (Portable Code, i686-pc-linux) Xref: unix.home archive:515 Lines: 58 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===-=-=" --===-=-= Hello, I'm using gpg.el with Oort Gnus -- and I really like it. =)) I really like them both, actually. Today I've hooked gpg-forget-passphrase to gnus-exit-gnus-hook -- and it didn't work for me. This function needs to be called, where there's non-nil gpg-passphrase, otherwise it can report ``Wrong type argument: string-or-itimer-p, nil.''. I've added this check -- and it seems to work here, so sending you the patch. ---Vas --===-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=gpg.el.patch --- gpg.el~ Fri Jan 25 21:00:44 2002 +++ gpg.el Wed Jan 29 02:20:50 2003 @@ -800,10 +800,11 @@ (defun gpg-passphrase-forget () "Forget stored passphrase." (interactive) - (cancel-timer gpg-passphrase-timer) - (setq gpg-passphrase-timer nil) - (gpg-passphrase-clear-string gpg-passphrase) - (setq gpg-passphrase nil)) + (when gpg-passphrase + (cancel-timer gpg-passphrase-timer) + (setq gpg-passphrase-timer nil) + (gpg-passphrase-clear-string gpg-passphrase) + (setq gpg-passphrase nil))) (defun gpg-passphrase-store (passphrase) "Store PASSPHRASE in cache. --===-=-=-- --=-=-= -- I accept RFC3156 and RFC2440-compatible encrypted mail. PGP key fingerprint: 123A 7CCE 6E26 6233 0D87 E01A A0F8 3524 FCD8 1841 --=-=-=--