Gnus development mailing list
 help / color / mirror / Atom feed
* [fwd] A patch for gpg-passphrase-forget
@ 2003-05-01 15:36 Vasily Korytov
  2003-05-01 15:55 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Vasily Korytov @ 2003-05-01 15:36 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [fwd] A patch for gpg-passphrase-forget
  2003-05-01 15:36 [fwd] A patch for gpg-passphrase-forget Vasily Korytov
@ 2003-05-01 15:55 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-05-01 15:55 UTC (permalink / raw)


deskpot@despammed.com (Vasily Korytov) writes:

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

Thanks for the patch; I've applied it to Oort Gnus v0.24 (i. e., CVS).

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-01 15:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-01 15:36 [fwd] A patch for gpg-passphrase-forget Vasily Korytov
2003-05-01 15:55 ` Lars Magne Ingebrigtsen

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