From 433232ed1d255e06735c561319abe26bcb4befec Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Sun, 17 Jun 2018 23:42:43 +0200 Subject: Use `nov-file-name` to hold original file path Closes #34 --- nov.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nov.el b/nov.el index 352d33f..b1a4e35 100644 --- a/nov.el +++ b/nov.el @@ -99,11 +99,14 @@ If set to `nil', no saving and restoring is performed." (const :tag "Don't save last reading places" nil)) :group 'nov) +(defvar-local nov-file-name nil + "Path to the EPUB file backing this buffer.") + (defvar-local nov-temp-dir nil "Temporary directory containing the buffer's EPUB files.") (defvar-local nov-content-file nil - "Path of the EPUB buffer's .opf file.") + "Path to the EPUB buffer's .opf file.") (defvar-local nov-epub-version nil "Version string of the EPUB buffer.") @@ -686,6 +689,7 @@ Saving is only done if `nov-save-place-file' is set." (apply 'vector))) (setq nov-documents-index 0)) (setq buffer-undo-list t) + (setq nov-file-name (buffer-file-name)) (set-visited-file-name nil t) ; disable autosaves and save questions (let ((place (nov-saved-place (cdr (assq 'identifier nov-metadata))))) (if place -- cgit v1.2.3