From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: How to check whether the headline the point is on has some tag?
Date: Sat, 25 Oct 2014 01:44:46 +0200 [thread overview]
Message-ID: <87oat1f2xd.fsf@gmail.com> (raw)
In-Reply-To: 87lho5kpup.fsf@andrew.cmu.edu
John Kitchin <jkitchin@andrew.cmu.edu> writes:
> Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
>
>
> Check the last element of org-heading-components.
>
> * Headline :tag1:
>
> #+BEGIN_SRC emacs-lisp
> (org-heading-components)
> #+END_SRC
>
> #+RESULTS:
> | 1 | 1 | nil | nil | Headline | :tag1: |
>
>
>
>
>> Hi list,
>>
>> I'd like to implement splitting an org file at tagged entries in my
>> org-one-to-many library (as requested on the list by Daniel Clemente).
>> How do I check whether a specific headline (say, one a point is at) has
>> some tag (but not inherited)?
>>
>> TIA,
alternatively you could use:
* Headline :tag1:
#+BEGIN_SRC emacs-lisp
(let ((org-use-tag-inheritance nil))
(save-excursion
(outline-previous-heading)
(org-element-property :tags (org-element-at-point))))
#+END_SRC
#+results:
| tag1 |
--
cheers,
Thorsten
prev parent reply other threads:[~2014-10-24 23:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 23:09 How to check whether the headline the point is on has some tag? Marcin Borkowski
2014-10-24 23:30 ` John Kitchin
2014-10-24 23:44 ` Thorsten Jolitz [this message]
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=87oat1f2xd.fsf@gmail.com \
--to=tjolitz@gmail.com \
--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).