From 0674d6b830750b8e04550e4e748c5bfaf527eb62 Mon Sep 17 00:00:00 2001 From: MitchMarq42 Date: Fri, 13 Jan 2023 15:57:09 -0900 Subject: [PATCH] Add semi-broken `org-modern` - subject to change and ridicule --- lisp/mitch-packages.el | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/lisp/mitch-packages.el b/lisp/mitch-packages.el index 886558b..0b605fd 100644 --- a/lisp/mitch-packages.el +++ b/lisp/mitch-packages.el @@ -565,12 +565,6 @@ targets." ;; (org-hide-emphasis-markers t) (inhibit-compacting-font-caches t) :config - (add-hook 'org-mode-hook - (lambda () - (font-lock-add-keywords - nil - `((,(rx bol (+ "*")) . ;; shadow - font-lock-doc-markup-face))))) (add-hook 'after-save-hook (lambda () (if (equal major-mode 'org-mode) (org-babel-tangle)))) @@ -1025,11 +1019,36 @@ Taken from https://howardism.org/Technical/Emacs/eshell-why.html" (guid (seq uuid))) (rxt-elisp-to-pcre (rx ,@expressions))))) +(elpaca-use-package org-modern + :after org + :custom + (org-modern-tag nil) + (org-modern-todo nil) + (org-modern-block-name nil) + (org-modern-table nil) + (org-modern-hide-stars nil) + (org-modern-star nil) + ;; (org-modern-block-fringe 16) + :hook (org-mode . org-modern-mode) + :config + (defun mitch/org-grayify-stars () + "Make the `*' characters in Org headlines look like the `#'s in markdown." + (interactive) + (font-lock-add-keywords + nil + `((,(rx bol (+ "*")) . ;; shadow + font-lock-doc-markup-face)))) + ;; (add-hook 'org-mode-hook + ;; #'mitch/org-grayify-stars 90) + (advice-add 'org-modern--make-font-lock-keywords + :after #'mitch/org-grayify-stars) + ) + (elpaca-use-package (svg-tag-mode :host github :repo "rougier/svg-tag-mode") - :after org - :hook (org-mode . svg-tag-mode) + ;; :after org-modern + :hook (org-modern-mode . svg-tag-mode) :custom (svg-tag-tags `((,(rx blank (group (= 4 upper)) blank) . ((lambda (tag) @@ -1042,7 +1061,8 @@ Taken from https://howardism.org/Technical/Emacs/eshell-why.html" (let* ((begend (string-trim tag "#\\+" "_src")) (upcased (upcase begend))) (svg-tag-make upcased - :face 'org-block-begin-line)))))))) + :face 'org-block-begin-line))))))) + ) (provide 'mitch-packages) ;;; mitch-packages.el ends here