From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daiki Ueno Newsgroups: gmane.emacs.bugs Subject: bug#28114: 25.2; plstore decrypt erroneous on Windows due to carriage return characters Date: Mon, 28 Aug 2017 14:30:01 +0200 Message-ID: References: <83mv6xdyfi.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1503923483 4985 195.159.176.226 (28 Aug 2017 12:31:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 28 Aug 2017 12:31:23 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 28114@debbugs.gnu.org, Rainer Gemulla To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 28 14:31:17 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmJCA-0000gB-B3 for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Aug 2017 14:31:10 +0200 Original-Received: from localhost ([::1]:39655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmJCH-0004KA-99 for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Aug 2017 08:31:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmJC6-0004Ir-Dm for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2017 08:31:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmJC1-0005Yv-W5 for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2017 08:31:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50248) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmJC1-0005Yp-S1 for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2017 08:31:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dmJC1-0003GB-Lf for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2017 08:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daiki Ueno Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Aug 2017 12:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28114 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28114-submit@debbugs.gnu.org id=B28114.150392342512488 (code B ref 28114); Mon, 28 Aug 2017 12:31:01 +0000 Original-Received: (at 28114) by debbugs.gnu.org; 28 Aug 2017 12:30:25 +0000 Original-Received: from localhost ([127.0.0.1]:58929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmJBQ-0003FM-W3 for submit@debbugs.gnu.org; Mon, 28 Aug 2017 08:30:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmJBP-0003FA-Pi for 28114@debbugs.gnu.org; Mon, 28 Aug 2017 08:30:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmJBG-00055k-7M for 28114@debbugs.gnu.org; Mon, 28 Aug 2017 08:30:18 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmJBG-00055e-4Y; Mon, 28 Aug 2017 08:30:14 -0400 Original-Received: from du-a.org ([219.94.251.20]:34072 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dmJBE-0002BZ-Vq; Mon, 28 Aug 2017 08:30:13 -0400 In-Reply-To: <83mv6xdyfi.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Aug 2017 12:20:49 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:136293 Archived-At: Hello, Eli Zaretskii writes: >> From: "Rainer Gemulla" >> Date: Wed, 16 Aug 2017 20:09:46 +0000 >> >> When I use plstore with gnupg (from either Cygwin or directly the >> Windows version), plstore does not >> correctly decrypt. >> >> The reason seems to be that spurious carriage return characters are >> added when encrypting the plstore file. >> When later decrypting it, these carriage returns make gnupg fail. >> >> This issue can be reproduced by opening a plstore file in >> plstore-mode and encrypting and decrypting it >> repeatedly via C-c C-c. The added carriage returns are directly visible. >> >> The error also affects other packages that use the plstore. >> >> A quick workaround for me was to add an advice that removes the >> carriage returns (here ^M needs to be >> replaced by the carriage return character): > > Daiki, could you please look into this? AFAICT, the problem is that > plstore.el uses insert-file-contents-literally to read the files, > which leaves the CR characters intact. Why does plstore.el needs to > use that function? Can it instead bind coding-system-for-read to > raw-text, and then use insert-file-contents? Or even just use > insert-file-contents? Sorry for the late response. I barely remember the detail, but I suppose it is a leftover when I made plstore editable. It sounds good to just use insert-file-contents here. Regards, -- Daiki Ueno