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

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

[elpa] externals/calibre 393ae4a945 12/76: Add force option to library r


From: ELPA Syncer
Subject: [elpa] externals/calibre 393ae4a945 12/76: Add force option to library refresh
Date: Thu, 18 May 2023 09:57:41 -0400 (EDT)

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

    Add force option to library refresh
    
    * calibre-library.el (calibre-library--refresh): Added force argument
    (calibre-library): Pass t to calibre-library--refresh instead of
    directly calling calibre--books
---
 calibre-library.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/calibre-library.el b/calibre-library.el
index 0e4b7b54b6..3db7ca6294 100644
--- a/calibre-library.el
+++ b/calibre-library.el
@@ -27,13 +27,14 @@
 
 (defconst calibre-library-buffer "*Library*")
 
-(defun calibre-library--refresh ()
-  "Refresh the contents of the library buffer with BOOKS."
+(defun calibre-library--refresh (&optional force)
+  "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)))
       (with-current-buffer buffer
         (setf tabulated-list-entries
               (mapcar #'calibre-book--print-info
-                      (calibre--books)))
+                      (calibre--books force)))
         (tabulated-list-print))))
 
 ;;;###autoload
@@ -146,11 +147,10 @@ ARGS should be a list of strings.  SENTINEL is a process 
sentinel to install."
 (defun calibre-library ()
   "List all books in Calibre Library `calibrary-dir'."
   (interactive)
-  (calibre--books t)
   (let ((buffer (get-buffer-create calibre-library-buffer)))
     (with-current-buffer buffer
       (calibre-library-mode)
-      (calibre-library--refresh)
+      (calibre-library--refresh t)
       (display-buffer buffer))))
 
 (provide 'calibre-library)



reply via email to

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