From: Jason Lewis <jason@dickson.st>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 16679@debbugs.gnu.org
Subject: bug#16679: 24.3.50; can't create a newly encrypted gpg file with easypg in cygwin emacs
Date: Tue, 11 Feb 2014 16:15:08 +1100 [thread overview]
Message-ID: <52F9B1DC.9090008@dickson.st> (raw)
In-Reply-To: <83d2iutiov.fsf@gnu.org> (sfid-20140211_144708_062742_59477625)
[-- Attachment #1: Type: text/plain, Size: 10586 bytes --]
Eli Zaretskii wrote, On 11/02/2014 2:46 PM:
> Please step in Edebug through epa-file-write-region, and tell which
> part of the condition-case fails with file-error, and why. I see
> nothing telltale in the backtrace which would suggest any ideas. Thanks.
I think it fails on:
line: 250
(epa-select-keys
context
"Select recipients for encryption.
If no one is selected, symmetric encryption will be performed. "
recipients)
That call seems to take quite a few seconds and then execution jumps to
the error part on line 257.
Digging deeper with edebug, I have found the error happens in the
epa-list-keys call and I can make the error happen just by calling
epa-list-keys directly.
I stepped through a whole lot but I couldn't work out where it happens
exactly. it seems to be while its stepping through the gpg keys to
produce the list.
Backtrace:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("\"" nil 0)
(while (string-match "\"" string index) (setq string (replace-match
"\\\"" t t string) index (1+ (match-end 0))))
(cond ((member (aref (car lines) 0) (quote ("pub" "sec" "crt" "crs")))
(setq cert (member (aref (car lines) 0) (quote ("crt" "crs"))) keys
(cons (epg-make-key (if (aref (car lines) 8) (cdr (assq ...
epg-key-validity-alist)))) keys)) (epg-key-set-sub-key-list (car keys)
(cons (epg--make-sub-key-1 (car lines)) (epg-key-sub-key-list (car
keys))))) ((member (aref (car lines) 0) (quote ("sub" "ssb")))
(epg-key-set-sub-key-list (car keys) (cons (epg--make-sub-key-1 (car
lines)) (epg-key-sub-key-list (car keys))))) ((equal (aref (car lines)
0) "uid") (setq string (copy-sequence (aref (car lines) 9)) index 0)
(while (string-match "\"" string index) (setq string (replace-match
"\\\"" t t string) index (1+ (match-end 0)))) (condition-case nil (setq
string (epg--decode-coding-string (car (read-from-string (concat "\""
string "\""))) (quote utf-8))) (error (setq string (aref (car lines)
9)))) (epg-key-set-user-id-list (car keys) (cons (epg-make-user-id (if
(aref (car lines) 1) (cdr (assq ... epg-key-validity-alist))) (if cert
(condition-case nil (epg-dn-from-string string) (error string)) string))
(epg-key-user-id-list (car keys))))) ((equal (aref (car lines) 0) "fpr")
(epg-sub-key-set-fingerprint (car (epg-key-sub-key-list (car keys)))
(aref (car lines) 9))) ((equal (aref (car lines) 0) "sig")
(epg-user-id-set-signature-list (car (epg-key-user-id-list (car keys)))
(cons (epg-make-key-signature (if (aref (car lines) 1) (cdr (assq ...
epg-key-validity-alist))) (string-to-number (aref (car lines) 3)) (aref
(car lines) 4) (epg--time-from-seconds (aref (car lines) 5))
(epg--time-from-seconds (aref (car lines) 6)) (aref (car lines) 9)
(string-to-number (aref (car lines) 10) 16) (eq (aref (aref ... 10) 2)
120)) (epg-user-id-signature-list (car (epg-key-user-id-list (car
keys))))))))
(while lines (cond ((member (aref (car lines) 0) (quote ("pub" "sec"
"crt" "crs"))) (setq cert (member (aref (car lines) 0) (quote ("crt"
"crs"))) keys (cons (epg-make-key (if (aref ... 8) (cdr ...))) keys))
(epg-key-set-sub-key-list (car keys) (cons (epg--make-sub-key-1 (car
lines)) (epg-key-sub-key-list (car keys))))) ((member (aref (car lines)
0) (quote ("sub" "ssb"))) (epg-key-set-sub-key-list (car keys) (cons
(epg--make-sub-key-1 (car lines)) (epg-key-sub-key-list (car keys)))))
((equal (aref (car lines) 0) "uid") (setq string (copy-sequence (aref
(car lines) 9)) index 0) (while (string-match "\"" string index) (setq
string (replace-match "\\\"" t t string) index (1+ (match-end 0))))
(condition-case nil (setq string (epg--decode-coding-string (car
(read-from-string ...)) (quote utf-8))) (error (setq string (aref (car
lines) 9)))) (epg-key-set-user-id-list (car keys) (cons
(epg-make-user-id (if (aref ... 1) (cdr ...)) (if cert (condition-case
nil ... ...) string)) (epg-key-user-id-list (car keys))))) ((equal (aref
(car lines) 0) "fpr") (epg-sub-key-set-fingerprint (car
(epg-key-sub-key-list (car keys))) (aref (car lines) 9))) ((equal (aref
(car lines) 0) "sig") (epg-user-id-set-signature-list (car
(epg-key-user-id-list (car keys))) (cons (epg-make-key-signature (if
(aref ... 1) (cdr ...)) (string-to-number (aref ... 3)) (aref (car
lines) 4) (epg--time-from-seconds (aref ... 5)) (epg--time-from-seconds
(aref ... 6)) (aref (car lines) 9) (string-to-number (aref ... 10) 16)
(eq (aref ... 2) 120)) (epg-user-id-signature-list (car
(epg-key-user-id-list ...))))))) (setq lines (cdr lines)))
(let ((lines (epg--list-keys-1 context name mode)) keys cert pointer
pointer-1 index string) (while lines (cond ((member (aref (car lines) 0)
(quote ("pub" "sec" "crt" "crs"))) (setq cert (member (aref (car lines)
0) (quote ("crt" "crs"))) keys (cons (epg-make-key (if ... ...)) keys))
(epg-key-set-sub-key-list (car keys) (cons (epg--make-sub-key-1 (car
lines)) (epg-key-sub-key-list (car keys))))) ((member (aref (car lines)
0) (quote ("sub" "ssb"))) (epg-key-set-sub-key-list (car keys) (cons
(epg--make-sub-key-1 (car lines)) (epg-key-sub-key-list (car keys)))))
((equal (aref (car lines) 0) "uid") (setq string (copy-sequence (aref
(car lines) 9)) index 0) (while (string-match "\"" string index) (setq
string (replace-match "\\\"" t t string) index (1+ (match-end 0))))
(condition-case nil (setq string (epg--decode-coding-string (car ...)
(quote utf-8))) (error (setq string (aref ... 9))))
(epg-key-set-user-id-list (car keys) (cons (epg-make-user-id (if ...
...) (if cert ... string)) (epg-key-user-id-list (car keys))))) ((equal
(aref (car lines) 0) "fpr") (epg-sub-key-set-fingerprint (car
(epg-key-sub-key-list (car keys))) (aref (car lines) 9))) ((equal (aref
(car lines) 0) "sig") (epg-user-id-set-signature-list (car
(epg-key-user-id-list (car keys))) (cons (epg-make-key-signature (if ...
...) (string-to-number ...) (aref ... 4) (epg--time-from-seconds ...)
(epg--time-from-seconds ...) (aref ... 9) (string-to-number ... 16) (eq
... 120)) (epg-user-id-signature-list (car ...)))))) (setq lines (cdr
lines))) (setq keys (nreverse keys) pointer keys) (while pointer
(epg-key-set-sub-key-list (car pointer) (nreverse (epg-key-sub-key-list
(car pointer)))) (setq pointer-1 (epg-key-set-user-id-list (car pointer)
(nreverse (epg-key-user-id-list (car pointer))))) (while pointer-1
(epg-user-id-set-signature-list (car pointer-1) (nreverse
(epg-user-id-signature-list (car pointer-1)))) (setq pointer-1 (cdr
pointer-1))) (setq pointer (cdr pointer))) keys)
epg-list-keys((epg-context . [OpenPGP "/usr/bin/gpg" nil nil nil nil
nil nil nil (epg-passphrase-callback-function) nil nil nil nil nil nil
nil nil]) nil nil)
(epa--insert-keys (epg-list-keys context name secret))
(let ((inhibit-read-only t) buffer-read-only (point (point-min))
(context (epg-make-context epa-protocol))) (if (get-text-property point
(quote epa-list-keys)) nil (setq point (next-single-property-change
point (quote epa-list-keys)))) (if point (progn (delete-region point (or
(next-single-property-change point (quote epa-list-keys)) (point-max)))
(goto-char point))) (epa--insert-keys (epg-list-keys context name
secret)) (widget-setup) (set-keymap-parent (current-local-map)
widget-keymap))
epa--list-keys(nil nil)
epa-list-keys(nil)
#<subr call-interactively>(epa-list-keys record nil)
funcall(#<subr call-interactively> epa-list-keys record nil)
(with-no-warnings (funcall ad--addoit-function function record-flag keys))
(setq ad-return-value (with-no-warnings (funcall ad--addoit-function
function record-flag keys)))
(let ((ido-ubiquitous-next-override
(ido-ubiquitous-get-command-override function))) (setq ad-return-value
(with-no-warnings (funcall ad--addoit-function function record-flag keys))))
(ido-ubiquitous-with-override (ido-ubiquitous-get-command-override
function) (setq ad-return-value (with-no-warnings (funcall
ad--addoit-function function record-flag keys))))
(let (ad-return-value) (ido-ubiquitous-with-override
(ido-ubiquitous-get-command-override function) (setq ad-return-value
(with-no-warnings (funcall ad--addoit-function function record-flag
keys)))) ad-return-value)
ad-Advice-call-interactively(#<subr call-interactively> epa-list-keys
record nil)
apply(ad-Advice-call-interactively #<subr call-interactively>
(epa-list-keys record nil))
call-interactively(epa-list-keys record nil)
command-execute(epa-list-keys record)
execute-extended-command(nil "epa-list-keys")
smex-read-and-run(("eval-buffer" "epa-list-keys" "sp-next-sexp"
"toggle-debug-on-error" "edebug-trace-mode" "package-list-packages"
"load-file" "replace-string" "ttl" "calc" "html-mode" "grep" "dired"
"whitespace-mode" "emacs-version" "org-mode" "orgtbl-mode"
"set-buffer-file-coding-system" "load-library" "indent-region"
"smartparens-mode" "auto-fill-mode" "customize-group"
"customize-variable" "hl-line-mode" "eww" "version" "kill-rectangle"
"sp-cheat-sheet" "auto-revert-tail-mode" "csv-mode" "hexl-mode"
"auto-complete" "eval-expression" "org-beamer-mode" "weechat-connect"
"visual-line-mode" "org-submit-bug-report"
"org-table-create-or-convert-from-region" "mail" "rgrep" "shell"
"sql-mode" "esk-lorem" "zap-to-char" "count-matches" "shell-command"
"moz-minor-mode" "org-indent-item" "org-table-export" ...))
smex()
#<subr call-interactively>(smex nil nil)
funcall(#<subr call-interactively> smex nil nil)
(with-no-warnings (funcall ad--addoit-function function record-flag keys))
(setq ad-return-value (with-no-warnings (funcall ad--addoit-function
function record-flag keys)))
(let ((ido-ubiquitous-next-override
(ido-ubiquitous-get-command-override function))) (setq ad-return-value
(with-no-warnings (funcall ad--addoit-function function record-flag keys))))
(ido-ubiquitous-with-override (ido-ubiquitous-get-command-override
function) (setq ad-return-value (with-no-warnings (funcall
ad--addoit-function function record-flag keys))))
(let (ad-return-value) (ido-ubiquitous-with-override
(ido-ubiquitous-get-command-override function) (setq ad-return-value
(with-no-warnings (funcall ad--addoit-function function record-flag
keys)))) ad-return-value)
ad-Advice-call-interactively(#<subr call-interactively> smex nil nil)
apply(ad-Advice-call-interactively #<subr call-interactively> (smex
nil nil))
call-interactively(smex nil nil)
command-execute(smex)
--
Jason Lewis
http://emacstragic.net
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 834 bytes --]
next prev parent reply other threads:[~2014-02-11 5:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 4:45 bug#16679: 24.3.50; can't create a newly encrypted gpg file with easypg in cygwin emacs Jason Lewis
2014-02-08 1:42 ` Glenn Morris
2014-02-08 8:54 ` Eli Zaretskii
2014-02-08 10:05 ` Jason Lewis
2014-02-08 14:18 ` Eli Zaretskii
2014-02-10 23:04 ` Jason Lewis
2014-02-11 3:46 ` Eli Zaretskii
2014-02-11 5:15 ` Jason Lewis [this message]
2014-02-11 16:05 ` Eli Zaretskii
2014-02-12 2:38 ` Jason Lewis
2019-08-30 10:59 ` Lars Ingebrigtsen
2019-08-30 11:44 ` Jason Lewis
2019-09-04 13:00 ` Lars 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=52F9B1DC.9090008@dickson.st \
--to=jason@dickson.st \
--cc=16679@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.