From: Thibaut Meyer via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: emacs-orgmode@gnu.org
Subject: [BUG] Inconsistent org-babel tangle behaviour
Date: Thu, 12 Dec 2024 08:45:01 +0100 [thread overview]
Message-ID: <87v7vpgxaa.fsf@thibaut.dev> (raw)
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
next reply other threads:[~2024-12-12 7:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 7:45 Thibaut Meyer via General discussions about Org-mode. [this message]
2024-12-22 12:37 ` [BUG] Inconsistent org-babel tangle behaviour Ihor Radchenko
2024-12-28 13:48 ` Thibaut Meyer via General discussions about Org-mode.
2024-12-29 8:42 ` Ihor Radchenko
2024-12-31 9:31 ` [PATCH] ob-tangle: source blocks without language can be tangled (was: [BUG] Inconsistent org-babel tangle behaviour) Thibaut Meyer via General discussions about Org-mode.
2025-01-01 8:29 ` Ihor Radchenko
2025-01-01 8:59 ` [PATCH] ob-tangle: source blocks without language can be tangled Thibaut Meyer via General discussions about Org-mode.
2025-01-01 9:18 ` Thibaut Meyer via General discussions about Org-mode.
2025-01-01 13:53 ` Ihor Radchenko
2025-01-01 20:09 ` Thibaut Meyer via General discussions about Org-mode.
2025-01-02 18:56 ` Ihor Radchenko
2025-01-03 6:34 ` Thibaut Meyer via General discussions about Org-mode.
2025-01-01 13:51 ` Ihor Radchenko
2025-01-01 20:16 ` Thibaut Meyer via General discussions about Org-mode.
2025-01-02 18:55 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v7vpgxaa.fsf@thibaut.dev \
--to=emacs-orgmode@gnu.org \
--cc=thibaut@thibaut.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.