emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Re: [PATCH] Allow property retrieval before first heading?


From: Bastien
Subject: Re: [Orgmode] Re: [PATCH] Allow property retrieval before first heading?
Date: Sat, 12 Feb 2011 19:04:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi Dan,

Dan Davison <address@hidden> writes:

> Dan Davison <address@hidden> writes:
>
>> Currently (org-entry-get) throws an error if point is before the first
>> heading. Is there a reason that this must be so? Org is too essential
>> for headings to be obligatory!

Thanks for the patch -- makes sense, I applied it.

>> An example of when it would be useful to get properties is in a buffer
>> containing src blocks but no headings (babel takes header args from Org
>> properties). 
>
> Hmm, for the record I was confused on that point; Eric already has a
> workaround for the error to the effect that babel will take header args
> from a #+PROPERTY line in a buffer with no headings. But my question
> stands, as this error is a gotcha, requiring code like this
>
>   (or (condition-case nil
>         (org-entry-get (point) header-arg t)
>       (error nil))
>       (cdr (assoc header-arg org-file-properties))))

Yes - I removed a few useless condition-case wrapping since your patch.

Please report any problem.

Thanks,

-- 
 Bastien



reply via email to

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