From 02b0369d8787dd740ea9df96cc5de2d11aeb00e7 Mon Sep 17 00:00:00 2001 From: Mez Date: Mon, 18 Aug 2025 21:53:37 +0100 Subject: [PATCH] Add function for inserting local image with proper export path --- custom/{dwuser.el => journalfunctions.el} | 6 ++++++ 1 file changed, 6 insertions(+) rename custom/{dwuser.el => journalfunctions.el} (73%) diff --git a/custom/dwuser.el b/custom/journalfunctions.el similarity index 73% rename from custom/dwuser.el rename to custom/journalfunctions.el index 19dfeb8..9b8ef1a 100644 --- a/custom/dwuser.el +++ b/custom/journalfunctions.el @@ -13,3 +13,9 @@ (setq userdisplay (subst-char-in-string ?- ?_ theuser)) (setq userlink (subst-char-in-string ?_ ?- theuser)) (insert (concat "/" userdisplay ""))) + +(defun orgimg () + "Insert an image and link to its external location" + (interactive) + (setq thefile (read-string "Image file name: ")) + (insert "#+ATTR_HTML: :src /dw/" thefile "\n#+ATTR_HTML: :class noteimg\n[[file:~/Documents/drive/org/journal/media/" thefile "]]"))