From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id AJTxLieZC2N9cAAAbAwnHQ (envelope-from ) for ; Sun, 28 Aug 2022 18:34:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id sH7ULieZC2P0PgEAauVa8A (envelope-from ) for ; Sun, 28 Aug 2022 18:34:47 +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 5C4262EF62 for ; Sun, 28 Aug 2022 18:34:47 +0200 (CEST) Received: from localhost ([::1]:41186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSLFG-0003QA-JO for larch@yhetil.org; Sun, 28 Aug 2022 12:34:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSLEp-0003Q2-VR for emacs-orgmode@gnu.org; Sun, 28 Aug 2022 12:34:20 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]:42806) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSLEn-0004VH-Us for emacs-orgmode@gnu.org; Sun, 28 Aug 2022 12:34:19 -0400 Received: by mail-ej1-x62e.google.com with SMTP id p16so8346554ejb.9 for ; Sun, 28 Aug 2022 09:34:17 -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=ydaukB/qxq0n6mlZ1zLYpqEcH4d2nJUO58xqVuZg9Mo=; b=DWW0tS6TKXWrZkFGHSAFuvk1PFunxwTYFO+vVaF0leRD5nI6Z3AZlJbRWE/3rRPp4m vmtppvzEwGX7Ufw7/YyDQ0yLBD9kNG7RMV4HfwScuRfazA2Fsq3+watkIQqfpm5zXcc5 5ODkZNjwlk6Br95bqq/SNn3lH3VUmlr4jMhfCwXQbKUYJjops+cS5kDauimhA5hZNT2Y I701keLM3iaX/KOEcbBOGrAjahsDPiSUI8XZgcJIm34HZyrBouPeqt9qrjFGn7iXUXWP 6z4lDQrUp2AnV7j58o3uFux1RLUtXVgQ4Rng6lbRH9UOXMkUBf1f2sdg+HY8XUtH6xNy yyEg== 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=ydaukB/qxq0n6mlZ1zLYpqEcH4d2nJUO58xqVuZg9Mo=; b=SO1fe1UpU0vb5V2iE5Yyiaj6eeap6dRoMF5X7di6Q17cg1yVWgEDHOMhF8rN38AL5F 1UxHFBs6bMaXkmjfsFdnoJ1+WwwSGCWJL8m8c2T28SzT4vvba0L0DPNmflJYCssz2ohl Y/75iBygQkIQYBCvNh9aVyFrO7d7TKUvUk/2eIH49fRPvgxaZ36nX+d7hJgntOoTvEPd gzf9LNOt4M2vFqTB9gfLk6qeKDnYbaBbHDej4RXG83MI9neSSCxMDggPO3fgNT6Le96/ GpkeErvwpVEu59rrE+99diS5SyqX/la+zEcCZd4P5GlEJ7rjqqzyixOGGgFW4jMmN1Va Fq0w== X-Gm-Message-State: ACgBeo0aBOMPX6jVVgMRSxf/Fz7cHHHr9Nso4n3yxNk4asSIMNWAr8NR WHQQ0ZRsu+XDhb/A7IitRHMehuwExQ2Qk8QNJqE= X-Google-Smtp-Source: AA6agR6FNubtGDGfeAys3H66h6ZYkVMGMW3QrWsrfhk/fQeLQnOxoD3FDlR7LGu+KjYoJoluDCyBlgNxRPpB/JMFMts= X-Received: by 2002:a17:907:c24:b0:73d:7c20:cc45 with SMTP id ga36-20020a1709070c2400b0073d7c20cc45mr11399001ejc.294.1661704456076; Sun, 28 Aug 2022 09:34:16 -0700 (PDT) MIME-Version: 1.0 References: <87fshgnxss.fsf@posteo.net> In-Reply-To: <87fshgnxss.fsf@posteo.net> From: Cletip Cletip Date: Sun, 28 Aug 2022 18:34:04 +0200 Message-ID: Subject: Re: Have all the tags of a heading, with a tag hierarchy To: =?UTF-8?Q?Juan_Manuel_Mac=C3=ADas?= Cc: orgmode Content-Type: multipart/alternative; boundary="000000000000d382f505e74fb797" Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=clement020302@gmail.com; helo=mail-ej1-x62e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, 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=1661704487; 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=ydaukB/qxq0n6mlZ1zLYpqEcH4d2nJUO58xqVuZg9Mo=; b=Q7yECRBjkWpJfHwWAxq9KWwKznPhAioD1PpftA2JiVzXqWRuC2C2PMARjKRvut5g8OrxQD BvBcKrQriE80o4rHjkKk8NGyPkoliWAjTiJr/sfSEbUHJXRkSiDGVu9ARQGlvAVpAql6Au 2DABR+lkVwPaTshKQoYzRsOHRbiH6uQIjXYoQDESb9IMizqLtkwbL3gf+8XuQ1Ip7N2Kfn yd0JiFBwTnsce/irHxCuV1POCoFe1mJsZaKK9xzT0pW/1Wq2AOgeO/nDf9aAwIa/GTg+/5 cbbkLStUcufZPypZo5UfnLKmK6qaz9lZFZhbkfozjhNWZn4JsEdB8EB5XhWuPw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661704487; a=rsa-sha256; cv=none; b=jH4LxBU+/xGNXIpJNbtYcceRlYSiTT+qFoe05l1rOilbunMJulEY3VJYP/xovisFt2W743 zO/c9FBJ9XCM47Ruu3k0mGDqOE4Fpb27lFi5eT+UJqoTT+/Tk9KfobN9QjYiE8YSyKr+U8 Cilv8t9y4j/xvwd6HR7KjOUkePqf4EwL7AJUNtXagwntqboQ5x4VyXywbm/Pu6VMrtpd+U LYT86dFXfPhBtOsc0jqHnUQa5eV/+pxIAx2qS805/x38kXWSPUz7Bufncs0WMMdSmD/Mvb CzA5l8OPfVwdLUSPYNO6ZTIK0OpRWJxaUpk/rK8ymPDshw/Apke7xTe+TMa+iw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=DWW0tS6T; 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: -4.10 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=DWW0tS6T; 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: 5C4262EF62 X-Spam-Score: -4.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: cXQgUuxpvLqk --000000000000d382f505e74fb797 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you for your answer! I may not have been specific enough: I want the tags also inherited with this "method" https://orgmode.org/manual/Tag-Hierarchy.html. So imagine this in your configuration file (setq org-tag-alist '((:startgrouptag) ("GTD") (:grouptags) ("Control") (:Persp) (:endgrouptag) (:startgrouptag) ( Control) (:grouptags) ("Context") (:Task") (:endgrouptag)) So, if I put the "Control" tag, I am also supposed to have the "GTD" tag, because "Control" is a child of "GTD". But, with the "org-get-tags" function, I don't have this famous "GTD" tag Le dim. 28 ao=C3=BBt 2022 =C3=A0 18:22, Juan Manuel Mac=C3=ADas a =C3=A9crit : > Cletip Cletip writes: > > > After multiple searches on the internet, I did not find the answer to > > my question (which is the subject of this mail): when calling the > > "org-get-tags" function, only the tags put on the heading, and not the > > inherited tags, are retrieved. How can I get the inherited tags as > > well? Does such a function already exist? Did I miss an essential > > variable? > > In my case, I do manage to get the iherited tags. Do you have > `org-use-tag-inheritance' set to non-nil? > > According to the `org-get-tags' docstring: > > > According to =E2=80=98org-use-tag-inheritance=E2=80=99, tags may be inh= erited from > > parent headlines, and from the whole document, through > > =E2=80=98org-file-tags=E2=80=99. In this case, the returned list of tag= s contains tags > > in this order: file tags, tags inherited from parent headlines, local > > tags. If a tag appears multiple times, only the most local tag is > > returned. > > and > > > However, when optional argument LOCAL is non-nil, only return tags > > specified at the headline. > > Best regards, > > Juan Manuel > > -- > -- > ------------------------------------------------------ > Juan Manuel Mac=C3=ADas > > https://juanmanuelmacias.com > > https://lunotipia.juanmanuelmacias.com > > https://gnutas.juanmanuelmacias.com > > --000000000000d382f505e74fb797 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you for your answer!

I may not have been spec= ific enough:
I want the tags also inherited with this "method"= ; https://orgmode= .org/manual/Tag-Hierarchy.html.


So imagine this in your conf= iguration file

(setq org-tag-alist '((:startgrouptag)
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (&quo= t;GTD")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (:grouptags)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ("Control")
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (:Persp)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (:endgrouptag)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 (:startgrouptag)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ( Control)
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (:groupt= ags)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 ("Context")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (:Task")
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (:endgrouptag))=


So, if I put the "Control" tag, I am also supposed to= have the "GTD" tag, because "Control" is a child of &q= uot;GTD".

But, with the "org-get-tags" function, I d= on't have this famous "GTD" tag

Le=C2=A0dim. 28 ao=C3=BBt = 2022 =C3=A0=C2=A018:22, Juan Manuel Mac=C3=ADas <maciaschain@posteo.net> a =C3=A9crit=C2=A0:
Cletip Cletip writes:=

> After multiple searches on the internet, I did not find the answer to<= br> > my question (which is the subject of this mail): when calling the
> "org-get-tags" function, only the tags put on the heading, a= nd not the
> inherited tags, are retrieved. How can I get the inherited tags as
> well? Does such a function already exist? Did I miss an essential
> variable?

In my case, I do manage to get the iherited tags. Do you have
`org-use-tag-inheritance' set to non-nil?

According to the `org-get-tags' docstring:

> According to =E2=80=98org-use-tag-inheritance=E2=80=99, tags may be in= herited from
> parent headlines, and from the whole document, through
> =E2=80=98org-file-tags=E2=80=99. In this case, the returned list of ta= gs contains tags
> in this order: file tags, tags inherited from parent headlines, local<= br> > tags. If a tag appears multiple times, only the most local tag is
> returned.

and

> However, when optional argument LOCAL is non-nil, only return tags
> specified at the headline.

Best regards,

Juan Manuel

--
--
------------------------------------------------------
Juan Manuel Mac=C3=ADas

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com

--000000000000d382f505e74fb797--