[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] [emacs] 01/01: epg: Don't show "*Error*" buffer when visit
From: |
Daiki Ueno |
Subject: |
[Emacs-diffs] [emacs] 01/01: epg: Don't show "*Error*" buffer when visiting a new file |
Date: |
Tue, 18 Nov 2014 03:48:59 +0000 |
branch: master
commit b12bb4dc3ecc74c99031538fc8d3565d276a18d7
Author: Daiki Ueno <address@hidden>
Date: Tue Nov 18 12:46:15 2014 +0900
epg: Don't show "*Error*" buffer when visiting a new file
* epa-file.el (epa-file-insert-file-contents): Don't show
"*Error*" buffer if input file does not exist.
Reported by Herbert J. Skuhra.
---
lisp/ChangeLog | 6 ++++++
lisp/epa-file.el | 12 ++++++------
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 968ea8d..462d004 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2014-11-18 Daiki Ueno <address@hidden>
+
+ * epa-file.el (epa-file-insert-file-contents): Don't show
+ "*Error*" buffer if input file does not exist.
+ Reported by Herbert J. Skuhra.
+
2014-11-18 Paul Pogonyshev <address@hidden>
RĂ¼diger Sonderfeld <address@hidden>
diff --git a/lisp/epa-file.el b/lisp/epa-file.el
index e70bf6d..cdaa8ba 100644
--- a/lisp/epa-file.el
+++ b/lisp/epa-file.el
@@ -153,7 +153,6 @@ encryption is used."
(condition-case error
(setq string (epg-decrypt-file context local-file nil))
(error
- (epa-display-error context)
(if (setq entry (assoc file epa-file-passphrase-alist))
(setcdr entry nil))
;; If the decryption program can't be found,
@@ -164,15 +163,16 @@ encryption is used."
(equal (cadr error) "Searching for program"))
(error "Decryption program `%s' not found"
(nth 3 error)))
- ;; Hack to prevent find-file from opening empty buffer
- ;; when decryption failed (bug#6568). See the place
- ;; where `find-file-not-found-functions' are called in
- ;; `find-file-noselect-1'.
(when (file-exists-p local-file)
+ ;; Hack to prevent find-file from opening empty buffer
+ ;; when decryption failed (bug#6568). See the place
+ ;; where `find-file-not-found-functions' are called in
+ ;; `find-file-noselect-1'.
(setq-local epa-file-error error)
(add-hook 'find-file-not-found-functions
'epa-file--find-file-not-found-function
- nil t))
+ nil t)
+ (epa-display-error context))
(signal 'file-error
(cons "Opening input file" (cdr error)))))
(set-buffer buf) ;In case timer/filter changed/killed it (bug#16029)!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] [emacs] 01/01: epg: Don't show "*Error*" buffer when visiting a new file,
Daiki Ueno <=