summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-14 23:40:28 -0500
committerCraig Jennings <c@cjennings.net>2026-05-14 23:40:28 -0500
commit05de4899cd848bfe1d80b025c8735cea9e58c642 (patch)
treec3acc6401c750d45f434191b526353c1e65acb49 /modules
parenta5519bc151700d1a76eba9baebe541c06958e9ce (diff)
downloaddotemacs-05de4899cd848bfe1d80b025c8735cea9e58c642.tar.gz
dotemacs-05de4899cd848bfe1d80b025c8735cea9e58c642.zip
feat(markdown-config): register markdown as an org src-block language
`#+begin_src markdown ... #+end_src' blocks rendered and exported fine but `org-lint' warned on every one of them ("Unknown source block language: 'markdown'"), and `C-c '' inside the block fell back to `fundamental-mode' instead of opening it in `markdown-mode' for editing. Add a `with-eval-after-load 'org' form that pushes `("markdown" . markdown)' onto `org-src-lang-modes'. New ERT test in `tests/test-markdown-config.el' asserts the entry resolves to `markdown' after `(require 'markdown-config)'. Surfaced while clearing `org-lint' on `todo.org' from 55 issues down to 1 -- the last one was this warning on a Linear ticket-body draft that was genuinely markdown. Registering the language is the right fix; relabeling the block as `text' or `example' would lose accuracy.
Diffstat (limited to 'modules')
-rw-r--r--modules/markdown-config.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/markdown-config.el b/modules/markdown-config.el
index 438aea7e..2536904a 100644
--- a/modules/markdown-config.el
+++ b/modules/markdown-config.el
@@ -15,6 +15,13 @@
("<f2>" . markdown-preview)) ;; use same key as compile for consistency
:init (setq markdown-command "multimarkdown"))
+;; Register markdown as a known org-src-block language so `org-lint'
+;; stops warning on `#+begin_src markdown ... #+end_src' and `C-c ''
+;; inside such a block opens it in `markdown-mode' instead of falling
+;; back to fundamental-mode.
+(with-eval-after-load 'org
+ (add-to-list 'org-src-lang-modes '("markdown" . markdown)))
+
;;;; ------------------------- Impatient-Mode ------------------------
;; allows for live previews of your html