Add semi-broken org-modern - subject to change and ridicule

This commit is contained in:
MitchMarq42 2023-01-13 15:57:09 -09:00
parent efe2366df1
commit 0674d6b830

View File

@ -565,12 +565,6 @@ targets."
;; (org-hide-emphasis-markers t) ;; (org-hide-emphasis-markers t)
(inhibit-compacting-font-caches t) (inhibit-compacting-font-caches t)
:config :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 (add-hook 'after-save-hook
(lambda () (if (equal major-mode 'org-mode) (lambda () (if (equal major-mode 'org-mode)
(org-babel-tangle)))) (org-babel-tangle))))
@ -1025,11 +1019,36 @@ Taken from https://howardism.org/Technical/Emacs/eshell-why.html"
(guid (seq uuid))) (guid (seq uuid)))
(rxt-elisp-to-pcre (rx ,@expressions))))) (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 (elpaca-use-package (svg-tag-mode
:host github :host github
:repo "rougier/svg-tag-mode") :repo "rougier/svg-tag-mode")
:after org ;; :after org-modern
:hook (org-mode . svg-tag-mode) :hook (org-modern-mode . svg-tag-mode)
:custom (svg-tag-tags :custom (svg-tag-tags
`((,(rx blank (group (= 4 upper)) blank) . `((,(rx blank (group (= 4 upper)) blank) .
((lambda (tag) ((lambda (tag)
@ -1042,7 +1061,8 @@ Taken from https://howardism.org/Technical/Emacs/eshell-why.html"
(let* ((begend (string-trim tag "#\\+" "_src")) (let* ((begend (string-trim tag "#\\+" "_src"))
(upcased (upcase begend))) (upcased (upcase begend)))
(svg-tag-make upcased (svg-tag-make upcased
:face 'org-block-begin-line)))))))) :face 'org-block-begin-line)))))))
)
(provide 'mitch-packages) (provide 'mitch-packages)
;;; mitch-packages.el ends here ;;; mitch-packages.el ends here