From 36c4e7bbcb413e8d029d6a030359a97e7152e5b7 Mon Sep 17 00:00:00 2001 From: MitchMarq42 Date: Thu, 12 Jan 2023 19:44:52 -0900 Subject: [PATCH] Org: pretty SVG tags for todos and source blocks - more to come? --- lisp/mitch-packages.el | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lisp/mitch-packages.el b/lisp/mitch-packages.el index f8fba61..20e04a3 100644 --- a/lisp/mitch-packages.el +++ b/lisp/mitch-packages.el @@ -1024,5 +1024,24 @@ Taken from https://howardism.org/Technical/Emacs/eshell-why.html" (guid (seq uuid))) (rxt-elisp-to-pcre (rx ,@expressions))))) +(elpaca-use-package (svg-tag-mode + :host github + :repo "rougier/svg-tag-mode") + :after org + :hook (org-mode . svg-tag-mode) + :custom (svg-tag-tags + `((,(rx blank (group (= 4 upper)) blank) . + ((lambda (tag) + (svg-tag-make tag + :inverse t + :face (intern + (format "org-%s" (downcase tag))))))) + (,(rx (group "#+" (or "begin" "end") "_src")) . + ((lambda (tag) + (let* ((begend (string-trim tag "#\\+" "_src")) + (upcased (upcase begend))) + (svg-tag-make upcased + :face 'org-block-begin-line)))))))) + (provide 'mitch-packages) ;;; mitch-packages.el ends here