Hello,

Aaron Ecay <aarone...@gmail.com> writes:

> +         (unless (eq (org-element-type (org-element-at-point)) 
> 'property-drawer)
> +           (throw 'cont nil))
>           (setq range (or (org-get-property-block)
>                           (if (y-or-n-p
>                                (format "Malformed drawer at %d, repair?" 
> (point)))

This will not work as you short-circuit the following part of the test
(i.e., since you only get `property-drawer' type on a well-formed
drawer, you get no change to repair malformed ones).

Also, if you store `org-element-at-point', you don't need anymore to
call `org-get-propert-block'.

Nevertheless, I think we should take a radical different approach, as
discussed recently with Bastien, which is to enforce property drawers to
start on the line right after the headline and maybe the planning info,
if any. As a consequence, the code for this function will be different
anyway. IOW, I wouldn't bother too much.


Regards,

-- 
Nicolas Goaziou

Reply via email to