[O] How to check whether the headline the point is on has some tag?
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, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] How to check whether the headline the point is on has some tag?
Marcin Borkowski mb...@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, -- --- John Kitchin Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu
Re: [O] How to check whether the headline the point is on has some tag?
John Kitchin jkitc...@andrew.cmu.edu writes: Marcin Borkowski mb...@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