From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id uGxvEW+LEmY6VQAAqHPOHw:P1 (envelope-from ) for ; Sun, 07 Apr 2024 14:02:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id uGxvEW+LEmY6VQAAqHPOHw (envelope-from ) for ; Sun, 07 Apr 2024 14:02:55 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=J2dKfciM; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712491375; 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=OoGzir3vwmVBRzVwU41JHrKdy5kzHD9x/jqrpi0ND14=; b=Q3+sJbY113/x4cKAKSQPDFWiZWYIYEaSheMFPahhu2Psvbykw2+wOLc+fZrhfFgzkJRtn+ W2Ii1Smi4d4ssPF86RQ3Ebvnp3p9x/IPs4imfulIv2WIm/s/rI394yEM3wXj+X1lm/IE+F sF2YpDUnYJ9Swu0Z3xcqr46tdS7OEEZopPgQwq7IUMXwZApLlXeD1wQ8rs74lam1pqJblA 7+vMuQ+CHSUXhTYN9ibYBHn/eNEB7Vls7AIYLP/oO81YqC4KcyXPbkjx6c+BAoM/Zxs8s9 Y7heYtsEjMfi+gzZgMwVQVJaYpwLKEcvEbQtn1Q+5BBFF3tOZwF9V9lhh7wkUw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712491375; a=rsa-sha256; cv=none; b=aEjdaVG3EUkPbjplVsuA0MJ4m7umMOOmDzgMcd/pFIm1FY7STsKXkRORVVTNWdIhgKY6sZ IapCEvARvOtuySqakKl3NSKeTT7WBjbKJCdZHPER5UW3zD0dB1b9Xj9RZx+XpIuPp2oCu+ CkDTB4mkRdJMwBCRysUJjx51eGXvR08Q6A6p7Du3RXOEAypnGfcto+RUvhucdzBOO4MqWP lAaUdHGYk+d24hJ9Bza/yLlV9ieYdj1jrXBCZnSyQLVYpyQsOj4fNfzXjuhKBtFkAxJHRm dDh6GYeAWIKoAGSeCwJDGSvU77p//FUFUJdkSL1xZlShRbcK4enzBgZnSIn3dQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=J2dKfciM; 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"; dmarc=pass (policy=none) header.from=posteo.net 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 1F0A01A2BC for ; Sun, 7 Apr 2024 14:02:55 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtRE1-0007k9-9C; Sun, 07 Apr 2024 08:02:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtRDy-0007gL-GL for emacs-orgmode@gnu.org; Sun, 07 Apr 2024 08:02:14 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtRDs-0003NT-Rz for emacs-orgmode@gnu.org; Sun, 07 Apr 2024 08:02:14 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7F0F5240027 for ; Sun, 7 Apr 2024 14:02:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1712491326; bh=cwZIqvqXAYZuHMyQmoVFcqsB7aHlT9bJQfapWdNzUhc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=J2dKfciMbggrGyMEFGdmVHNrEfptva+StOBeVoWrhKW5elIgHU2qA9WU68dTBvXR4 3OysoL3ZvnLiZoJvWlVg0vpDqpc3RXK5J8wc1YliIeI4FXCzXZW/2ZS8GH4BfrYqPv bt91Zx9cwS1tBTie12nsCg7V9UyXSCNLh0kA+nmIyayA1lJaLrlAa2Ajop28IablIS 1FyH7zo8THrtETevJ/PaE2yzD7BZPxpE8+aJSRGNjug72sDIBKFxXXof3rP/uum54f 2VkkmjvMnjeAYXMbF4kmJ0DlWu/E3dSD13UyHNQBZEcbWmmqdBBnwlTKKdKjb38+Hj H5xWUrzRHWABA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VC9nT5vdqz6tn4; Sun, 7 Apr 2024 14:02:05 +0200 (CEST) From: Ihor Radchenko To: "Christopher M. Miles" Cc: Org mode Subject: Re: Let `org-element-at-point` or `org-element-context` return element type "tags" when point on tags. In-Reply-To: <661252e4.170a0220.59420.c9cb@mx.google.com> References: <661252e4.170a0220.59420.c9cb@mx.google.com> Date: Sun, 07 Apr 2024 12:02:27 +0000 Message-ID: <87jzl9nzxo.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.33 X-Spam-Score: -9.33 X-Migadu-Queue-Id: 1F0A01A2BC X-Migadu-Scanner: mx12.migadu.com X-TUID: 9wE946tJm/+0 "Christopher M. Miles" writes: > When I move point on the headline tags position. I evaluate > `(org-element-at-point)` or `(org-element-context)`, both return element > type is `(headline ....)`. I hope those two functions can return more > explicit element type like "tags". > I tried to find this type API function in existing functions. But I have > not found. If someone knows, please let me know. I use this function to > detect whether current point is on tags element. I try to write a simple > extension to display tag explanation info through eldoc. There is currently no such function. We do not parse headline tags as a separate syntax node - they are considered an integral part of the headline node. In future, there is a possibility that more fine-grained information can be obtained using WIP library org-element-match: https://git.sr.ht/~yantar92/org-mode/tree/feature/org-font-lock-element/item/lisp/org-element-match.el#L715 For now, you may have to use regular expression for fine-grained information. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at