From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: "Rainer Gemulla" <rgemulla@uni-mannheim.de>
Newsgroups: gmane.emacs.bugs
Subject: bug#28114: Re[2]: bug#28114: 25.2;
	plstore decrypt erroneous on Windows due to carriage return characters
Date: Tue, 29 Aug 2017 15:57:56 +0000
Message-ID: <em9f4596e4-2446-43ee-be14-81d3031619cd@gemma>
References: <em627a0335-f8b0-45af-9b70-c9b5450358cd@potestas>
	<83mv6xdyfi.fsf@gnu.org>
	<od1k21nx4c6.fsf-ueno@gnu.org> <83tw0q2xaa.fsf@gnu.org>
Reply-To: Rainer Gemulla <rgemulla@uni-mannheim.de>
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1504022366 767 195.159.176.226 (29 Aug 2017 15:59:26 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 29 Aug 2017 15:59:26 +0000 (UTC)
User-Agent: eM_Client/7.1.30794.0
Cc: 28114@debbugs.gnu.org
To: "Eli Zaretskii" <eliz@gnu.org>, "Daiki Ueno" <ueno@gnu.org>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 29 17:59:21 2017
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1dmiv1-0007me-OG
	for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Aug 2017 17:59:11 +0200
Original-Received: from localhost ([::1]:45655 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1dmiv5-0002jV-Mp
	for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Aug 2017 11:59:15 -0400
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56817)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1dmiuw-0002iQ-Gc
	for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2017 11:59:07 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1dmius-0006St-Jc
	for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2017 11:59:06 -0400
Original-Received: from debbugs.gnu.org ([208.118.235.43]:52208)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
	id 1dmius-0006Sl-Fs
	for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2017 11:59:02 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1dmius-0001Ck-8P
	for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2017 11:59:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: "Rainer Gemulla" <rgemulla@uni-mannheim.de>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Tue, 29 Aug 2017 15:59:02 +0000
Resent-Message-ID: <handler.28114.B28114.15040222854562@debbugs.gnu.org>
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.15040222854562
	(code B ref 28114); Tue, 29 Aug 2017 15:59:02 +0000
Original-Received: (at 28114) by debbugs.gnu.org; 29 Aug 2017 15:58:05 +0000
Original-Received: from localhost ([127.0.0.1]:60889 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1dmitw-0001BW-Mi
	for submit@debbugs.gnu.org; Tue, 29 Aug 2017 11:58:04 -0400
Original-Received: from smtp.mail.uni-mannheim.de ([134.155.96.80]:38991)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <rgemulla@uni-mannheim.de>) id 1dmitv-0001B3-MA
	for 28114@debbugs.gnu.org; Tue, 29 Aug 2017 11:58:04 -0400
Original-Received: from localhost (localhost [127.0.0.1])
	by smtp.mail.uni-mannheim.de (Postfix) with ESMTP id 809DA103719;
	Tue, 29 Aug 2017 17:57:57 +0200 (CEST)
X-Virus-Scanned: amavisd-new at uni-mannheim.de
Original-Received: from smtp.mail.uni-mannheim.de ([134.155.96.80])
	by localhost (mail-r83.rz.uni-mannheim.de [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id LdPZi5-oAx5r; Tue, 29 Aug 2017 17:57:57 +0200 (CEST)
Original-Received: from [10.59.1.189] (ipbcc0fb3a.dynamic.kabel-deutschland.de
	[188.192.251.58])
	by smtp.mail.uni-mannheim.de (Postfix) with ESMTPSA id 339AB10311C;
	Tue, 29 Aug 2017 17:57:57 +0200 (CEST)
In-Reply-To: <83tw0q2xaa.fsf@gnu.org>
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" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-gnu-emacs/>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org
Original-Sender: "bug-gnu-emacs"
	<bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.bugs:136327
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/136327>

Yes, seems to work. Here is what I tried:

(defun plstore-open (file)
   "Create a plstore instance associated with FILE."
   (let* ((filename (file-truename file))
          (buffer (or (find-buffer-visiting filename)
                      (generate-new-buffer (format " plstore %s"=20
filename))))
          (store (plstore--make buffer)))
     (with-current-buffer buffer
       (erase-buffer)
       (condition-case nil
           (let ((coding-system-for-read 'raw-text))
             (insert-file-contents file))
         (error))
       (setq buffer-file-name (file-truename file))
       (set-buffer-modified-p nil)
       (plstore--init-from-buffer store)
       store))))

R

------ Original Message ------
From: "Eli Zaretskii" <eliz@gnu.org>
To: "Daiki Ueno" <ueno@gnu.org>
Cc: rgemulla@uni-mannheim.de; 28114@debbugs.gnu.org
Sent: 29.8.2017 17:45:01
Subject: Re: bug#28114: 25.2; plstore decrypt erroneous on Windows due=20
to carriage return characters

>>From: Daiki Ueno <ueno@gnu.org>
>>Cc: Rainer Gemulla <rgemulla@uni-mannheim.de>,  28114@debbugs.gnu.org
>>Date: Mon, 28 Aug 2017 14:30:01 +0200
>>
>>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.
>
>Rainer, could you try that and see if using insert-file-contents
>solves your problem?
>
>Thanks.