From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Baier Subject: Re: Function to look-up a certain property Date: Sun, 02 Nov 2014 20:50:09 +0100 Message-ID: <87vbmxe61a.fsf@mailbox.org> References: <87zjc9edpm.fsf@mailbox.org> <87bnopil7q.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xl1Am-0000Pz-AS for emacs-orgmode@gnu.org; Sun, 02 Nov 2014 14:50:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xl1Af-0007uD-AF for emacs-orgmode@gnu.org; Sun, 02 Nov 2014 14:50:48 -0500 Received: from mx1.mailbox.org ([80.241.60.212]:41866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xl1Af-0007u8-0f for emacs-orgmode@gnu.org; Sun, 02 Nov 2014 14:50:41 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 4F8174025B for ; Sun, 2 Nov 2014 20:50:40 +0100 (CET) Received: from smtp1.mailbox.org ([80.241.60.240]) (using TLS with cipher AES256-GCM-SHA384) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTPS id FFUPyybMDspG for ; Sun, 2 Nov 2014 20:50:39 +0100 (CET) In-Reply-To: <87bnopil7q.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sun, 02 Nov 2014 18:08:41 +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 On 2014-11-02 18:08 Nicolas Goaziou wrote: > 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. This is perfect, thank you! Regards, -- Alexander Baier