0

I wonder if it's just me or an org-mode bug.

Often, but unfortunately not always, when I set a code block's tangle property in org-mode to yes, the tangled file gets truncated just above this code block.

In other words, the blocks preceding the block that has tangle explicitly set to yes are not tangled.

For example, in the following snippet, the block below "* Some settings" will not be tangled.

* Some settings
#+begin_src emacs-lisp
  (setq foo t)
#+end_src

* Some other settings
#+begin_src emacs-lisp :tangle yes
  (setq bar nil)
#+end_src

See also the screen-shot with the org-file in the left buffer and the corresponding elisp file in the right buffer. The first code block on the left doesn't make it into the output file on the right. This is because the second code block has a :tangle yes property. If I remove it, the first code block is included in the output.

enter image description here

This has given me a lot of head-ache (see also here), since my Emacs config is a bunch of org-files with elisp code blocks (one of them is partly shown in the screenshot).

1
  • I can't reproduce this: if I tangle without the :tangle yes header, I have 0 code blocks tangled. With the header, I have one code block tangled. What version of Org mode are you using? Does it happen if you start with emacs -Q? What exactly are you trying to accomplish?
    – NickD
    Dec 4, 2022 at 18:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.