From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Headline text special property Date: Tue, 16 Sep 2014 18:36:45 +0200 Message-ID: <87tx47ikte.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTvkd-0000uj-CK for emacs-orgmode@gnu.org; Tue, 16 Sep 2014 12:37:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTvkX-00030R-1Z for emacs-orgmode@gnu.org; Tue, 16 Sep 2014 12:37:11 -0400 Received: from plane.gmane.org ([80.91.229.3]:58638) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTvkW-0002zh-RN for emacs-orgmode@gnu.org; Tue, 16 Sep 2014 12:37:04 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XTvkS-0005Cy-Le for emacs-orgmode@gnu.org; Tue, 16 Sep 2014 18:37:00 +0200 Received: from g231227029.adsl.alicedsl.de ([92.231.227.29]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Sep 2014 18:37:00 +0200 Received: from tjolitz by g231227029.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Sep 2014 18:37: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 Brett Witty writes: Hi, > Is there a special property that contains the text of a headline but > not the stars, todo, tags or any of that other data? not a property, but functions: ,----[ C-h f org-heading-components RET ] | org-heading-components is a compiled Lisp function in `org.el'. | | (org-heading-components) | | Return the components of the current heading. | This is a list with the following elements: | - the level as an integer | - the reduced level, different if `org-odd-levels-only' is set. | - the TODO keyword, or nil | - the priority character, like ?A, or nil if no priority is given | - the headline text itself, or the tags string if no headline text | - the tags string, or nil. `---- * TODO Test :mytag: #+BEGIN_SRC emacs-lisp (save-excursion (outline-previous-heading) (nth 4 (org-heading-components))) #+END_SRC #+results: : Test or ,----[ C-h f org-get-heading RET ] | org-get-heading is a compiled Lisp function in `org.el'. | | (org-get-heading &optional NO-TAGS NO-TODO) | | Return the heading of the current entry, without the stars. | When NO-TAGS is non-nil, don't include tags. | When NO-TODO is non-nil, don't include TODO keywords. `---- #+BEGIN_SRC emacs-lisp (save-excursion (outline-previous-heading) (org-get-heading t t)) #+END_SRC #+results: : Test -- cheers, Thorsten