From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Function to look-up a certain property Date: Sun, 02 Nov 2014 18:08:41 +0100 Message-ID: <87bnopil7q.fsf@nicolasgoaziou.fr> References: <87zjc9edpm.fsf@mailbox.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkydI-0005IP-2Y for emacs-orgmode@gnu.org; Sun, 02 Nov 2014 12:08:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xkyd9-0005CP-P9 for emacs-orgmode@gnu.org; Sun, 02 Nov 2014 12:08:04 -0500 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:57256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xkyd9-0005CA-JW for emacs-orgmode@gnu.org; Sun, 02 Nov 2014 12:07:55 -0500 Received: from mfilter3-d.gandi.net (mfilter3-d.gandi.net [217.70.178.133]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id B8DDE172071 for ; Sun, 2 Nov 2014 18:07:50 +0100 (CET) Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter3-d.gandi.net (mfilter3-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 0VuRK5d0fUQw for ; Sun, 2 Nov 2014 18:07:49 +0100 (CET) Received: from selenimh (unknown [91.224.148.150]) (Authenticated sender: mail@nicolasgoaziou.fr) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 73B2617209A for ; Sun, 2 Nov 2014 18:07:49 +0100 (CET) In-Reply-To: <87zjc9edpm.fsf@mailbox.org> (Alexander Baier's message of "Sun, 02 Nov 2014 18:04:21 +0100") 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 Hello, Alexander Baier writes: > I am looking for a function that starts at point and walks up the > outline-tree searching for property P. If P is defined the function > returns P's value, otherwise nil. If The top level headline does not > have a property P, the function looks for #+P between the first headline > and bob. > > Is there something in org's code base that does this? (org-entry-get (point) "P" t) However, it will look for "#+PROPERTY: P val" instead, and it isn't limited to data before first headline. Regards, -- Nicolas Goaziou