From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: org-get-tags-at
Date: Thu, 09 Jun 2016 08:41:08 +0200 [thread overview]
Message-ID: <87wply27az.fsf@gmx.us> (raw)
In-Reply-To: CAFgFV9Ngf-D3sOyee-YDG8q1B55WhdXyGcsi0ztJn=bovODurg@mail.gmail.com
Fabrice Popineau <fabrice.popineau@gmail.com> 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?
next prev parent reply other threads:[~2016-06-09 6:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-09 5:03 org-get-tags-at Fabrice Popineau
2016-06-09 6:41 ` Rasmus [this message]
2016-06-09 6:48 ` org-get-tags-at Fabrice Popineau
2016-06-09 7:50 ` org-get-tags-at Marco Wahl
2016-06-09 11:42 ` org-get-tags-at Nicolas Goaziou
2016-06-10 20:24 ` org-get-tags-at Fabrice Popineau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wply27az.fsf@gmx.us \
--to=rasmus@gmx.us \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).