unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28114: 25.2; plstore decrypt erroneous on Windows due to carriage return characters
@ 2017-08-16 20:09 Rainer Gemulla
  2017-08-18  9:20 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Rainer Gemulla @ 2017-08-16 20:09 UTC (permalink / raw)
  To: 28114

[-- Attachment #1: Type: text/plain, Size: 19029 bytes --]

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):

   (defun rg/plstore--init-from-buffer-advice (orig-fun &rest plstore)
     (goto-char (point-min))
     (save-match-data
       (let ((inhibit-modification-hooks t))
         (while (re-search-forward "^M" nil t)
           (replace-match ""))))
     (save-buffer)
     (apply orig-fun plstore))
   (advice-add 'plstore--init-from-buffer
               :around #'rg/plstore--init-from-buffer-advice))


In GNU Emacs 25.2.1 (x86_64-w64-mingw32)
  of 2017-04-24 built on KAEL
Repository revision: 784602b10506c50075aa9463891a47380ebea55f
Windowing system distributor 'Microsoft Corp.', version 10.0.15063
Configured using:
  'configure --prefix=/tmp/emacs --without-imagemagick --without-dbus
  --with-modules 'CFLAGS=-O2 -fomit-frame-pointer -g0''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS MODULES

Important settings:
   value of $LANG: DEU
   locale-coding-system: cp1252

Major mode: Emacs-Lisp

Minor modes in effect:
   hi-lock-mode: t
   highlight-thing-mode: t
   rainbow-delimiters-mode: t
   show-smartparens-global-mode: t
   show-smartparens-mode: t
   smartparens-global-mode: t
   smartparens-mode: t
   global-hl-line-mode: t
   company-quickhelp-mode: t
   company-quickhelp-local-mode: t
   global-company-mode: t
   company-mode: t
   persistent-scratch-autosave-mode: t
   flyspell-lazy-mode: t
   ivy-mode: t
   delete-selection-mode: t
   recentf-mode: t
   display-time-mode: t
   auto-compile-on-load-mode: t
   override-global-mode: t
   tooltip-mode: t
   global-eldoc-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   column-number-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent messages:
Matches: \\(?:[/ ][-+]?[0-9]+[hdwmy]\\)?\\)"
user-error: Cannot enlarge selected window
Undo!
Mark set
Mark saved where search started
Quit
Mark set
Quit
Mark saved where search started
Mark set

Load-path shadows:
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-scala hides 
c:/Users/rg/.emacs.d/elpa/scala-mode-20170802.432/ob-scala
c:/Users/rg/.emacs.d/elpa/org-20170814/ox hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ox
c:/Users/rg/.emacs.d/elpa/org-20170814/ox-texinfo hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ox-texinfo
c:/Users/rg/.emacs.d/elpa/org-20170814/ox-publish hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ox-publish
c:/Users/rg/.emacs.d/elpa/org-20170814/ox-org hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ox-org
c:/Users/rg/.emacs.d/elpa/org-20170814/ox-odt hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ox-odt
c:/Users/rg/.emacs.d/elpa/org-20170814/ox-md hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ox-md
c:/Users/rg/.emacs.d/elpa/org-20170814/ox-man hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ox-man
c:/Users/rg/.emacs.d/elpa/org-20170814/ox-latex hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ox-latex
c:/Users/rg/.emacs.d/elpa/org-20170814/ox-icalendar hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ox-icalendar
c:/Users/rg/.emacs.d/elpa/org-20170814/ox-html hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ox-html
c:/Users/rg/.emacs.d/elpa/org-20170814/ox-beamer hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ox-beamer
c:/Users/rg/.emacs.d/elpa/org-20170814/ox-ascii hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ox-ascii
c:/Users/rg/.emacs.d/elpa/org-20170814/org hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org
c:/Users/rg/.emacs.d/elpa/org-20170814/org-w3m hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-w3m
c:/Users/rg/.emacs.d/elpa/org-20170814/org-version hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-version
c:/Users/rg/.emacs.d/elpa/org-20170814/org-timer hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-timer
c:/Users/rg/.emacs.d/elpa/org-20170814/org-table hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-table
c:/Users/rg/.emacs.d/elpa/org-20170814/org-src hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-src
c:/Users/rg/.emacs.d/elpa/org-20170814/org-rmail hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-rmail
c:/Users/rg/.emacs.d/elpa/org-20170814/org-protocol hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-protocol
c:/Users/rg/.emacs.d/elpa/org-20170814/org-plot hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-plot
c:/Users/rg/.emacs.d/elpa/org-20170814/org-pcomplete hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-pcomplete
c:/Users/rg/.emacs.d/elpa/org-20170814/org-mouse hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-mouse
c:/Users/rg/.emacs.d/elpa/org-20170814/org-mobile hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-mobile
c:/Users/rg/.emacs.d/elpa/org-20170814/org-mhe hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-mhe
c:/Users/rg/.emacs.d/elpa/org-20170814/org-macs hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-macs
c:/Users/rg/.emacs.d/elpa/org-20170814/org-macro hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-macro
c:/Users/rg/.emacs.d/elpa/org-20170814/org-loaddefs hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-loaddefs
c:/Users/rg/.emacs.d/elpa/org-20170814/org-list hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-list
c:/Users/rg/.emacs.d/elpa/org-20170814/org-irc hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-irc
c:/Users/rg/.emacs.d/elpa/org-20170814/org-install hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-install
c:/Users/rg/.emacs.d/elpa/org-20170814/org-inlinetask hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-inlinetask
c:/Users/rg/.emacs.d/elpa/org-20170814/org-info hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-info
c:/Users/rg/.emacs.d/elpa/org-20170814/org-indent hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-indent
c:/Users/rg/.emacs.d/elpa/org-20170814/org-id hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-id
c:/Users/rg/.emacs.d/elpa/org-20170814/org-habit hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-habit
c:/Users/rg/.emacs.d/elpa/org-20170814/org-gnus hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-gnus
c:/Users/rg/.emacs.d/elpa/org-20170814/org-footnote hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-footnote
c:/Users/rg/.emacs.d/elpa/org-20170814/org-feed hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-feed
c:/Users/rg/.emacs.d/elpa/org-20170814/org-faces hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-faces
c:/Users/rg/.emacs.d/elpa/org-20170814/org-eshell hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-eshell
c:/Users/rg/.emacs.d/elpa/org-20170814/org-entities hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-entities
c:/Users/rg/.emacs.d/elpa/org-20170814/org-element hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-element
c:/Users/rg/.emacs.d/elpa/org-20170814/org-docview hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-docview
c:/Users/rg/.emacs.d/elpa/org-20170814/org-datetree hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-datetree
c:/Users/rg/.emacs.d/elpa/org-20170814/org-ctags hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-ctags
c:/Users/rg/.emacs.d/elpa/org-20170814/org-crypt hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-crypt
c:/Users/rg/.emacs.d/elpa/org-20170814/org-compat hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-compat
c:/Users/rg/.emacs.d/elpa/org-20170814/org-colview hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-colview
c:/Users/rg/.emacs.d/elpa/org-20170814/org-clock hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-clock
c:/Users/rg/.emacs.d/elpa/org-20170814/org-capture hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-capture
c:/Users/rg/.emacs.d/elpa/org-20170814/org-bibtex hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-bibtex
c:/Users/rg/.emacs.d/elpa/org-20170814/org-bbdb hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-bbdb
c:/Users/rg/.emacs.d/elpa/org-20170814/org-attach hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-attach
c:/Users/rg/.emacs.d/elpa/org-20170814/org-archive hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-archive
c:/Users/rg/.emacs.d/elpa/org-20170814/org-agenda hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/org-agenda
c:/Users/rg/.emacs.d/elpa/org-20170814/ob hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-tangle hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-tangle
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-table hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-table
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-sqlite hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-sqlite
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-sql hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-sql
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-shen hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-shen
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-screen hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-screen
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-scheme hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-scheme
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-scala hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-scala
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-sass hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-sass
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-ruby hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-ruby
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-ref hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-ref
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-R hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-R
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-python hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-python
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-plantuml hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-plantuml
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-picolisp hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-picolisp
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-perl hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-perl
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-org hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-org
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-octave hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-octave
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-ocaml hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-ocaml
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-mscgen hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-mscgen
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-maxima hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-maxima
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-matlab hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-matlab
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-makefile hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-makefile
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-lob hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-lob
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-lisp hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-lisp
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-lilypond hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-lilypond
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-ledger hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-ledger
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-latex hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-latex
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-keys hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-keys
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-js hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-js
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-java hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-java
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-io hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-io
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-haskell hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-haskell
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-gnuplot hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-gnuplot
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-fortran hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-fortran
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-exp hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-exp
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-eval hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-eval
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-emacs-lisp hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-emacs-lisp
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-dot hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-dot
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-ditaa hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-ditaa
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-css hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-css
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-core hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-core
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-comint hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-comint
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-clojure hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-clojure
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-calc hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-calc
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-C hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-C
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-awk hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-awk
c:/Users/rg/.emacs.d/elpa/org-20170814/ob-asymptote hides c:/Program 
Files/emacs/share/emacs/25.2/lisp/org/ob-asymptote

Features:
(shadow sort company-ispell mail-extr emacsbug sendmail pulse eieio-opt
speedbar sb-image ezimage dframe view org-archive org-table cal-move
parse-time org-clock smex ido cal-iso goto-addr org-agenda hi-lock
vc-dispatcher vc-svn colir color bookmark pp company-oddmuse
company-keywords company-etags company-gtags company-dabbrev-code
company-dabbrev company-files company-capf company-cmake company-xcode
company-clang company-semantic company-eclim company-template
company-css company-nxml company-bbdb multiple-cursors
mc-hide-unmatched-lines-mode mc-separate-operations
rectangular-region-mode mc-mark-pop mc-mark-more mc-cycle-cursors
mc-edit-lines multiple-cursors-core rect highlight-thing
rainbow-delimiters paren smartparens-config smartparens hl-line
company-quickhelp pos-tip company org-bullets org-indent org-rmail
org-mhe org-irc org-info org-gnus org-docview doc-view subr-x image-mode
org-bibtex bibtex org-bbdb org-w3m persistent-scratch flyspell-lazy
flyspell ispell warnings compile autoload lisp-mnt mm-archive message
dired rfc822 mml mml-sec mailabbrev gmm-utils mailheader mm-decode
mm-bodies mm-encode mail-utils network-stream nsm starttls url-cache
counsel jka-compr esh-util etags xref project swiper ivy flx delsel
ivy-overlay ffap thingatpt recentf tree-widget wid-edit
smart-mode-line-respectful-theme smart-mode-line rich-minority time
edmacro kmacro persistent-soft list-utils pcache eieio-compat eieio-base
font-utils unicode-fonts leuven-theme org-caldav oauth2 json map plstore
epg icalendar diary-lib diary-loaddefs org-id ox-odt rng-loc rng-uri
rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns
nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table ox-ascii
ox-publish ox url-dav url-http tls gnutls url url-proxy url-privacy
url-expand url-methods url-history mailcap url-auth mail-parse rfc2231
rfc2047 rfc2045 ietf-drums url-cookie url-domsuf url-gw url-handlers
url-util url-parse auth-source eieio eieio-core gnus-util mm-util
help-fns mail-prsvr password-cache url-vars xml org-element avl-tree org
org-macro org-footnote org-pcomplete pcomplete org-list org-faces
org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle
org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint comint
ansi-color ring ob-core ob-eval org-compat org-macs org-loaddefs
format-spec find-func cal-menu calendar cal-loaddefs auto-compile advice
packed dash use-package diminish bind-key easy-mmode finder-inf tex-site
info cl-seq cl-macs cl package epg-config seq byte-opt gv bytecomp
byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib
server time-date mule-util tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table w32-win
w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
w32notify w32 multi-tty make-network-process emacs)

Memory information:
((conses 16 793713 93490)
  (symbols 56 46163 0)
  (miscs 48 4921 4700)
  (strings 32 151392 16039)
  (string-bytes 1 4298025)
  (vectors 16 72159)
  (vector-slots 8 1749701 59951)
  (floats 8 8270 1559)
  (intervals 56 38775 1032)
  (buffers 976 49))

[-- Attachment #2: Type: text/html, Size: 20773 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#28114: 25.2; plstore decrypt erroneous on Windows due to carriage return characters
  2017-08-16 20:09 bug#28114: 25.2; plstore decrypt erroneous on Windows due to carriage return characters Rainer Gemulla
@ 2017-08-18  9:20 ` Eli Zaretskii
  2017-08-28 12:30   ` Daiki Ueno
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2017-08-18  9:20 UTC (permalink / raw)
  To: Rainer Gemulla, Daiki Ueno; +Cc: 28114

> From: "Rainer Gemulla" <rgemulla@uni-mannheim.de>
> 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?

Thanks.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#28114: 25.2; plstore decrypt erroneous on Windows due to carriage return characters
  2017-08-18  9:20 ` Eli Zaretskii
@ 2017-08-28 12:30   ` Daiki Ueno
  2017-08-29 15:45     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Daiki Ueno @ 2017-08-28 12:30 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 28114, Rainer Gemulla

Hello,

Eli Zaretskii <eliz@gnu.org> writes:

>> From: "Rainer Gemulla" <rgemulla@uni-mannheim.de>
>> 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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#28114: 25.2; plstore decrypt erroneous on Windows due to carriage return characters
  2017-08-28 12:30   ` Daiki Ueno
@ 2017-08-29 15:45     ` Eli Zaretskii
  2017-08-29 15:57       ` bug#28114: Re[2]: " Rainer Gemulla
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2017-08-29 15:45 UTC (permalink / raw)
  To: Daiki Ueno; +Cc: 28114, rgemulla

> 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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#28114: Re[2]: bug#28114: 25.2; plstore decrypt erroneous on Windows due to carriage return characters
  2017-08-29 15:45     ` Eli Zaretskii
@ 2017-08-29 15:57       ` Rainer Gemulla
  2017-09-02 10:03         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Rainer Gemulla @ 2017-08-29 15:57 UTC (permalink / raw)
  To: Eli Zaretskii, Daiki Ueno; +Cc: 28114

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" 
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 
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.






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#28114: 25.2; plstore decrypt erroneous on Windows due to carriage return characters
  2017-08-29 15:57       ` bug#28114: Re[2]: " Rainer Gemulla
@ 2017-09-02 10:03         ` Eli Zaretskii
  2017-09-02 10:10           ` Rainer Gemulla
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2017-09-02 10:03 UTC (permalink / raw)
  To: Rainer Gemulla; +Cc: ueno, 28114-done

> From: "Rainer Gemulla" <rgemulla@uni-mannheim.de>
> Cc: 28114@debbugs.gnu.org
> Date: Tue, 29 Aug 2017 15:57:56 +0000
> 
> 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" 
> 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))))

Thanks, pushed to the master branch, and I'm marking this bug done.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#28114: 25.2; plstore decrypt erroneous on Windows due to carriage return characters
  2017-09-02 10:03         ` Eli Zaretskii
@ 2017-09-02 10:10           ` Rainer Gemulla
  0 siblings, 0 replies; 7+ messages in thread
From: Rainer Gemulla @ 2017-09-02 10:10 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: ueno, 28114-done

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

Thanks a lot!

Best,
Rainer 

Am 2. September 2017 12:03:53 MESZ schrieb Eli Zaretskii <eliz@gnu.org>:
>> From: "Rainer Gemulla" <rgemulla@uni-mannheim.de>
>> Cc: 28114@debbugs.gnu.org
>> Date: Tue, 29 Aug 2017 15:57:56 +0000
>> 
>> 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" 
>> 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))))
>
>Thanks, pushed to the master branch, and I'm marking this bug done.

[-- Attachment #2: Type: text/html, Size: 1548 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-09-02 10:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-16 20:09 bug#28114: 25.2; plstore decrypt erroneous on Windows due to carriage return characters Rainer Gemulla
2017-08-18  9:20 ` Eli Zaretskii
2017-08-28 12:30   ` Daiki Ueno
2017-08-29 15:45     ` Eli Zaretskii
2017-08-29 15:57       ` bug#28114: Re[2]: " Rainer Gemulla
2017-09-02 10:03         ` Eli Zaretskii
2017-09-02 10:10           ` Rainer Gemulla

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).