Gnus development mailing list
 help / color / mirror / Atom feed
From: deskpot@despammed.com (Vasily Korytov)
Subject: [fwd] A patch for gpg-passphrase-forget
Date: Thu, 01 May 2003 19:36:54 +0400	[thread overview]
Message-ID: <87k7daisq1.fsf@unix.home> (raw)

[-- Attachment #1: Type: text/plain, Size: 164 bytes --]

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.

[-- Attachment #2: Type: message/rfc822, Size: 1573 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 432 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1.2: gpg.el.patch --]
[-- Type: text/x-patch, Size: 588 bytes --]

--- 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.

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]


-- 
       I accept RFC3156 and RFC2440-compatible encrypted mail.
PGP key fingerprint: 123A 7CCE 6E26 6233 0D87 E01A A0F8 3524 FCD8 1841

             reply	other threads:[~2003-05-01 15:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-01 15:36 Vasily Korytov [this message]
2003-05-01 15:55 ` Lars Magne Ingebrigtsen

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=87k7daisq1.fsf@unix.home \
    --to=deskpot@despammed.com \
    /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).