Fix inline previews for "download:%s" org links #2539
This commit is contained in:
parent
71e5a5513b
commit
beb7a40a84
1 changed files with 6 additions and 5 deletions
|
@ -13,6 +13,12 @@
|
|||
'("^\\(?:https?\\|ftp\\|file\\|nfs\\):" . +org-dragndrop-download-dnd-fn)
|
||||
'("^data:" . org-download-dnd-base64))
|
||||
(advice-add #'org-download-enable :override #'ignore)
|
||||
|
||||
(after! org
|
||||
;; A shorter link to attachments
|
||||
(+org-def-link "download" org-attach-id-dir)
|
||||
(setf (alist-get "download" org-link-abbrev-alist nil nil #'equal)
|
||||
(abbreviate-file-name org-attach-id-dir)))
|
||||
:config
|
||||
(setq org-download-image-dir org-attach-id-dir
|
||||
org-download-link-format "[[download:%s]]\n"
|
||||
|
@ -25,11 +31,6 @@
|
|||
(cond ((executable-find "maim") "maim -s %s")
|
||||
((executable-find "scrot") "scrot -s %s")))))
|
||||
|
||||
;; A shorter link to attachments
|
||||
(+org-def-link "download" org-attach-id-dir)
|
||||
(setf (alist-get "download" org-link-abbrev-alist nil nil #'equal)
|
||||
(abbreviate-file-name org-attach-id-dir))
|
||||
|
||||
;; Handle non-image files a little differently. Images should be inserted
|
||||
;; as-is, as image previews. Other files, like pdfs or zips, should be linked
|
||||
;; to, with an icon indicating the type of file.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue