From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Lewis Newsgroups: gmane.emacs.bugs 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 Message-ID: <52F9B1DC.9090008@dickson.st> References: <52F464D1.7070804@dickson.st> <0m38juxtvi.fsf@fencepost.gnu.org> <8338jux9v9.fsf@gnu.org> <52F60161.90707@dickson.st> <83ha89wuvp.fsf@gnu.org> <52F95B12.4030609@dickson.st> <83d2iutiov.fsf@gnu.org> (sfid-20140211_144708_062742_59477625) NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SPMgJ5OJJIXK6uqFxbcLvSXlepKpdtcSx" X-Trace: ger.gmane.org 1392095774 29631 80.91.229.3 (11 Feb 2014 05:16:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Feb 2014 05:16:14 +0000 (UTC) Cc: 16679@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 11 06:16:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WD5hi-0006HI-Gt for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Feb 2014 06:16:18 +0100 Original-Received: from localhost ([::1]:59508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WD5hh-0007oL-TI for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Feb 2014 00:16:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WD5hY-0007oE-Kn for bug-gnu-emacs@gnu.org; Tue, 11 Feb 2014 00:16:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WD5hS-0002ZW-E6 for bug-gnu-emacs@gnu.org; Tue, 11 Feb 2014 00:16:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WD5hS-0002ZS-B9 for bug-gnu-emacs@gnu.org; Tue, 11 Feb 2014 00:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WD5hS-00050G-0j for bug-gnu-emacs@gnu.org; Tue, 11 Feb 2014 00:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jason Lewis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Feb 2014 05:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16679 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16679-submit@debbugs.gnu.org id=B16679.139209572319168 (code B ref 16679); Tue, 11 Feb 2014 05:16:01 +0000 Original-Received: (at 16679) by debbugs.gnu.org; 11 Feb 2014 05:15:23 +0000 Original-Received: from localhost ([127.0.0.1]:42346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WD5go-0004z3-6P for submit@debbugs.gnu.org; Tue, 11 Feb 2014 00:15:23 -0500 Original-Received: from ipmail06.adl2.internode.on.net ([150.101.137.129]:1177) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WD5gj-0004yq-Tl for 16679@debbugs.gnu.org; Tue, 11 Feb 2014 00:15:20 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqAEAPqw+VI7p/21/2dsb2JhbABZg0S/O4EmdIImAQV4ARALIRYPCQMCAQIBRQYNAQcBAYgAyXMXjh8BAU8HCYQvBJA+gTKHbIUVi1mBb4FSKIE1 Original-Received: from ppp167-253-181.static.internode.on.net (HELO debian.organictrader.com.au) ([59.167.253.181]) by ipmail06.adl2.internode.on.net with ESMTP; 11 Feb 2014 15:45:13 +1030 Original-Received: from [10.0.2.240] (unknown [10.0.2.240]) by debian.organictrader.com.au (Postfix) with ESMTPSA id BB18111A0224; Tue, 11 Feb 2014 16:15:11 +1100 (EST) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.23) Gecko/20090812 Lightning/0.9 Thunderbird/2.0.0.23 Mnenhy/0.7.5.0 In-Reply-To: <83d2iutiov.fsf@gnu.org> (sfid-20140211_144708_062742_59477625) X-Enigmail-Version: 1.6 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:85356 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SPMgJ5OJJIXK6uqFxbcLvSXlepKpdtcSx Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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= =2E=20 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 ... =2E..) (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 ... =2E..) (string-to-number ...) (aref ... 4) (epg--time-from-seconds ...) (epg--time-from-seconds ...) (aref ... 9) (string-to-number ... 16) (eq =2E.. 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) #(epa-list-keys record nil) funcall(# epa-list-keys record nil) (with-no-warnings (funcall ad--addoit-function function record-flag key= s)) (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(# epa-list-keys record nil) apply(ad-Advice-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() #(smex nil nil) funcall(# smex nil nil) (with-no-warnings (funcall ad--addoit-function function record-flag key= s)) (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(# smex nil nil) apply(ad-Advice-call-interactively # (smex nil nil)) call-interactively(smex nil nil) command-execute(smex) --=20 Jason Lewis http://emacstragic.net --SPMgJ5OJJIXK6uqFxbcLvSXlepKpdtcSx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (MingW32) iQIcBAEBCAAGBQJS+bHfAAoJEPpXHsdQXnZOGw0QAMfwIHjsLIy+K4UMpOqS1grp bxzINI88obNtnLRX8LaiaVPYFOOWtA67x34m1r0j+MV2DJ1Hk0XrAdoHwqzT5J2U 0vLgzPK/HbFFuOzTtEEbZM2LPNwZMaIg77RMhAuyufGezj3zIue5Ln4Q3ZoOZ8QV 69bwWEYUOlumoOqKQh9ygXi7zfsyESYdbwvBEJiiuciIGEgCdYotjV+U/qjCbFji FV44h2roH7+LqK21CrZGzAkXzCq6XakSjN4obPVSwjS7bOzI8wc0A/KQXszpEbln dFF+9/++KlNwhE4Dnf8dp8u7Hb7EuQstTJ209yNzAw5AhXQlPU3B2TAOPpZuYBab a9NmpiRMBP/YMesr4aDunq8M3FfvQW7z/J6XSet+ZWI7nfii7JNt1sgCI4JQXb4s WY2DpUL/4fPQ7AN1jG/4dtIgvpQXVEeHO91qdSHNe+tQaY+BGkYu1vZqgCnTE6T5 VjTTQer7zq+cLZmUDToI3gheKxkWtcCF7nDijtXNrV0LDFISXPwzcrbTEkkZz91I nTZgaFD0MkzM6AMTNROKRsYlD/BPcxR8N6/f2d8qFlZKQyabaj1dHnOpAxbiq2J5 TI6+8c13eDwMZJfRZO9yNgI1ukdu5hek+oTxye+yQEAtHqsMkA0b88gb7cE5gKoq KEiN5rx/YvAmedJisCVF =QLWn -----END PGP SIGNATURE----- --SPMgJ5OJJIXK6uqFxbcLvSXlepKpdtcSx--