Hi Dan,

Dan Davison <dandavis...@gmail.com> writes:

> Dan Davison <dandavis...@gmail.com> 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

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to