GNU bug report logs - #14510
Fix call to epa-decrypt-file in epa-dired-do-decrypt

Previous Next

Package: emacs;

Reported by: Samuel Loury <konubinix <at> gmail.com>

Date: Thu, 30 May 2013 07:23:02 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14510 in the body.
You can then email your comments to 14510 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#14510; Package emacs. (Thu, 30 May 2013 07:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Samuel Loury <konubinix <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 30 May 2013 07:23:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Samuel Loury <konubinix <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Fix call to epa-decrypt-file in epa-dired-do-decrypt
Date: Thu, 30 May 2013 09:17:23 +0200
[Message part 1 (text/plain, inline)]
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.

[0001-epa-dired.el-epa-dired-do-decrypt-Fix-epa-dired-do-d.patch (text/x-diff, inline)]
From ea839d192dcf98d436f9d5da922bbb5eb3fbd8bd Mon Sep 17 00:00:00 2001
From: Samuel Loury <samuel.loury <at> 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 <at> 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 <at> 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

[Message part 3 (text/plain, inline)]
--
Konubinix
GPG Key    : 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14510; Package emacs. (Thu, 30 May 2013 22:57:01 GMT) Full text and rfc822 format available.

Message #8 received at 14510 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Samuel Loury <konubinix <at> gmail.com>
Cc: 14510 <at> debbugs.gnu.org
Subject: Re: bug#14510: Fix call to epa-decrypt-file in epa-dired-do-decrypt
Date: Thu, 30 May 2013 18:55:12 -0400
Sorry I didn't notice the need for this fix.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14510; Package emacs. (Mon, 10 Jun 2013 00:34:02 GMT) Full text and rfc822 format available.

Message #11 received at 14510 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Samuel Loury <konubinix <at> gmail.com>,  14510 <at> debbugs.gnu.org
Cc: rms <at> gnu.org
Subject: Re: bug#14510: Fix call to epa-decrypt-file in epa-dired-do-decrypt
Date: Sun, 09 Jun 2013 20:33:43 -0400
Thanks for the patch. I installed something slightly different, which is
both backwards compatible and avoids code duplication.




bug closed, send any further explanations to 14510 <at> debbugs.gnu.org and Samuel Loury <konubinix <at> gmail.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 10 Jun 2013 00:35:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 08 Jul 2013 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 320 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.