aboutsummaryrefslogtreecommitdiff
path: root/modules/org-babel-config.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-23 21:39:57 -0400
committerCraig Jennings <c@cjennings.net>2026-06-23 21:39:57 -0400
commitbc6d9565ee4215a5e7024b2589fe6b5b361090c5 (patch)
treef69c7e751b66f8893e68b571aae4bf92868e690c /modules/org-babel-config.el
parente62ea922c07dc9a2d82d71f23e52a44034fd165d (diff)
downloaddotemacs-bc6d9565ee4215a5e7024b2589fe6b5b361090c5.tar.gz
dotemacs-bc6d9565ee4215a5e7024b2589fe6b5b361090c5.zip
feat(org): fontify and edit cj comment blocks as org
Map the cj: src-block language to org-mode via org-src-lang-modes, so the prose inside a cj comment block (#+begin_src cj: comment ...) gets org font-lock in place and C-c ' opens an org-mode buffer to edit it. The block stays a src block, so the cj: grep marker and the cj-processing pipeline are unchanged.
Diffstat (limited to 'modules/org-babel-config.el')
-rw-r--r--modules/org-babel-config.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/org-babel-config.el b/modules/org-babel-config.el
index 821403a0..bc7ccb80 100644
--- a/modules/org-babel-config.el
+++ b/modules/org-babel-config.el
@@ -29,6 +29,12 @@
(setq org-src-fontify-natively t) ;; fontify the code in blocks
(setq org-src-tab-acts-natively t) ;; tabs act like in language major mode buffer
(setq org-src-window-setup 'current-window) ;; don't split window when source editing wih C-c '
+ ;; Treat cj comment blocks (#+begin_src cj: comment ...) as org for editing
+ ;; and fontification: the "cj:" language token maps to org-mode, so C-c '
+ ;; opens an org buffer and the block's prose gets org font-lock in place.
+ ;; The block stays a src block (the cj: grep marker is unchanged); org markup
+ ;; is highlighted and editable, though links are followed from the C-c ' buffer.
+ (add-to-list 'org-src-lang-modes '("cj:" . org))
(setq org-confirm-babel-evaluate t) ;; confirm before running babel; toggle with C-; k
(setq org-babel-default-header-args
(cons '(:tangle . "yes")