emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master df1e4ea: lisp/gnus/mail-source.el (mail-source-call


From: Katsumi Yamaoka
Subject: [Emacs-diffs] master df1e4ea: lisp/gnus/mail-source.el (mail-source-call-script): Pop up an error buffer if a mail script fails
Date: Thu, 05 Feb 2015 07:52:30 +0000

branch: master
commit df1e4ea210c081c969e092628aa999b1a4d59dfd
Author: Timo Lilja <address@hidden>
Commit: Katsumi Yamaoka <address@hidden>

    lisp/gnus/mail-source.el (mail-source-call-script): Pop up an error buffer 
if a mail script fails
---
 lisp/gnus/ChangeLog      |    5 +++++
 lisp/gnus/mail-source.el |   15 +++++++++------
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 0616a9e..19bf562 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-05  Timo Lilja  <address@hidden>  (tiny change)
+
+       * mail-source.el (mail-source-call-script): If scripts exit with an
+       error, pop up an error buffer.
+
 2015-02-05  Lars Ingebrigtsen  <address@hidden>
 
        * gnus-sum.el (gnus-extra-headers): Add the popular Gmail X-GM-LABELS
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index eb05d71..94c8950 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -750,13 +750,16 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff 
bfile)
       (setq script (substring script 0 (match-beginning 0))
            background 0))
     (setq result
-         (call-process shell-file-name nil background nil
+         (call-process shell-file-name nil stderr nil
                        shell-command-switch script))
-    (when (and result
-              (not (zerop result)))
-      (set-buffer stderr)
-      (message "Mail source error: %s" (buffer-string)))
-    (kill-buffer stderr)))
+    (if (and result
+             (not (zerop result)))
+        (progn
+          (split-window-vertically)
+          (other-window 1)
+          (switch-to-buffer stderr)
+          (message "Mail source error: %s " (buffer-string)))
+      (kill-buffer stderr))))
 
 ;;;
 ;;; Different fetchers



reply via email to

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