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

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

[elpa] externals/calibre 7396636341 30/76: Only refresh Library buffer i


From: ELPA Syncer
Subject: [elpa] externals/calibre 7396636341 30/76: Only refresh Library buffer if it exists
Date: Thu, 18 May 2023 09:57:43 -0400 (EDT)

branch: externals/calibre
commit 73966363414eaad96d370a928cb1aceb84bbec85
Author: Kjartan Óli Ágústsson <kjartanoli@disroot.org>
Commit: Kjartan Óli Ágústsson <kjartanoli@disroot.org>

    Only refresh Library buffer if it exists
    
    * calibre-db.el (calibre-library--refresh): Wrap body in (when
    buffer...)
---
 calibre-db.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/calibre-db.el b/calibre-db.el
index cfda81fe0d..9f865a269d 100644
--- a/calibre-db.el
+++ b/calibre-db.el
@@ -146,11 +146,12 @@ If no library is active, prompt the user to select one."
   "Refresh the contents of the library buffer.
 If FORCE is non-nil fetch book data from the database."
   (let* ((buffer (get-buffer calibre-library-buffer)))
+    (when buffer
       (with-current-buffer buffer
         (setf tabulated-list-entries
               (mapcar #'calibre-book--print-info
                       (calibre--books force)))
-        (tabulated-list-print))))
+        (tabulated-list-print)))))
 
 (defun calibre-book--print-info (book)
   "Return list suitable as a value of `tabulated-list-entries'.



reply via email to

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