emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-get-tags-at


From: Rasmus
Subject: Re: [O] org-get-tags-at
Date: Thu, 09 Jun 2016 08:41:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Fabrice Popineau <address@hidden> 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?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]