bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14510: Fix call to epa-decrypt-file in epa-dired-do-decrypt


From: Samuel Loury
Subject: bug#14510: Fix call to epa-decrypt-file in epa-dired-do-decrypt
Date: Thu, 30 May 2013 09:17:23 +0200
User-agent: Notmuch/0.15 (http://notmuchmail.org) Emacs/24.3.50.1 (x86_64-unknown-linux-gnu)

Hi,

I would like to provide a patch for a bug in epa-dired-do-decrypt
introduced in commit ac653402cef42324ccecfca09690073232f74ba8 (git sha
From git://git.savannah.gnu.org/emacs.git).

The commit ac653402cef42324ccecfca09690073232f74ba8 added an argument to
the function epa-decrypt-file so that the plain file was explicit and no
more asked to the user.

The epa-dired-do-decrypt function relied on this feature and now fails
complaining that epa-decrypt-file is called with the wrong number of
arguments.

To reproduce the bug, have dired show a directory with a .gpg file in it
and call epa-dired-do-decrypt with this file selected.

I had epa-dired-do-decrypt to work like before the change by moving the
 code that computed the plain file into epa-dired-do-decrypt.

Thanks for your attention.

From ea839d192dcf98d436f9d5da922bbb5eb3fbd8bd Mon Sep 17 00:00:00 2001
From: Samuel Loury <samuel.loury@cosmo-platform.org>
Date: Thu, 30 May 2013 08:59:35 +0200
Subject: [PATCH] * epa-dired.el (epa-dired-do-decrypt): Fix
 epa-dired-do-decrypt   giving epa-decrypt-file the plain
 file, following the arguments   changes made in
 ac653402cef42324ccecfca09690073232f74ba8

---
 lisp/ChangeLog    |    5 +++++
 lisp/epa-dired.el |   13 ++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 82e0f48..dc4a8ba 100644
*** a/lisp/ChangeLog
--- b/lisp/ChangeLog
***************
*** 1,3 ****
--- 1,8 ----
+ 2013-05-30  Samuel Loury  <konubinix@gmail.com>
+       * epa-dired.el (epa-dired-do-decrypt): Fix epa-dired-do-decrypt
+       giving epa-decrypt-file the plain file, following the arguments
+       changes made in ac653402cef42324ccecfca09690073232f74ba8
+ 
  2013-05-30  Glenn Morris  <rgm@gnu.org>
  
        * ielm.el (ielm-map, ielm-complete-symbol):
diff --git a/lisp/epa-dired.el b/lisp/epa-dired.el
index a01f064..190eabf 100644
*** a/lisp/epa-dired.el
--- b/lisp/epa-dired.el
***************
*** 31,37 ****
    (interactive)
    (let ((file-list (dired-get-marked-files)))
      (while file-list
!       (epa-decrypt-file (expand-file-name (car file-list)))
        (setq file-list (cdr file-list)))
      (revert-buffer)))
  
- - 
--- 31,48 ----
    (interactive)
    (let ((file-list (dired-get-marked-files)))
      (while file-list
!       (let* ((decrypt-file (expand-file-name (car file-list)))
!            (default-name (file-name-sans-extension
!                           decrypt-file))
!            (plain (expand-file-name
!                    (read-file-name
!                     (concat "To file (default "
!                             (file-name-nondirectory default-name)
!                             ") ")
!                     (file-name-directory default-name)
!                     default-name))))
!       (epa-decrypt-file decrypt-file plain)
!       )
        (setq file-list (cdr file-list)))
      (revert-buffer)))
  
1.7.10.4

--
Konubinix
GPG Key    : 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]