From: Simon Josefsson <jas@extundo.com>
Cc: ultrasoul@ultrasoul.com (David D. Smith),
220521-forwarded@bugs.debian.org, ding@gnus.org
Subject: Re: gnus: pgg-gpg-lookup-key uses wrong regular expression
Date: Sat, 15 Nov 2003 01:50:36 +0100 [thread overview]
Message-ID: <ilur80asbdv.fsf@latte.josefsson.org> (raw)
In-Reply-To: <87oevfug08.fsf@glaurung.green-gryphon.com> (Manoj Srivastava's message of "Fri, 14 Nov 2003 09:27:51 -0600")
Let me know if this works or not. Apparently, the behaviour of the
new split-string was intentional, so it is no longer possible to use
the function portably... Well, it was useful while it lasted.
2003-11-15 Simon Josefsson <jas@extundo.com>
* pgg-gpg.el (pgg-gpg-lookup-all-secret-keys)
(pgg-gpg-lookup-key): Use regexp match instead of
split-string (split-string is different between emacs 21.2 and
21.4). Reported by ultrasoul@ultrasoul.com (David D. Smith).
--- pgg-gpg.el.~6.21.~ 2003-11-09 22:36:49.000000000 +0100
+++ pgg-gpg.el 2003-11-15 01:43:13.000000000 +0100
@@ -114,12 +114,9 @@
(with-temp-buffer
(apply #'call-process pgg-gpg-program nil t nil args)
(goto-char (point-min))
- (while (re-search-forward "^\\(sec\\|pub\\):" nil t)
- (push (substring
- (nth 3 (split-string
- (buffer-substring (match-end 0)
- (progn (end-of-line) (point)))
- ":")) 8)
+ (while (re-search-forward
+ "^\\(sec\\|pub\\):[^:]*:[^:]*:[^:]*:\\([^:]*\\)" nil t)
+ (push (substring (match-string 2) 8)
pgg-gpg-all-secret-keys)))))
pgg-gpg-all-secret-keys)
@@ -131,12 +128,9 @@
(with-temp-buffer
(apply #'call-process pgg-gpg-program nil t nil args)
(goto-char (point-min))
- (if (re-search-forward "^\\(sec\\|pub\\):" nil t)
- (substring
- (nth 3 (split-string
- (buffer-substring (match-end 0)
- (progn (end-of-line)(point)))
- ":")) 8)))))
+ (if (re-search-forward "^\\(sec\\|pub\\):[^:]*:[^:]*:[^:]*:\\([^:]*\\)"
+ nil t)
+ (substring (match-string 2) 8)))))
(defun pgg-gpg-encrypt-region (start end recipients &optional sign)
"Encrypt the current region between START and END.
prev parent reply other threads:[~2003-11-15 0:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-14 15:27 Manoj Srivastava
2003-11-14 22:13 ` Simon Josefsson
2003-11-15 0:50 ` Simon Josefsson [this message]
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=ilur80asbdv.fsf@latte.josefsson.org \
--to=jas@extundo.com \
--cc=220521-forwarded@bugs.debian.org \
--cc=ding@gnus.org \
--cc=ultrasoul@ultrasoul.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).