unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14510: Fix call to epa-decrypt-file in epa-dired-do-decrypt
@ 2013-05-30  7:17 Samuel Loury
  2013-05-30 22:55 ` Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Loury @ 2013-05-30  7:17 UTC (permalink / raw)
  To: 14510


[-- Attachment #1.1: Type: text/plain, Size: 824 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: patch --]
[-- Type: text/x-diff, Size: 2045 bytes --]

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


[-- Attachment #1.3: Type: text/plain, Size: 99 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 489 bytes --]

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

end of thread, other threads:[~2013-06-10  0:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-30  7:17 bug#14510: Fix call to epa-decrypt-file in epa-dired-do-decrypt Samuel Loury
2013-05-30 22:55 ` Richard Stallman
2013-06-10  0:33   ` Glenn Morris

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