Menu

#24 ps-ccrypt broken on Emacs 26.1

v1.0_(example)
closed-fixed
nobody
None
5
2018-07-27
2018-07-25
No

Hi,

I'm using Emacs w/ ccrypt via ps-ccrypt.el, and have been since Emacs 23 IIRC. It seems broken on 26.1.

Repro Steps
1. Create an encrypted text file test.txt.cpt.
1. Open Emacs without any additional configuration: emacs -q -nw.
1. Start IELM: M-x ielm.
1. Load ps-ccrypt.el: (load "~/tmp/ps-ccrypt.el").
1. Require it: (require 'ps-ccrypt).
1. Visit the text file: C-x f ~/tmp/test.txt.cpt, and supply the encryption password.
1. File decrypts correctly with message decrypting test.txt.cpt...done.
1. Modify the buffer.
1. Save the buffer: C-x C-s.

Expected
The file should save in encrypted form, without errors.

Actual
The following error is displayed:

Saving file /home/duncan/tmp/test.txt.cpt...
apply: Wrong number of arguments: (lambda (start end file &optional append visit) (let* ((filename (expand-file-name file)) (visit-file (if (stringp visit) (expand-file-\
name visit) filename)) (info (ps-ccrypt-get-encryption-info visit-file))) (if info (let ((can-append (ps-ccrypt-info-can-append info)) (encrypt-message (ps-ccrypt-info-e\
ncrypt-message info)) (encrypt-command (ps-ccrypt-info-encrypt-command info)) (password (if (ps-ccrypt-info-password-flag info) (or (ps-ccrypt-get-buffer-password) (ps-c\
crypt-read-passwd t)) nil)) (retvals (ps-ccrypt-info-retval-list info)) (base-name (file-name-nondirectory visit-file)) temp-file temp-buffer (coding-system-used last-co\
ding-system-used)) (setq temp-buffer (get-buffer-create " *ps-ccrypt-wr-temp*")) (save-current-buffer (set-buffer temp-buffer) (widen) (erase-buffer)) (if (and append (n\
ot can-append) (file-exists-p filename)) (let* ((local-copy (file-local-copy filename)) (local-file (or local-copy filename))) (setq temp-file local-file)) (setq temp-fi\
le (ps-ccrypt-make-temp-name))) (and encrypt-message (message "%s %s..." encrypt-message base-name)) (ps-ccrypt-run-real-handler (quote write-region) (list start end tem\
p-file t (quote dont))) (setq coding-system-used last-coding-system-used) (let ((coding-system-for-read (quote no-conversion))) (setq password (ps-ccrypt-call-process en\
crypt-command nil (concat encrypt-message " " base-name) temp-file temp-buffer retvals password))) (save-current-buffer (set-buffer temp-buffer) (let ((coding-system-for\
-write (quote no-conversion))) (if (memq system-type (quote (ms-dos windows-nt))) (setq buffer-file-type t)) (ps-ccrypt-run-real-handler (quote write-region) (list (poin\
t-min) (point-max) filename (and append can-append) (quote dont))) (erase-buffer))) ...) (ps-ccrypt-run-real-handler (quote write-region) (list start end filename append\
 visit))))), 7

Versions
GNU Emacs 26.1
FreeBSD 11.1-RELEASE GENERIC amd64

Discussion

  • Peter Selinger

    Peter Selinger - 2018-07-26

    Thanks for reporting this. I have not yet upgraded to Emacs 26, so I didn't experience this bug myself. I have put an updated version of ps-ccrypt.el here:

    http://ccrypt.sourceforge.net/#news

    I will release an updated version of ccrypt soon. -- Peter

     
  • Duncan Bayne

    Duncan Bayne - 2018-07-26

    Thanks for the prompt reply Peter! Much appreciated. I actually hadn't even realised I'd upgraded Emacs along with a bunch of other packages, and spent some time in mild confusion :) "How did this work yesterday? What's changed????"

     
  • Duncan Bayne

    Duncan Bayne - 2018-07-26

    Thanks, tested on 26.1. Works a treat! :)

     
  • Peter Selinger

    Peter Selinger - 2018-07-27
    • status: open --> closed-fixed
     
  • Peter Selinger

    Peter Selinger - 2018-07-27

    This was fixed in ccrypt 1.11.

     

Log in to post a comment.