tools/pdf: suppress "file is large" prompts for pdfs
This commit is contained in:
parent
b158215587
commit
437f122969
1 changed files with 7 additions and 1 deletions
|
@ -137,7 +137,13 @@
|
|||
(apply create-image file-or-data type data-p
|
||||
:width (car (pdf-view-image-size))
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue