From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: How to check whether the headline the point is on has some tag? Date: Sat, 25 Oct 2014 01:44:46 +0200 Message-ID: <87oat1f2xd.fsf@gmail.com> References: <878uk55akh.fsf@wmi.amu.edu.pl> <87lho5kpup.fsf@andrew.cmu.edu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhoXb-0006Bp-EO for emacs-orgmode@gnu.org; Fri, 24 Oct 2014 19:45:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhoXW-0004gH-53 for emacs-orgmode@gnu.org; Fri, 24 Oct 2014 19:45:07 -0400 Received: from plane.gmane.org ([80.91.229.3]:34686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhoXV-0004fm-VR for emacs-orgmode@gnu.org; Fri, 24 Oct 2014 19:45:02 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XhoXU-00049G-D6 for emacs-orgmode@gnu.org; Sat, 25 Oct 2014 01:45:00 +0200 Received: from g231111091.adsl.alicedsl.de ([92.231.111.91]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Oct 2014 01:45:00 +0200 Received: from tjolitz by g231111091.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Oct 2014 01:45:00 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org John Kitchin writes: > Marcin Borkowski 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