From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii 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 18:05:18 +0200 Message-ID: <83a9dxtz29.fsf@gnu.org> 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> <52F9B1DC.9090008@dickson.st> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1392134771 29340 80.91.229.3 (11 Feb 2014 16:06:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Feb 2014 16:06:11 +0000 (UTC) Cc: 16679@debbugs.gnu.org To: Jason Lewis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 11 17:06:19 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 1WDFqj-0003yS-VI for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Feb 2014 17:06:19 +0100 Original-Received: from localhost ([::1]:34371 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDFqj-0003Hk-Hc for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Feb 2014 11:06:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDFqb-0003Hd-Tb for bug-gnu-emacs@gnu.org; Tue, 11 Feb 2014 11:06:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDFqW-0005wr-9Q for bug-gnu-emacs@gnu.org; Tue, 11 Feb 2014 11:06:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46432) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDFqW-0005wf-5k for bug-gnu-emacs@gnu.org; Tue, 11 Feb 2014 11:06:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WDFqU-0005oq-Sv for bug-gnu-emacs@gnu.org; Tue, 11 Feb 2014 11:06:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Feb 2014 16:06:02 +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.139213474222335 (code B ref 16679); Tue, 11 Feb 2014 16:06:02 +0000 Original-Received: (at 16679) by debbugs.gnu.org; 11 Feb 2014 16:05:42 +0000 Original-Received: from localhost ([127.0.0.1]:47614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WDFq8-0005oA-KP for submit@debbugs.gnu.org; Tue, 11 Feb 2014 11:05:41 -0500 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:36816) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WDFq5-0005nq-6T for 16679@debbugs.gnu.org; Tue, 11 Feb 2014 11:05:39 -0500 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0N0U00O009Q0JT00@mtaout25.012.net.il> for 16679@debbugs.gnu.org; Tue, 11 Feb 2014 18:04:34 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N0U00KNY9ZMT550@mtaout25.012.net.il>; Tue, 11 Feb 2014 18:04:34 +0200 (IST) In-reply-to: <52F9B1DC.9090008@dickson.st> X-012-Sender: halo1@inter.net.il 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:85383 Archived-At: > Date: Tue, 11 Feb 2014 16:15:08 +1100 > From: Jason Lewis > CC: rgm@gnu.org, 16679@debbugs.gnu.org > > > 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 Thanks. Please show the values of 'string' and '(car lines)' right before the while loop indicated below (which is part of epg-list-keys): ((equal (aref (car lines) 0) "uid") ;; Decode the UID name as a backslash escaped UTF-8 string, ;; generated by GnuPG/GpgSM. (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))))