For my current config, I'm tangling an org-mode buffer into my init.el
, and I have a few sections where I'd like to insert rich text between segments of Emacs lisp code, like the following:
...
#+BEGIN_SRC elisp
(use-package exwm
:config
(exwm-enable)
#+END_SRC
I find that four workspaces is enough to start out with, and I like being able
to use my X windows across workspaces.
#+BEGIN_SRC elisp
:init
(setq exwm-workspace-number 4
exwm-workspace-show-all-buffers t
exwm-layout-show-all-buffers t)
#+END_SRC
...
The issue is, if I C-c '
to edit the second SRC block, it reindents to the beginning of the line. Smartparens is also unhappy about any unmatched closing parentheses I have in subsequent blocks.
Is there anything in org-mode that would support something like this? Perhaps some marker I can tag each block with as a hint that they should all be pulled into the same Org Src buffer when I C-c '
on one of them?
y = x +
in one block andx*4
in another: they cannot be evaluated independently and it is very confusing. Why not add comments to the src block? They will appear ininit.el
but so what? You can never have enough documentation.<<noweb>>
syntax. One(use-package
block with multiple<<subsections>>
, and you can define the subsections elsewhere. Would that help?use-package
statements as I suggest in the answer below? What about that doesn't work for you?