diff --git a/configs/base-org.el b/configs/base-org.el index 96b6058..4ca6fcc 100644 --- a/configs/base-org.el +++ b/configs/base-org.el @@ -122,6 +122,29 @@ "* 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