From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: getting file properties Date: Sat, 04 May 2013 22:11:43 -0700 Message-ID: <877gjeovsg.fsf@ericabrahamsen.net> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYr8e-000698-3C for emacs-orgmode@gnu.org; Sun, 05 May 2013 01:05:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYr8a-0008IJ-8I for emacs-orgmode@gnu.org; Sun, 05 May 2013 01:05:32 -0400 Received: from plane.gmane.org ([80.91.229.3]:45472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYr8a-0008I8-1d for emacs-orgmode@gnu.org; Sun, 05 May 2013 01:05:28 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UYr8Y-0000IJ-FW for emacs-orgmode@gnu.org; Sun, 05 May 2013 07:05:26 +0200 Received: from c-76-28-195-250.hsd1.wa.comcast.net ([76.28.195.250]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 May 2013 07:05:26 +0200 Received: from eric by c-76-28-195-250.hsd1.wa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 May 2013 07:05:26 +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: > Hi everyone, > > if I have an org-file with this in it: > > #+EMAIL: jkitchin@cmu.edu > > is there an org lisp command to get the email address after I have > opened the file? I am looping through many files to generate a report, > and would like to do this in emacs-lisp. I had hoped org-entry-get > would do it, but it does not (it will retrieve it from #+PROPERTY: > EMAIL jkitchin@cmu.edu). > > Is it possible to define other keywords similar to that? E.g. > > #+ANDREWID: jkitchin > > and then to be able to read them from a lisp command (without writing > the parsing code myself)? something like (org-entry-get-keyword > "ANDREWID"). > > I could not find anything like this in the property API > (http://orgmode.org/manual/Using-the-property-API.html) which is where > i thought it would be. > > Thanks! > > John If you mean file-level properties (ie not properties on headlines), `org-export-get-environment' is one place to look. It runs `org-export--get-inbuffer-options', which parses options at the top of the file. I don't think it will read arbitrary properties, though...