aboutsummaryrefslogtreecommitdiff
path: root/modules/markdown-config.el
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
commitd7abba34e876f4aa2c371dde80287dd8da1a7e13 (patch)
tree425164b772bde9a4a7d43e5c9e4025146757ca08 /modules/markdown-config.el
parent30ba5a6392ff121e08ea4d97e8d88dfc1f246634 (diff)
downloaddotemacs-d7abba34e876f4aa2c371dde80287dd8da1a7e13.tar.gz
dotemacs-d7abba34e876f4aa2c371dde80287dd8da1a7e13.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/markdown-config.el')
-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 438aea7e7..2536904ad 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