Kaushal Modi <kaushal.m...@gmail.com> writes: Tags are bit more generic though, and allow searching across not just code blocks, but TODOs as well.
Thanks, Payas > On Wed, Aug 31, 2022 at 4:19 PM Sébastien Miquel <sebastien.miq...@posteo.eu> > wrote: > >> Hi, >> >> I've been using tags on special blocks, src blocks and other, for two >> purposes: >> >> 1. to control which blocks get exported, using the `#+exclude_tags` >> property. >> 2. to fine tune the export, according to tags, of special blocks such as >> #+BEGIN_exercice :hard: >> … >> #+END_exercice >> >> Does anyone think this is useful and might warrant adding support for ? >> > > I think that using the #+header: property for something like this might be > more canonical. > https://orgmode.org/manual/Using-Header-Arguments.html > > Example: > > ===== > > #+header: :tags noexport > #+begin_foo > > .. > #+end_foo > ===== > > or > > ===== > > #+header: :tags hard > #+begin_foo > > .. > #+end_foo > ===== > > It's also relatively easy to parse these headers: > > ===== > (org-babel-parse-header-arguments (car (org-element-property :header > special-block))) > ===== > --