aboutsummaryrefslogtreecommitdiff
path: root/nov.el
diff options
context:
space:
mode:
authorSteven Allen <steven@stebalien.com>2025-06-09 16:57:07 +0200
committerVasilij Schneidermann <mail@vasilij.de>2025-06-09 16:58:40 +0200
commitcdf1a56a8a001ddcbd72fc64fc1248e2997dc7d4 (patch)
tree932b444afef00ab81bbd59f3cdf0cc0a23589afd /nov.el
parentb37d9380752e541db3f4b947c219ca54d50ca273 (diff)
1. Attempt to use the book's title instead of the filename for the link
description. 2. Set the initial text of the captured note to the description of the book (if available). 3. Make the author, language, and publisher available in the stored link properties so we can use them from capture templates (via "%:author", etc.).
Diffstat (limited to 'nov.el')
-rw-r--r--nov.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/nov.el b/nov.el
index 6d66746..db3aedd 100644
--- a/nov.el
+++ b/nov.el
@@ -1023,10 +1023,15 @@ See also `nov-bookmark-make-record'."
nov-file-name
nov-documents-index
(point)))
- (description (format "EPUB file at %s" nov-file-name)))
+ (description (or (alist-get 'title nov-metadata)
+ (format "EPUB file at %s" nov-file-name))))
(funcall org-store-props-function
:type "nov"
:link link
+ :author (alist-get 'creator nov-metadata)
+ :language (alist-get 'language nov-metadata)
+ :initial (alist-get 'description nov-metadata)
+ :publisher (alist-get 'publisher nov-metadata)
:description description))))
(cond