From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6LnaIxVHD2PgCwEAbAwnHQ (envelope-from ) for ; Wed, 31 Aug 2022 13:33:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aBKtIxVHD2MjRgAAauVa8A (envelope-from ) for ; Wed, 31 Aug 2022 13:33:41 +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 325BD257DD for ; Wed, 31 Aug 2022 13:33:41 +0200 (CEST) Received: from localhost ([::1]:38186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTLyU-0004zH-Vn for larch@yhetil.org; Wed, 31 Aug 2022 07:33:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTLxC-0004wl-0P for emacs-orgmode@gnu.org; Wed, 31 Aug 2022 07:32:18 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:33690) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTLww-0002Yl-IZ for emacs-orgmode@gnu.org; Wed, 31 Aug 2022 07:32:17 -0400 Received: by mail-ej1-x636.google.com with SMTP id cu2so27811487ejb.0 for ; Wed, 31 Aug 2022 04:32:02 -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=bKtQAhklqDJn0pXqZYOPhNFq9XTVAg2l7UuD7ZW1Aos=; b=l0ubbSTChu2j9E/UPgJDk6FRMKE799UXVqm0aSe06EeLAoYaJ1ug2bxetwBg8OMaOV CwFvBFSXGtCzWrL6+fRWrk0+PgK0Lt6lmitcU8AFSmNe1dZZPpNfB3PwDr1IA2/5DuN8 cLLKF06/leD7tNHNpl5dyqeUplUYwiJRgIHtj58K6P/5RgFYxvoWxQYTCymglThXJJDw PEqpl1NzbKHmDxuaiVxmDxwcqYa6Qc/LxiOi0EXQvC72oJ0sV4mC1xHsqe4mkS17UOHZ ccafYhu+JHH1d59JeeTfuDtiB0WKdFhzcZiMP2ep+LXCc6EZIcCERqiKlU28tCpCJoGF DF1g== 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=bKtQAhklqDJn0pXqZYOPhNFq9XTVAg2l7UuD7ZW1Aos=; b=3IEBJO6jXu8ydnQ+ZX/5sNqv19H/dxfJjBfwISLsVT85VIu2rfwWFf8/kNn1NzHlLM kHiSeAkUgNfhVmhWjp7OUnTogqTcZJ+QvB3XyWDzKyVNtne+i17yoofl2lMi/W+l9MG6 MG1+B/TZL0OPUgRM54Rjb+ozNF4Ei5RrJQTpCZEuX5WT4rMHdRQuD4m7f+YjJDSs1KwB s+a92pXVTJJFM3eUjbX1Laq7uyl1uczcMJsDKGame3RfiegCdcR9mONkNovMnSVzM76G /aCYjGpqTXMnlv+eFRkly0KQTdOZQxHH4nkO8+UOndFdtHagjcOdftN26CDQ2cwP6gdq fd8A== X-Gm-Message-State: ACgBeo2+ilgQOnFnDoeZj2674qWgLu7/1BA5z93V6Oh+QXa8Zsg+zZaU i8pfJjPT7cfK+NBMCDAEpyBeAcQSBWo3+1+eduo= X-Google-Smtp-Source: AA6agR6SWNstW7yK9J91SfCUMzFzyGLaomxFHFXrCIiPtgVofACCjqVlJlQtyFhbs/diR9GhbkdymuDYYfdvRcfdOqs= X-Received: by 2002:a17:907:7b8d:b0:741:9c4d:a48 with SMTP id ne13-20020a1709077b8d00b007419c4d0a48mr8793610ejc.746.1661945520248; Wed, 31 Aug 2022 04:32:00 -0700 (PDT) MIME-Version: 1.0 References: <87fshgnxss.fsf@posteo.net> <87bks3qn1w.fsf@localhost> In-Reply-To: From: Cletip Cletip Date: Wed, 31 Aug 2022 13:31:48 +0200 Message-ID: Subject: Re: Have all the tags of a heading, with a tag hierarchy To: Ihor Radchenko Cc: Daniel Fleischer , =?UTF-8?Q?Juan_Manuel_Mac=C3=ADas?= , orgmode Content-Type: multipart/alternative; boundary="0000000000005edb7f05e787d89c" Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=clement020302@gmail.com; helo=mail-ej1-x636.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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=1661945621; 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=bKtQAhklqDJn0pXqZYOPhNFq9XTVAg2l7UuD7ZW1Aos=; b=RFGYfmrlzaBD9GVnw4o0TYM0SlrGVOzSgajzj/pNsBIgJvxaRy8U37HDpCYGOZqF8lKwnO nKJfYaSSN0XIAOqRHVbQ7KUfrxTeWISjdWwgK6SFBOZu/nbuKtEnGA2IG6xyzyh/lv0grJ 9qihFYK9OnHLHRaldupaDPZ0+ZLq4d9RmnoOUAGJXUMA+7zchp92r5eni5n1Fu7WH1ofCN T4fq5IdP52eN8Svlwehk/fLqpWvSzbyZEWLBfRavESWVywv93XQvkW7WMm/O4J0KvkHfvO k5m3+p9aelioU9rZw6K4KXbBovoy9IruLLoyJkzyaUVyEpVB044uiAgfd//pgA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661945621; a=rsa-sha256; cv=none; b=PFBgNGOpg23kbq3lVDnROrx1mljy+YottUbjnqPyMY0PIim3wb/jMeZoL3pJ05RBTkdUy8 z6e7aaePx12WV+mImQ5AZdTYBVshO+XPdG4fqhnNQ/07zAk31iHOUemC8H/T6uzraCh9SB Lxs5Rwgi9PbqcqrdT1+S6jejw4RJZq5/+J7y34rOffPk3sxoFMfJpcxTUiED9CADR6BfvH KbNWWj+0LzOe7hxrqn1MEeMK2xOAHfcp4hFDAEQdtIZvOKNQJU0W6Ge2fG/i8XwgIBimuk B0Wn9JzZA6xMelUahAieOVyi2PfCLZv1OO6pa4NolYLScGQViZxTjEB6jPbMOw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=l0ubbSTC; 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=l0ubbSTC; 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: 325BD257DD X-Spam-Score: -2.28 X-Migadu-Scanner: scn1.migadu.com X-TUID: qoqdgVYlr3lC --0000000000005edb7f05e787d89c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Just one last clarification to be sure: there is no native function in org-mode to have the list of tags with a hierarchy? I have to write my function with the two functions org-get-tags and org-tags-expand to get the result I want : a list of tags that takes into account the hierarchy defined by the "org-tag-alist" variable Le mer. 31 ao=C3=BBt 2022 =C3=A0 13:25, Cletip Cletip a =C3=A9crit : > Sorry, I found the solution : i must just give one argument non-nil to th= e > function "org-tags-expand". > Like this : > (org-tags-expand "GTD" t) > > It's perfect, thanks a lot for your help ! > > Le mer. 31 ao=C3=BBt 2022 =C3=A0 11:01, Cletip Cletip a > =C3=A9crit : > >> Thank you for your answer, and sorry for the late reply >> >> Ok I think I understood the mechanism, but I don't understand how to use >> this regular expression (the one given by, for example, >> (org-tags-expand "GTD") >> which gives me the regular expression "with the other tags" >> ) >> >> I see perfectly the idea : a search is done with org-agenda with this >> regular expression. But I can't use it. >> >> The problem is that I don't know how to use this regular expression with >> a function that returns the tags. Do you have any clue (piece of code wh= ere >> it is already used ? A function allowing me to translate this regular >> expression into a simple tag? Do I just have to convert this regular >> expression into a list of tags? Is it possible? I'm asking myself all th= ese >> questions because I just don't know where to go ^^) >> >> Thanks in advance for your future answer. >> >> >> Le lun. 29 ao=C3=BBt 2022 =C3=A0 13:57, Ihor Radchenko a >> =C3=A9crit : >> >>> Cletip Cletip writes: >>> >>> > Yes I understand both perfectly. I think some people (like me) would >>> like >>> > to connect them, others would not want to bring them together. >>> > But how to get the hierarchy (or the families) used by org agenda wit= h >>> a >>> > function like "org-get-tags" ? >>> >>> You will probably need to combine org-get-tags output with regexp >>> generated by org-tags-expand. Tag hierarchy in Org is a just a search >>> wrapper - no real tags are changed in the file; only the matching. >>> >>> -- >>> Ihor Radchenko, >>> Org mode contributor, >>> 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 >>> >> --0000000000005edb7f05e787d89c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Just one last clarification to be sure: there is no native= function in org-mode to have the list of tags with a hierarchy? I have to = write my function with the two functions
org-get-tags and org-tags-expa= nd
to get the result I want : a list of tags that takes into account the= hierarchy defined by the "org-tag-alist" variable

<= div class=3D"gmail_quote">
Le=C2=A0mer= . 31 ao=C3=BBt 2022 =C3=A0=C2=A013:25, Cletip Cletip <clement020302@gmail.com> a =C3=A9crit=C2=A0= :
Sorry, I found the solution : i must just give one argument non-nil to t= he function "org-tags-expand".
Like this :=E2=80=AF
(org-tags-expand "GTD" t)

It's perf= ect, thanks a lot for your help !=C2=A0

Le=C2=A0mer. 31 ao=C3=BBt 2022= =C3=A0=C2=A011:01, Cletip Cletip <clement020302@gmail.com> a =C3=A9crit=C2=A0:=
Thank you for your answer, and sorry for the late reply

Ok I think= I understood the mechanism, but I don't understand how to use this reg= ular expression (the one given by, for example,
(org-tags-expand "G= TD")
which gives me the regular expression "with the other tag= s"
)

I see perfectly the idea : a search is done with org-ag= enda with this regular expression. But I can't use it.

The probl= em is that I don't know how to use this regular expression with a funct= ion that returns the tags. Do you have any clue (piece of code where it is = already used ? A function allowing me to translate this regular expression = into a simple tag? Do I just have to convert this regular expression into a= list of tags? Is it possible? I'm asking myself all these questions be= cause I just don't know where to go ^^)

Thanks in advance for yo= ur future answer.


Le=C2=A0lun. 29 ao=C3=BBt 2022 =C3=A0=C2=A013:57, = Ihor Radchenko <= yantar92@gmail.com> a =C3=A9crit=C2=A0:
Cletip Cletip <clement020302@gmail.com> writes= :

> Yes I understand both perfectly. I think some people (like me) would l= ike
> to connect them, others would not want to bring them together.
> But how to get the hierarchy (or the families) used by org agenda with= a
> function like "org-get-tags" ?

You will probably need to combine org-get-tags output with regexp
generated by org-tags-expand. Tag hierarchy in Org is a just a search
wrapper - no real tags are changed in the file; only the matching.

--
Ihor Radchenko,
Org mode contributor,
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
--0000000000005edb7f05e787d89c--