Don't know, but it really feels soft of awkward that your heading can't start with COMMENT. I've not used it in Org, but I do in other word processing setups, where you get a file and you want to add temporary stuff at the end for inter-author communication processes.
On Tue, 11 Nov 2025 at 18:11, Max Nikulin <[email protected]> wrote: > > Andreas Matthias writes: > > > >> test.org: > >> #+include: a.org > >> #+include: b.org > >> > >> a.org: > >> * COMMENT BBB > > I have an idea that might help to create a workaround. Define a derived > backend that exports headings with some tag, e.g. :fence:, as empty > string (instead of dropping it early from AST) and add this kind of > heading between "#+include:" lines: > > #+include: with-comment.org > * ---Fence--- :fence: > #+include: more.org :minlevel 1 > > On 06/11/2025 03:14, Ihor Radchenko wrote:> Then, Org looks at > #+include: b.org, notice that it is inside > > _commented_ heading, and skips over :) > > > > This is a bug. > > Definitely, it is a pitfall. Whether it is a bug, from my point of view, > it is a more subtle question. Limiting scope of "#+include:" may lead to > complications. Consider some text between include lines > > #+include: with-comment-heading.org > > A paragraph. > > #+include: another-file.org > > If second include is not a part of last heading from first file then > what you are going to do with intermediate text? If it belongs to the > included heading then it is confusing to the similar degree as the > reported case with following include. Otherwise it is top level text and > "#+include:" becomes a way to achieve a frequently requested feature - > terminating heading without starting new one. Most export backends have > no way to express that some section is ended and following text should > belong to higher level section. (I am leaving aside various insets.) I > am in doubts if something like inline tasks should be allowed for all > headings, despite it may be really convenient for notes. > > -- Fragen sind nicht da, um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler "Sagen's Paradeiser" (ORF: Als Radiohören gefährlich war) => write BE! Year 1 of the New Koprocracy
