doc-view: C-c h toggle render DPI 100<->200, re-raster on demand
This commit is contained in:
@@ -2896,7 +2896,16 @@ Same page navigation as PDF-Tools (C-j / C-k) for doc-view buffers (renders .doc
|
|||||||
:config
|
:config
|
||||||
(map! :map doc-view-mode-map
|
(map! :map doc-view-mode-map
|
||||||
:n "C-j" #'doc-view-next-page
|
:n "C-j" #'doc-view-next-page
|
||||||
:n "C-k" #'doc-view-previous-page))
|
:n "C-k" #'doc-view-previous-page)
|
||||||
|
|
||||||
|
;; Toggle low/high render DPI, re-rasterize this buffer on demand (C-c h)
|
||||||
|
(defun gortium/docview-toggle-res ()
|
||||||
|
(interactive)
|
||||||
|
(let ((new (if (< doc-view-resolution 150) 200 100)))
|
||||||
|
(setq-local doc-view-resolution new)
|
||||||
|
(doc-view-reconvert-doc)
|
||||||
|
(message "doc-view @ %s dpi" new)))
|
||||||
|
(map! :map doc-view-mode-map :n "C-c h" #'gortium/docview-toggle-res))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Custom functions
|
* Custom functions
|
||||||
|
|||||||
@@ -1997,7 +1997,16 @@ only injects when the project's context-tag matches current mu4e context."
|
|||||||
:config
|
:config
|
||||||
(map! :map doc-view-mode-map
|
(map! :map doc-view-mode-map
|
||||||
:n "C-j" #'doc-view-next-page
|
:n "C-j" #'doc-view-next-page
|
||||||
:n "C-k" #'doc-view-previous-page))
|
:n "C-k" #'doc-view-previous-page)
|
||||||
|
|
||||||
|
;; Toggle low/high render DPI, re-rasterize this buffer on demand (C-c h)
|
||||||
|
(defun gortium/docview-toggle-res ()
|
||||||
|
(interactive)
|
||||||
|
(let ((new (if (< doc-view-resolution 150) 200 100)))
|
||||||
|
(setq-local doc-view-resolution new)
|
||||||
|
(doc-view-reconvert-doc)
|
||||||
|
(message "doc-view @ %s dpi" new)))
|
||||||
|
(map! :map doc-view-mode-map :n "C-c h" #'gortium/docview-toggle-res))
|
||||||
|
|
||||||
;;Refile in datetree function
|
;;Refile in datetree function
|
||||||
(defun org-refile-to-datetree (&optional file)
|
(defun org-refile-to-datetree (&optional file)
|
||||||
|
|||||||
Reference in New Issue
Block a user