emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] getting file properties


From: Eric Abrahamsen
Subject: Re: [O] getting file properties
Date: Sat, 04 May 2013 22:11:43 -0700
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux)

John Kitchin <address@hidden> writes:

> Hi everyone,
>
> if I have an org-file with this in it:
>
> #+EMAIL: address@hidden
>
> 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 address@hidden).
>
> 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...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]