@@ -4201,90 +4201,92 @@ in the file-system, but rather created on-demand and stored in memory.
42014201[[https://github.com/markus1189/org-pdfview][org-pdfview]] add support for org links from pdfview buffers like docview.
42024202
42034203#+BEGIN_SRC emacs-lisp
4204- (use-package pdf-tools
4205- :ensure t
4206- :config
4207- (pdf-tools-install)
4208- (setq-default pdf-view-display-size 'fit-page
4209- pdf-view-use-imagemagick t)
4210- (bind-keys :map pdf-view-mode-map
4211- ("\\" . hydra-pdftools/body)
4212- ("<s-spc>" . pdf-view-scroll-down-or-next-page)
4213- ("g" . pdf-view-first-page)
4214- ("G" . pdf-view-last-page)
4215- ("l" . image-forward-hscroll)
4216- ("h" . image-backward-hscroll)
4217- ("j" . pdf-view-next-line-or-next-page)
4218- ("k" . pdf-view-previous-line-or-previous-page)
4219- ("e" . pdf-view-goto-page)
4220- ("t" . pdf-view-goto-label)
4221- ("u" . pdf-view-revert-buffer)
4222- ("al" . pdf-annot-list-annotations)
4223- ("ad" . pdf-annot-delete)
4224- ("aa" . pdf-annot-attachment-dired)
4225- ("am" . pdf-annot-add-markup-annotation)
4226- ("at" . pdf-annot-add-text-annotation)
4227- ("y" . pdf-view-kill-ring-save)
4228- ("i" . pdf-misc-display-metadata)
4229- ("s" . pdf-occur)
4230- ("b" . pdf-view-set-slice-from-bounding-box)
4231- ("r" . pdf-view-reset-slice))
4232-
4233- (when (package-installed-p 'hydra)
4204+ (use-package pdf-tools
4205+ :ensure t
4206+ :config
4207+ (pdf-tools-install)
4208+ (setq-default pdf-view-display-size 'fit-page
4209+ pdf-view-use-imagemagick t
4210+ pdf-view-midnight-colors '("white smoke" . "gray5"))
42344211 (bind-keys :map pdf-view-mode-map
4235- ("\\" . hydra-pdftools/body))
4236- (defhydra hydra-pdftools (:color blue :hint nil)
4237- "
4238- ╭───────────┐
4239- Move History Scale/Fit Annotations Search/Link Do │ PDF Tools │
4240- ╭──────────────────────────────────────────────────────────────────┴───────────╯
4241- ^^^_g_^^^ _B_ ^↧^ _+_ ^ ^ [_al_] list [_s_] search [_u_] revert buffer
4242- ^^^^↑^^^^ ^↑^ _H_ ^↑^ ↦ _W_ ↤ [_am_] markup [_o_] outline [_i_] info
4243- ^^^_p_^^^ ^ ^ ^↥^ _0_ ^ ^ [_at_] text [_F_] link [_d_] dark mode
4244- ^^^^↑^^^^ ^↓^ ╭─^─^─┐ ^↓^ ╭─^ ^─┐ [_ad_] delete [_f_] search link
4245- _h_ ← _e_/_t_ → _l_ _N_ │ _P_ │ _-_ _b_ [_aa_] dired
4246- ^^^^↓^^^^ ^ ^ ╰─^─^─╯ ^ ^ ╰─^ ^─╯ [_y_] yank
4247- ^^^_n_^^^ ^ ^ _r_eset slice box
4248- ^^^^↓^^^^
4249- ^^^_G_^^^
4250- --------------------------------------------------------------------------------
4251- "
4252- ("\\" hydra-master/body "back")
4253- ("<ESC>" nil "quit")
4254- ("al" pdf-annot-list-annotations)
4255- ("ad" pdf-annot-delete)
4256- ("aa" pdf-annot-attachment-dired)
4257- ("am" pdf-annot-add-markup-annotation)
4258- ("at" pdf-annot-add-text-annotation)
4259- ("y" pdf-view-kill-ring-save)
4260- ("+" pdf-view-enlarge :color red)
4261- ("-" pdf-view-shrink :color red)
4262- ("0" pdf-view-scale-reset)
4263- ("H" pdf-view-fit-height-to-window)
4264- ("W" pdf-view-fit-width-to-window)
4265- ("P" pdf-view-fit-page-to-window)
4266- ("n" pdf-view-next-page-command :color red)
4267- ("p" pdf-view-previous-page-command :color red)
4268- ("d" pdf-view-dark-minor-mode)
4269- ("b" pdf-view-set-slice-from-bounding-box)
4270- ("r" pdf-view-reset-slice)
4271- ("g" pdf-view-first-page)
4272- ("G" pdf-view-last-page)
4273- ("e" pdf-view-goto-page)
4274- ("t" pdf-view-goto-label)
4275- ("o" pdf-outline)
4276- ("s" pdf-occur)
4277- ("i" pdf-misc-display-metadata)
4278- ("u" pdf-view-revert-buffer)
4279- ("F" pdf-links-action-perfom)
4280- ("f" pdf-links-isearch-link)
4281- ("B" pdf-history-backward :color red)
4282- ("N" pdf-history-forward :color red)
4283- ("l" image-forward-hscroll :color red)
4284- ("h" image-backward-hscroll :color red)))
4285-
4286- (use-package org-pdfview
4287- :ensure t))
4212+ ("\\" . hydra-pdftools/body)
4213+ ("<s-spc>" . pdf-view-scroll-down-or-next-page)
4214+ ("g" . pdf-view-first-page)
4215+ ("G" . pdf-view-last-page)
4216+ ("l" . image-forward-hscroll)
4217+ ("h" . image-backward-hscroll)
4218+ ("j" . pdf-view-next-line-or-next-page)
4219+ ("k" . pdf-view-previous-line-or-previous-page)
4220+ ("e" . pdf-view-goto-page)
4221+ ("t" . pdf-view-goto-label)
4222+ ("u" . pdf-view-revert-buffer)
4223+ ("al" . pdf-annot-list-annotations)
4224+ ("ad" . pdf-annot-delete)
4225+ ("aa" . pdf-annot-attachment-dired)
4226+ ("am" . pdf-annot-add-markup-annotation)
4227+ ("at" . pdf-annot-add-text-annotation)
4228+ ("y" . pdf-view-kill-ring-save)
4229+ ("i" . pdf-misc-display-metadata)
4230+ ("s" . pdf-occur)
4231+ ("b" . pdf-view-set-slice-from-bounding-box)
4232+ ("r" . pdf-view-reset-slice))
4233+
4234+ (when (package-installed-p 'hydra)
4235+ (bind-keys :map pdf-view-mode-map
4236+ ("\\" . hydra-pdftools/body))
4237+ (defhydra hydra-pdftools (:color blue :hint nil)
4238+ "
4239+ ╭───────────┐
4240+ Move History Scale/Fit Annotations Search/Link Do │ PDF Tools │
4241+ ╭──────────────────────────────────────────────────────────────────┴───────────╯
4242+ ^^^_g_^^^ _B_ ^↧^ _+_ ^ ^ [_al_] list [_s_] search [_u_] revert buffer
4243+ ^^^^↑^^^^ ^↑^ _H_ ^↑^ ↦ _W_ ↤ [_am_] markup [_o_] outline [_i_] info
4244+ ^^^_p_^^^ ^ ^ ^↥^ _0_ ^ ^ [_at_] text [_F_] link [_d_] midgnight mode
4245+ ^^^^↑^^^^ ^↓^ ╭─^─^─┐ ^↓^ ╭─^ ^─┐ [_ad_] delete [_f_] search link [_D_] print mode
4246+ _h_ ← _e_/_t_ → _l_ _N_ │ _P_ │ _-_ _b_ [_aa_] dired
4247+ ^^^^↓^^^^ ^ ^ ╰─^─^─╯ ^ ^ ╰─^ ^─╯ [_y_] yank
4248+ ^^^_n_^^^ ^ ^ _r_eset slice box
4249+ ^^^^↓^^^^
4250+ ^^^_G_^^^
4251+ --------------------------------------------------------------------------------
4252+ "
4253+ ("\\" hydra-master/body "back")
4254+ ("<ESC>" nil "quit")
4255+ ("al" pdf-annot-list-annotations)
4256+ ("ad" pdf-annot-delete)
4257+ ("aa" pdf-annot-attachment-dired)
4258+ ("am" pdf-annot-add-markup-annotation)
4259+ ("at" pdf-annot-add-text-annotation)
4260+ ("y" pdf-view-kill-ring-save)
4261+ ("+" pdf-view-enlarge :color red)
4262+ ("-" pdf-view-shrink :color red)
4263+ ("0" pdf-view-scale-reset)
4264+ ("H" pdf-view-fit-height-to-window)
4265+ ("W" pdf-view-fit-width-to-window)
4266+ ("P" pdf-view-fit-page-to-window)
4267+ ("n" pdf-view-next-page-command :color red)
4268+ ("p" pdf-view-previous-page-command :color red)
4269+ ("d" pdf-view-midnight-minor-mode)
4270+ ("D" pdf-view-printer-minor-mode)
4271+ ("b" pdf-view-set-slice-from-bounding-box)
4272+ ("r" pdf-view-reset-slice)
4273+ ("g" pdf-view-first-page)
4274+ ("G" pdf-view-last-page)
4275+ ("e" pdf-view-goto-page)
4276+ ("t" pdf-view-goto-label)
4277+ ("o" pdf-outline)
4278+ ("s" pdf-occur)
4279+ ("i" pdf-misc-display-metadata)
4280+ ("u" pdf-view-revert-buffer)
4281+ ("F" pdf-links-action-perfom)
4282+ ("f" pdf-links-isearch-link)
4283+ ("B" pdf-history-backward :color red)
4284+ ("N" pdf-history-forward :color red)
4285+ ("l" image-forward-hscroll :color red)
4286+ ("h" image-backward-hscroll :color red)))
4287+
4288+ (use-package org-pdfview
4289+ :ensure t))
42884290#+END_SRC
42894291
42904292** popwin
0 commit comments