Add image config for org mode.
This commit is contained in:
parent
f19c62f75a
commit
42d34290e2
@ -122,6 +122,29 @@
|
|||||||
"* TODO %? \n %a\n %i" :empty-lines 1)
|
"* TODO %? \n %a\n %i" :empty-lines 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
;; Configuración de imágenes
|
||||||
|
(setq org-startup-with-inline-images t) ;; Mostrar por defecto las imágenes
|
||||||
|
(setq org-display-remote-inline-images 'cache) ;; Mostrar imágenes remotas
|
||||||
|
(setq org-image-actual-width 512)
|
||||||
|
|
||||||
|
(defun org-http-image-data-fn (protocol link _description)
|
||||||
|
"Interpret LINK as an URL to an image file."
|
||||||
|
(when (and (image-type-from-file-name link)
|
||||||
|
(not (eq org-display-remote-inline-images 'skip)))
|
||||||
|
(if-let (buf (url-retrieve-synchronously (concat protocol ":" link)))
|
||||||
|
(with-current-buffer buf
|
||||||
|
(goto-char (point-min))
|
||||||
|
(re-search-forward "\r?\n\r?\n" nil t)
|
||||||
|
(buffer-substring-no-properties (point) (point-max)))
|
||||||
|
(message "Download of image \"%s\" failed" link)
|
||||||
|
nil)))
|
||||||
|
|
||||||
|
(org-link-set-parameters "http" :image-data-fun #'org-http-image-data-fn)
|
||||||
|
(org-link-set-parameters "https" :image-data-fun #'org-http-image-data-fn)
|
||||||
|
|
||||||
|
(use-package org-yt
|
||||||
|
:straight (org-yt :type git :host github :repo "TobiasZawada/org-yt"))
|
||||||
)
|
)
|
||||||
|
|
||||||
(use-package org-bullets
|
(use-package org-bullets
|
||||||
|
Loading…
Reference in New Issue
Block a user