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

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

[elpa] externals/calibre 9a54c7a6b4 09/76: Add function to add books fro


From: ELPA Syncer
Subject: [elpa] externals/calibre 9a54c7a6b4 09/76: Add function to add books from dired
Date: Thu, 18 May 2023 09:57:41 -0400 (EDT)

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

    Add function to add books from dired
    
    * calibre-library.el (calibre-dired-add): Created
---
 calibre-library.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/calibre-library.el b/calibre-library.el
index 9b057e2d34..4fbd2ab38a 100644
--- a/calibre-library.el
+++ b/calibre-library.el
@@ -43,6 +43,13 @@
   "Add FILES to the Calibre library."
   (calibre-library--execute `("add" ,@(mapcar #'expand-file-name files))))
 
+;;;###autoload
+(defun calibre-dired-add ()
+  "Add marked files to the Calibre library."
+    (interactive)
+    (if (derived-mode-p 'dired-mode)
+        (calibre-library-add-books (dired-get-marked-files))))
+
 (defun calibre-remove-books (books)
   "Remove BOOKS from the Calibre library."
   (let ((ids (mapcar #'int-to-string (mapcar #'calibre-book-id books))))



reply via email to

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