aboutsummaryrefslogtreecommitdiff
path: root/nov.el
diff options
context:
space:
mode:
authorVasilij Schneidermann <mail@vasilij.de>2019-01-15 19:54:10 +0100
committerVasilij Schneidermann <mail@vasilij.de>2019-01-15 19:54:23 +0100
commitd9fd06e4527f802a09e9915d30dd32182d6a477d (patch)
tree0b8ec3b8432e0011727343648c77958a0a36cf4b /nov.el
parent3bb7a4038f0c2100df671c9f1f33b785ed4ae296 (diff)
Add command to reopen EPUB document as archive
Closes #44
Diffstat (limited to 'nov.el')
-rw-r--r--nov.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/nov.el b/nov.el
index 432acda..bd9eb40 100644
--- a/nov.el
+++ b/nov.el
@@ -371,6 +371,7 @@ Each alist item consists of the identifier and full path."
(define-key map (kbd "g") 'nov-render-document)
(define-key map (kbd "v") 'nov-view-source)
(define-key map (kbd "V") 'nov-view-content-source)
+ (define-key map (kbd "a") 'nov-reopen-as-archive)
(define-key map (kbd "m") 'nov-display-metadata)
(define-key map (kbd "n") 'nov-next-document)
(define-key map (kbd "]") 'nov-next-document)
@@ -546,6 +547,12 @@ the HTML is rendered with `nov-render-html-function'."
(interactive)
(find-file nov-content-file))
+(defun nov-reopen-as-archive ()
+ "Reopen the EPUB document using `archive-mode'."
+ (interactive)
+ (with-current-buffer (find-file-literally nov-file-name)
+ (archive-mode)))
+
(defun nov-display-metadata ()
"View the metadata of the EPUB document in a new buffer."
(interactive)