Lei Zhe <[email protected]> writes:

> While working with Org Babel tangling, I noticed that source blocks
> under archived headlines (and commented headlines) are currently
> excluded from tangling by hard-coded logic in the codebase.
>
> ```
> (unless (or (org-in-commented-heading-p)
>           (org-in-archived-heading-p))
>     ...)
> ```

This is a bit more tricky than just tangling. Code evaluation is also
affected. Same for reference resolution.

> From a user perspective, this behavior is not always desirable. In
> some workflows, archived or commented headings are used for
> organizational or documentation purposes, while the source blocks
> under them are still expected to be tangled. Since this is a policy
> decision rather than a technical limitation, I wonder whether it would
> make sense to make this behavior user-configurable instead of
> hard-coded.

I think commented headings are pretty clear. They should be
ignored. That's the purpose of comment after all. Same with other
comment markup. The manual clearly says:

       Finally, a ‘COMMENT’ keyword at the beginning of an entry, but after
    any other keyword or priority cookie, comments out the entire subtree.
    In this case, the subtree is not exported and no code block within it is
    executed either(1).  The command below helps changing the comment status
    of a headline.

I feel that changing this would go against basic idea of comments. But
you may show me use cases of comments that go against what is said in
the manual.

For archiving, I can see how this may depend on user taste.
The current behavior was partially introduced in
https://orgmode.org/list/[email protected]/
but archived subtrees were largerly ignored even before that.

Could you please provide more details about your workflow? Do you really
need archived subtrees?

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to