emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/agitate 69fec6ecf0 1/4: Add ignore-errors in lieu of a


From: ELPA Syncer
Subject: [elpa] externals/agitate 69fec6ecf0 1/4: Add ignore-errors in lieu of a better solution
Date: Wed, 19 Oct 2022 11:57:17 -0400 (EDT)

branch: externals/agitate
commit 69fec6ecf0bde09056cb73480fd709a1eba9c916
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Add ignore-errors in lieu of a better solution
---
 agitate.el | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/agitate.el b/agitate.el
index cf8f70bf0c..4422f6e5b4 100644
--- a/agitate.el
+++ b/agitate.el
@@ -286,23 +286,24 @@ either with `log-edit-kill-buffer' or `log-edit-done'."
   "Set up informative `log-edit' window configuration."
   (delete-other-windows)
   (add-hook 'kill-buffer-hook #'agitate--log-edit-informative-restore nil t)
-  ;; FIXME 2022-10-18: Fails in an empty repo.  It is not nice to use
+  ;; FIXME 2022-10-19: Fails in an empty repo.  It is not nice to use
   ;; `ignore-errors', as we should not display any window in such a
   ;; scenario.  Which VC function can check for a repo without
   ;; revisions?
-  (save-selected-window
-    (log-edit-show-diff))
-  (if agitate-log-edit-informative-show-files
-      (log-edit-show-files)
-    (log-edit-hide-buf log-edit-files-buf))
-  (when agitate-log-edit-informative-show-root-log
+  (ignore-errors
     (save-selected-window
-      (let ((vc-log-show-limit agitate-log-limit)
-            (display-buffer-alist
-             (cons (list (cons 'derived-mode 'log-view-mode)
-                         (list 'display-buffer-below-selected))
-                   display-buffer-alist)))
-        (vc-print-root-log)))))
+      (log-edit-show-diff))
+    (if agitate-log-edit-informative-show-files
+        (log-edit-show-files)
+      (log-edit-hide-buf log-edit-files-buf))
+    (when agitate-log-edit-informative-show-root-log
+      (save-selected-window
+        (let ((vc-log-show-limit agitate-log-limit)
+              (display-buffer-alist
+               (cons (list (cons 'derived-mode 'log-view-mode)
+                           (list 'display-buffer-below-selected))
+                     display-buffer-alist)))
+          (vc-print-root-log))))))
 
 (defun agitate--log-edit-informative-restore ()
   "Restore `agitate--previous-window-configuration'."



reply via email to

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