[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/calibre 832e91827d 63/76: Move calibre--library to cali
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/calibre 832e91827d 63/76: Move calibre--library to calibre-util |
|
Date: |
Thu, 18 May 2023 09:57:46 -0400 (EDT) |
branch: externals/calibre
commit 832e91827d9b2eca97de32365c70597d324d4f89
Author: Kjartan Óli Ágústsson <kjartanoli@disroot.org>
Commit: Kjartan Óli Ágústsson <kjartanoli@disroot.org>
Move calibre--library to calibre-util
* calibre-util.el: Require calibre to fix byte compilation warning.
(calibre--library): Create/Move from somewhere.
(calibre-select-library): Declare function.
---
calibre-util.el | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/calibre-util.el b/calibre-util.el
index 03974626a1..6c171422dc 100644
--- a/calibre-util.el
+++ b/calibre-util.el
@@ -23,6 +23,7 @@
;; circular dependency issues.
;;; Code:
+(require 'calibre)
(require 'calibre-book)
(defun calibre-util-find-book (book seq)
@@ -76,5 +77,16 @@ discard any modifications."
(unwind-protect (progn ,@body)
(calibre-library--restore-marks marks))))
+(defvar calibre--library nil
+ "The active library.")
+
+(declare-function calibre-select-library "calibre-core.el")
+(defun calibre--library ()
+ "Return the active library.
+If no library is active, prompt the user to select one."
+ (unless calibre--library
+ (calibre-select-library))
+ (alist-get calibre--library calibre-libraries nil nil #'string=))
+
(provide 'calibre-util)
;;; calibre-util.el ends here
- [elpa] externals/calibre 188a3da504 04/76: Add functions to add and remove books, (continued)
- [elpa] externals/calibre 188a3da504 04/76: Add functions to add and remove books, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 393ae4a945 12/76: Add force option to library refresh, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre ecf03e1842 19/76: Fix circular dependencies and byte compiler warnings, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre e2863a9d6a 21/76: Fix byte compiler warning, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 330471a75f 26/76: Fix circular dependency and byte compiler warnings, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre fd1b0e5fd7 28/76: Use message instead of display-warning, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre bc26df0b48 36/76: Set tabulated-list-format in the correct buffer, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 07df132f5d 53/76: Error if no libraries are defined, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre b7d6dd90f1 57/76: Add customisation types to book slots, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 4e4bf841cb 59/76: Rename calibre-make-book, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 832e91827d 63/76: Move calibre--library to calibre-util,
ELPA Syncer <=
- [elpa] externals/calibre b43ab3a90c 73/76: Allow overriding format preferences, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 2b64cb76ad 49/76: Add support for displaying publication date, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre ca0ae8a1d3 74/76: Pick some format if no preferred format is available, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre c6cb36b0a3 17/76: Fix byte-compiler warnings, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 8c791fb915 05/76: Add missing sort by series function, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 360fbf15cb 02/76: Fix defcustom version strings, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 76427bf5be 07/76: Allow customisation of the columns of the library buffer, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre d8682121d8 23/76: Reorder variable declarations, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre a750735b89 33/76: Add ability to revert Library buffer, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre b2c34a58d4 44/76: Use the right column name in query, ELPA Syncer, 2023/05/18