branch: externals/calibre
commit 8436262d616124025b40be6a76bf1ed502af3e91
Author: Kjartan Oli Agustsson <[email protected]>
Commit: Kjartan Oli Agustsson <[email protected]>
Sort tags
* calibre-cli.el (calibre-cli--make-book): Sort tags.
* calibre-db.el (calibre-db--make-book): Sort tags.
Sorting tags makes their listing more uniform and more pleasant to
look at.
---
calibre-cli.el | 2 +-
calibre-db.el | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/calibre-cli.el b/calibre-cli.el
index f639f467eb..c074519acc 100644
--- a/calibre-cli.el
+++ b/calibre-cli.el
@@ -67,7 +67,7 @@ specified the default is \\='all\\='."
:timestamp (calibre-cli--parse-timestamp .timestamp)
:pubdate (calibre-cli--parse-timestamp .pubdate)
:last-modified (calibre-cli--parse-timestamp
.last_modified)
- :tags .tags
+ :tags (sort .tags)
:formats (calibre-cli--parse-formats .formats)
:path (calibre-cli--parse-path .formats)
:file-name (calibre-cli--parse-file-name .formats))))
diff --git a/calibre-db.el b/calibre-db.el
index 2b1e58df0d..740cea71b0 100644
--- a/calibre-db.el
+++ b/calibre-db.el
@@ -50,7 +50,7 @@ ENTRY is a list of the form:
:timestamp (calibre-db--parse-timestamp timestamp)
:pubdate (calibre-db--parse-timestamp pubdate)
:last-modified (calibre-db--parse-timestamp
last-modified)
- :tags (calibre-db--get-book-tags id)
+ :tags (sort (calibre-db--get-book-tags id))
:formats (calibre-db--get-book-formats id)
:path path
:file-name (calibre-db--get-book-file-name id))))