Skip to content

Commit

Permalink
tools/pdf: suppress "file is large" prompts for pdfs
Browse files Browse the repository at this point in the history
  • Loading branch information
hlissner committed Apr 15, 2021
1 parent b158215 commit 437f122
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/tools/pdf/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 437f122

Please sign in to comment.