diff options
author | jao <jao@gnu.org> | 2021-04-15 16:16:03 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-04-15 16:16:03 +0100 |
commit | d2454a9fd3fc590ac23312a21a03a5d7117f4df2 (patch) | |
tree | 9d1e08e97e05df0bf9998f433cc93627a9432f90 /lib/doc | |
parent | 71633830f1797c17a3f395bece11c56141b33c68 (diff) | |
download | elibs-d2454a9fd3fc590ac23312a21a03a5d7117f4df2.tar.gz elibs-d2454a9fd3fc590ac23312a21a03a5d7117f4df2.tar.bz2 |
zathura as a fully featured alternative for pdf viewing in emacs
Diffstat (limited to 'lib/doc')
-rw-r--r-- | lib/doc/jao-doc-view.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/doc/jao-doc-view.el b/lib/doc/jao-doc-view.el index cdc4502..f917b96 100644 --- a/lib/doc/jao-doc-view.el +++ b/lib/doc/jao-doc-view.el @@ -103,8 +103,9 @@ (defun jao-doc-view-pdf-outline (&optional file-name) (if (derived-mode-p 'pdf-view-mode) (pdf-info-outline) - (let ((outline nil) - (fn (shell-quote-argument (or file-name (buffer-file-name))))) + (let* ((outline nil) + (fn (or file-name (buffer-file-name) jao-doc-view--imenu-file)) + (fn (shell-quote-argument (expand-file-name fn)))) (with-temp-buffer (insert (shell-command-to-string (format "mutool show %s outline" fn))) (goto-char (point-min)) @@ -143,7 +144,7 @@ (defun jao-doc-view--enable-imenu (&optional file-name goto-page) (setq-local imenu-create-index-function #'jao-doc-view--imenu-create-index - jao-doc-view--imenu-file file-name + jao-doc-view--imenu-file (or file-name jao-doc-view--imenu-file) jao-doc-view--goer (or goto-page 'jao-doc-view-goto-page)) (imenu-add-to-menubar "PDF outline")) |