From: Christian Schwarzgruber <c.schwarzgruber.cs@gmail.com>
To: 21947@debbugs.gnu.org
Subject: bug#21947: 24.5; epa: option for always replace encrypted text without asking
Date: Tue, 17 Nov 2015 23:04:49 +0100 [thread overview]
Message-ID: <877flgtigb.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 635 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hey,
I would like to provide a patch for a new functionality in epa.el.
When I get a new encrypted email and I hit `C-c C-e d' (epa-mail-decrypt) epa
asks, if I want replace the original text. Which in my opinion is a bit
superfluous in this case. This will become especially unpleasant once the
auto-decrypt functionality is implemented in mu/mu4e.
So I patched epa.el and added a boolean `defcustom', when set to `t',
the text will always be replaced without asking.
Thank you for your attention!
- --
Christian Schwarzgruber
E: c.schwarzgruber.cs@gmail.com
GPG key ID: C57AB673
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-epa.el-add-option-to-always-replace-original-te.patch --]
[-- Type: text/x-patch, Size: 1173 bytes --]
From ce12716f1c2760fd356aadf0fffff118fd5643d9 Mon Sep 17 00:00:00 2001
From: Christian Schwarzgruber <c.schwarzgruber.cs@gmail.com>
Date: Sun, 15 Nov 2015 22:31:41 +0100
Subject: [PATCH] lisp/epa.el: add option to always replace original text
---
lisp/epa.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lisp/epa.el b/lisp/epa.el
index 9f112c4..af5688b 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -34,6 +34,11 @@ epa
:link '(custom-manual "(epa) Top")
:group 'epg)
+(defcustom epa-always-replace-original-text nil
+ "Always replace original text with decrypted."
+ :type 'boolean
+ :group 'epa)
+
(defcustom epa-popup-info-window t
"If non-nil, display status information from epa commands in another window."
:type 'boolean
@@ -872,7 +877,8 @@ epa-decrypt-region
(with-current-buffer (funcall make-buffer-function)
(let ((inhibit-read-only t))
(insert plain)))
- (if (y-or-n-p "Replace the original text? ")
+ (if (or epa-always-replace-original-text
+ (y-or-n-p "Replace the original text? "))
(let ((inhibit-read-only t))
(delete-region start end)
(goto-char start)
--
2.5.0
[-- Attachment #3: Type: text/plain, Size: 819 bytes --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJWS6R9AAoJEJpBtqnFerZzEHcP/jbW5atRNXOoZ7QYrt+p8EJA
xeVUdVEBXmsbCp+lRcMSSrrMG84/cZQF2zgjOQd/zqcW4S3L7KU4d/NdCk2Sr5vL
wDZwIn61W6mTVDsrOUcwVZOACeunin4ODCO7yeGQcnzI/+hEOEzGHBEVViwCHTYL
RNdzsQZq6RSR4y7HTqVziuGWwknESqhNx4CzUSnfwkB5EgPgAHRjCF4kT39ujqGS
xnIQvs1zt3emNcgRJ/Vga1awKEeroC0dsvKCWYFvQIJghExyyKZWdl07oFUq5U8f
J0LybrVBwPIXcu91v40aeOplZv00A+KfUJnk0drqC54xZ8CGTuep0qLTCi4z5vyQ
ITbOtkB95Ps/9b9JOh4ZgET2pn7aQADfs+sBJ8nykCxF41d93tlXrWFbAGLVPuh0
ayYOl/MX1hi9dexacAA6FcjERuLwwiHXwQ18Y/OGuYBhGh4khmNOWsvJrHDpDOLx
Wre9Xaw9lfVg4KkOW8Eqha1xJItHiTo6V0jSBXM7jhjqAMlXCbLZ201yQaarRPPw
+227tLhuSAPCWxhcHF3+uB/jnXj97PElTiEQh9fzqAOm8dv2UueHg7HyK5REUDCr
8r+JL1lxoaubupvWA1sQfoWYOLDiIMZQ2zf6KbzsxIrwM+tSdCjivCJtvzBrHMrw
zUzgtTS3KbzW6bo1E061
=CPhT
-----END PGP SIGNATURE-----
next reply other threads:[~2015-11-17 22:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 22:04 Christian Schwarzgruber [this message]
2015-11-18 2:05 ` bug#21947: 24.5; epa: option for always replace encrypted text without asking Daiki Ueno
2015-11-18 21:39 ` Christian Schwarzgruber
2015-11-19 3:12 ` Daiki Ueno
2015-11-19 7:53 ` Christian Schwarzgruber
2017-04-06 21:17 ` Christian Schwarzgruber
2017-04-06 22:12 ` npostavs
2017-04-07 9:48 ` Christian Schwarzgruber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877flgtigb.fsf@gmail.com \
--to=c.schwarzgruber.cs@gmail.com \
--cc=21947@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.