From d9fd06e4527f802a09e9915d30dd32182d6a477d Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Tue, 15 Jan 2019 19:54:10 +0100 Subject: Add command to reopen EPUB document as archive Closes #44 --- nov.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'nov.el') 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) -- cgit v1.2.3