From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: org-get-tags-at Date: Thu, 09 Jun 2016 08:41:08 +0200 Message-ID: <87wply27az.fsf@gmx.us> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAted-0004Bw-G0 for emacs-orgmode@gnu.org; Thu, 09 Jun 2016 02:41:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAteZ-0007q5-AG for emacs-orgmode@gnu.org; Thu, 09 Jun 2016 02:41:22 -0400 Received: from plane.gmane.org ([80.91.229.3]:60340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAteZ-0007pt-2w for emacs-orgmode@gnu.org; Thu, 09 Jun 2016 02:41:19 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bAteU-0007fJ-6V for emacs-orgmode@gnu.org; Thu, 09 Jun 2016 08:41:14 +0200 Received: from ip-178-203-233-13.hsi10.unitymediagroup.de ([178.203.233.13]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Jun 2016 08:41:14 +0200 Received: from rasmus by ip-178-203-233-13.hsi10.unitymediagroup.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Jun 2016 08:41:14 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Fabrice Popineau writes: > Hi, > > I'm trying to program some stuff of my own and > either I misunderstand the documentation or something is wrong > with #'org-get-tags-at. > > I have a heading: > > * Bar :foo:bar:baz: > > (org-get-tags-at) > while on the heading returns ("baz") > I would expect ("foo" "bar" "baz") > > What is the reason for tat result? Don't know. The function seems a bit complicated for what it does... Here’s some ways to get local tags. * headline :tag1:tag3:tag2: #+BEGIN_SRC emacs-lisp (save-excursion (org-back-to-heading) (org-element-property :tags (org-element-at-point))) #+END_SRC #+BEGIN_SRC emacs-lisp (save-excursion (org-back-to-heading) (looking-at org-complex-heading-regexp) (split-string (or (match-string 5) "") ":" t)) #+END_SRC -- Hvor meget poesi tror De kommer ud af et glas isvand?