mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
tools/pdf: suppress "file is large" prompts for pdfs
This commit is contained in:
@ -137,7 +137,13 @@
|
|||||||
(apply create-image file-or-data type data-p
|
(apply create-image file-or-data type data-p
|
||||||
:width (car (pdf-view-image-size))
|
:width (car (pdf-view-image-size))
|
||||||
props))
|
props))
|
||||||
(apply orig-fn args)))))
|
(apply orig-fn args))))
|
||||||
|
|
||||||
|
;; Silence "File *.pdf is large (X MiB), really open?" prompts for pdfs
|
||||||
|
(defadvice! +pdf-suppress-large-file-prompts-a (orig-fn size op-type filename &optional offer-raw)
|
||||||
|
:around #'abort-if-file-too-large
|
||||||
|
(unless (string-match-p "\\.pdf\\'" filename)
|
||||||
|
(funcall orig-fn size op-type filename offer-raw))))
|
||||||
|
|
||||||
|
|
||||||
(use-package! saveplace-pdf-view
|
(use-package! saveplace-pdf-view
|
||||||
|
Reference in New Issue
Block a user