emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] Inconsistent org-babel tangle behaviour


From: Thibaut Meyer
Subject: [BUG] Inconsistent org-babel tangle behaviour
Date: Thu, 12 Dec 2024 08:45:01 +0100
User-agent: mu4e 1.12.7; emacs 29.4

Hi everyone,

setting a property in an org file like

'#+PROPERTY: header-args    :tangle "file.ext"'

with a source block of the form:
(note no language is specified for the block)

#+begin_src
<1: this block won't get tangled>
#+end_src

won't tangle the block

Adding any string as a language to the code block, like

#+begin_src random_string
<2: this block will get tangled>
#+end_src

tangles the code block

what's weirder is, just adding to a block the ":tangle" header without
or with any value, even with the value no, makes the tangling process
respect the header-args property value and thus the block will tangle
successfully.
(note no language is specified for the block)

#+begin_src :tangle no
<3: this block will get tangled!!>
#+end_src

Adding again a language value make the tangle header act normally

#+begin_src C :tangle no
<4: this block won't get tangled>
#+end_src

The behaviour doesn't seem super consistent. Ideally, I think having a
source block like the first one gettin tangled would be good, and having
the third one not tangle would be better as well.

The documentation states:
[Working with source code > Structure of Code Blocks]
"When ‘<language>’ identifier is omitted, the block also cannot have
‘<switches>’ and ‘<header arguments>’."

but, to my knowledge, there is no mention regarding the fact that the
headers assigned through the "header-args" property should not be
applied if a block has no language identifier.

I tested using org-mode pulled from the repo
"GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo 
version 1.18.2)"
"Org mode version 9.8-pre (release_9.7.16-174-gb9637e @ 
/home/thibaut/tmp/org-mode/lisp/)"

Cheers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]