From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id AIATHCrHD2OPUwEAbAwnHQ (envelope-from ) for ; Wed, 31 Aug 2022 22:40:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YKYKHCrHD2PGNwAA9RJhRA (envelope-from ) for ; Wed, 31 Aug 2022 22:40:10 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2BA9113721 for ; Wed, 31 Aug 2022 22:40:10 +0200 (CEST) Received: from localhost ([::1]:43784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTUVN-0002t4-BS for larch@yhetil.org; Wed, 31 Aug 2022 16:40:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTUUo-0002ss-Vg for emacs-orgmode@gnu.org; Wed, 31 Aug 2022 16:39:35 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:46666) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTUUm-0007TE-Eq for emacs-orgmode@gnu.org; Wed, 31 Aug 2022 16:39:34 -0400 Received: by mail-pg1-x534.google.com with SMTP id 78so995717pgb.13 for ; Wed, 31 Aug 2022 13:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=Bwo9qHKahULJQFIZCXihr7XqrfRk6+Bm/z15ru1CAh8=; b=FozcrHxowR3jIbP+UsDON8ym46OX1IN9X/V8nLYsU81lBBYRRBgm4+hHGbfNOdHFMY Tb58TnCD5bFrAqKKS7Mg3uvzHxkZEKXgwOpUR+hQ9BnxTfiAwPxYpJVDPLdem5JHFsqh q4fzTU2SWW5gg/51wI6JmC3F6fqTzvfROolzwpddPAJVbNlyHPyfD0iqLh9sTXcjAQfK R/cqcQ+12R//aA17dkmRdmA8/FkVxsSwPVwobSjKdbwrkLZ3C+rSuabxvZTt1vylwPe3 6gr4rUcVM+H0ZgfC/KLZgH7P6X/0Il++zD0hNtGOr6v3jWbSKqNMqpc+EZ7QdemnNIs6 PVnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=Bwo9qHKahULJQFIZCXihr7XqrfRk6+Bm/z15ru1CAh8=; b=V1dYRTFihUvcuaXzxrvkKPLbHv1DYpzM88QuvM5QhDeSZSgBjnrO0K/hLopu05YiNK pFqW5fkSZT1YuV+v7OElkwsFiq8W4GFVb3ZspKjfvYhNbMMLYwL+GwpIKj7k/3KcDQ2b 59G/ce4YhOkKqBGMaTWTGqTqCuHCZWBBx2GgQKQmaB7IWJpaU41JJ0pzpXbzuIL8nctp z6si+4ajiMSBt8w+ir92bJZaJ2+QmRSQou+l1oki4z0RqVcDUQZAWyZV6lkmrojPDjGh o2OBnfI0rQunaA9Pj1FsRmPv6hRVfTfJH3wBbKOdrUgOie2wmIGYfoVZ5EAWoOVFBDD9 ojOg== X-Gm-Message-State: ACgBeo36bjlvFmmGNwRKSnUrqzLh8js5prTgkMnT6d29AejF0l6u37Cj jcU2pfwwAUpLVwOJ2+DctF836XAilfrlOpjlc5g= X-Google-Smtp-Source: AA6agR7pzHM7Vtfl7bh6fQVijjmBjbXEXwhEhVZkNkoXFqqCthv2Er8Vx5B78Z6v4qH5CXqDSv5sqhNpqcabFM1HLxk= X-Received: by 2002:a65:6cca:0:b0:427:17e6:b32b with SMTP id g10-20020a656cca000000b0042717e6b32bmr22728282pgw.349.1661978370385; Wed, 31 Aug 2022 13:39:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kaushal Modi Date: Wed, 31 Aug 2022 16:38:53 -0400 Message-ID: Subject: Re: Support for tagging (special) blocks To: sebastien.miquel@posteo.eu Cc: emacs-orgmode Content-Type: multipart/alternative; boundary="000000000000642bbf05e78f7e62" Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=kaushal.modi@gmail.com; helo=mail-pg1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1661978410; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Bwo9qHKahULJQFIZCXihr7XqrfRk6+Bm/z15ru1CAh8=; b=IVY2dpIZRziMlx1nFE/aOiE8Ss1GzpFUEnkTFBLC4hIyk03cw9mGUUmWGr3iKadMGW79Qj tjraeOmiDZHFtcV3bWht/Z65GuW7Kl9Tl3zm0g4UFqr+Piy1f2cMbYjiK4IjSF7uMloERB WhQ38DXeAH7sxIXfKoaYlIhVLs+hCmwl7zM/QKcHbfXWZTOVOM6Z35pFWKZZBN/GbNBVSq zjzUkBudQeiwMFSm3vqGvqfC5m2myeLKO8GXVMRhzoLVa3I0Urx/+nBpXxqrgVfSdZdgzF G0AiOCZEYA8OzAW37Wae3fl/W2Js7r4TvtkPVHlr785O9QF4jeEVJr2rKGDJhQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661978410; a=rsa-sha256; cv=none; b=pw0V5CKt/dDRI+CaMbUbjles0o1DZS/yJWR20QppTaxUGKyFxDrfKggZkJ0Qkjv6MonBdp g+YZbleICM/JpiESOQdrwUsd7SBJXfG0o55c9bONrNP7CKPZZtQlVtm+Av4mZkxML5+Kkd 8YzGcl5D5tUJ0NAiwJP6RLv/XoVcHO7jWYEwOGXdQEjCY7Ef6fBDoaWdkXTc7VdkmoQq1+ mYSqTV/XUfKRlSC9OCdNd+KmIzZykhqUHsNgVrH2jdQmINCcALVYC5kJR5cJFSWfUzQ3WQ YoZPal0IygeV5UbIOZIL+E4iQOusct3d2mMpiVbWwld6LFNmS+VFxkll6IrqWw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=FozcrHxo; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.28 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=FozcrHxo; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2BA9113721 X-Spam-Score: -2.28 X-Migadu-Scanner: scn1.migadu.com X-TUID: X29JzhfTmJ/D --000000000000642bbf05e78f7e62 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Aug 31, 2022 at 4:19 PM S=C3=A9bastien Miquel 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 a= s > #+BEGIN_exercice :hard: > =E2=80=A6 > #+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: =3D=3D=3D=3D=3D #+header: :tags noexport #+begin_foo .. #+end_foo =3D=3D=3D=3D=3D or =3D=3D=3D=3D=3D #+header: :tags hard #+begin_foo .. #+end_foo =3D=3D=3D=3D=3D It's also relatively easy to parse these headers: =3D=3D=3D=3D=3D (org-babel-parse-header-arguments (car (org-element-property :header special-block))) =3D=3D=3D=3D=3D --000000000000642bbf05e78f7e62 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Aug 31, 2022 at 4:19 PM S=C3=A9bastien Miquel <sebastien.miquel@posteo.eu> wrot= e:
Hi,

I've been using tags on special blocks, src blocks and other, for two purposes:

=C2=A0 1. to control which blocks get exported, using the `#+exclude_tags`<= br> =C2=A0 =C2=A0 =C2=A0property.
=C2=A0 2. to fine tune the export, according to tags, of special blocks suc= h as
=C2=A0 =C2=A0 =C2=A0#+BEGIN_exercice=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :hard:
=C2=A0 =C2=A0 =C2=A0=E2=80=A6
=C2=A0 =C2=A0 =C2=A0#+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.

Example:
<= div>
=3D=3D=3D=3D=3D
#+header: :tags noexport
#+begin_foo
..
#+end_foo
=3D=3D=3D= =3D=3D

or

=3D=3D=3D=3D=3D
#+header: :tags hard
#+beg= in_foo
..
#+end_foo
=3D=3D=3D=3D=3D

It's also relatively easy to parse these headers:
=

=3D=3D=3D=3D=3D
(org-babel-parse-header-argum= ents (car (org-element-property :header special-block)))
=3D=3D= =3D=3D=3D

--000000000000642bbf05e78f7e62--