[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/calibre 1c0bf191d5 35/76: Refresh Library buffer when c
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/calibre 1c0bf191d5 35/76: Refresh Library buffer when calibre-library-columns is changed |
|
Date: |
Thu, 18 May 2023 09:57:43 -0400 (EDT) |
branch: externals/calibre
commit 1c0bf191d51a95ef7789d1d615c0ee3207d55f6e
Author: Kjartan Óli Ágústsson <kjartanoli@disroot.org>
Commit: Kjartan Óli Ágústsson <kjartanoli@disroot.org>
Refresh Library buffer when calibre-library-columns is changed
* calibre-db.el (calibre-library-columns): Move from calibre.el.
Add explicit :group.
Add :set which makes sure the Library buffer is refreshed when
calibre-library-columns is modified.
* calibre.el (calibre-library-columns): Move to calibre-db.el.
---
calibre-db.el | 31 +++++++++++++++++++++++++++++++
calibre.el | 26 --------------------------
2 files changed, 31 insertions(+), 26 deletions(-)
diff --git a/calibre-db.el b/calibre-db.el
index 60cd02163e..9d43190d5c 100644
--- a/calibre-db.el
+++ b/calibre-db.el
@@ -153,6 +153,37 @@ If FORCE is non-nil fetch book data from the database."
(calibre--books force)))
(tabulated-list-print)))))
+(defcustom calibre-library-columns '((id . 4)
+ (title . 35)
+ (authors . 20)
+ (publishers . 10)
+ (series . 15)
+ (series-index . 3)
+ (tags . 10)
+ (formats . 10))
+ "The metadata fields to display in the library buffer.
+Each entry is a key identifying a metadata field and the width that
+column should have."
+ :type '(repeat (cons
+ :tag "Column"
+ (choice
+ :tag "Attribute"
+ (const :tag "ID" id)
+ (const :tag "Title" title)
+ (const :tag "Author(s)" authors)
+ (const :tag "Publisher(s)" publishers)
+ (const :tag "Series" series)
+ (const :tag "Series Index" series-index)
+ (const :tag "Tags" tags)
+ (const :tag "Formats" formats))
+ (integer :tag "Width")))
+ :set (lambda (symbol value)
+ (set-default symbol value)
+ (calibre-library--set-header)
+ (calibre-library--refresh))
+ :package-version '("calibre" . "0.1.0")
+ :group 'calibre)
+
(defun calibre-library--set-header ()
"Set the header of the Library buffer."
(setf tabulated-list-format (calibre-library--header-format)))
diff --git a/calibre.el b/calibre.el
index b33531dbfb..bc4cdb6c9c 100644
--- a/calibre.el
+++ b/calibre.el
@@ -46,32 +46,6 @@
(directory :tag "Location")))
:package-version '("calibre" . "0.1.0"))
-(defcustom calibre-library-columns '((id . 4)
- (title . 35)
- (authors . 20)
- (publishers . 10)
- (series . 15)
- (series-index . 3)
- (tags . 10)
- (formats . 10))
- "The metadata fields to display in the library buffer.
-Each entry is a key identifying a metadata field and the width that
-column should have."
- :type '(repeat (cons
- :tag "Column"
- (choice
- :tag "Attribute"
- (const :tag "ID" id)
- (const :tag "Title" title)
- (const :tag "Author(s)" authors)
- (const :tag "Publisher(s)" publishers)
- (const :tag "Series" series)
- (const :tag "Series Index" series-index)
- (const :tag "Tags" tags)
- (const :tag "Formats" formats))
- (integer :tag "Width")))
- :package-version '("calibre" . "0.1.0"))
-
(defun calibre--library-names ()
"Return a list of the names of defined libraries."
(mapcar #'car calibre-libraries))
- [elpa] externals/calibre 360fbf15cb 02/76: Fix defcustom version strings, (continued)
- [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
- [elpa] externals/calibre 7a8ed52e86 51/76: Set revert-buffer-function instead of using revert hooks, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 521fc7471b 66/76: Add faces to make library buffer easier to parse, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 8ae08bd7fb 68/76: Update README, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 5e81e98079 18/76: Add README, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre bdb11248c9 20/76: Move metadata into calibre.el, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 1c0bf191d5 35/76: Refresh Library buffer when calibre-library-columns is changed,
ELPA Syncer <=
- [elpa] externals/calibre c644d0761d 40/76: Slight improvement to README, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre be94be6962 46/76: Add ability to filter by series and format, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 89e52d61c0 50/76: Only allow single publisher per book, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre c6a5772da0 29/76: Fix docstring, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 7396636341 30/76: Only refresh Library buffer if it exists, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 6d7ed97ab6 31/76: Use the value of calibre-calibredb-executable, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 4a0d5b9606 32/76: Factor the setting of the Library header into a function, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 85e3ac6337 48/76: Add missing space in completing-read prompt, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 6366966c9b 60/76: Add abstraction layer on top of calibre-db, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 9a54c7a6b4 09/76: Add function to add books from dired, ELPA Syncer, 2023/05/18