Hi Bastien,

I just did a pull this morning against the latest in git and the code is
the same.

The definition of the variable org-property-postprocess-alist says that it
should be a list of lists where each inner list's car is a string and cdr
is a function.  I think the doc string for the variable sounds right.  But
if you look at the function org-set-property what it does is set fn to
(assoc property org-property-postprocses-alist), which is a list whose car
is property and cdr is the function.  Then later the function does (funcall
(cadr fn) value).  The cdr of fn is the (lambda () ...) function.  I'm not
sure what the car of a lambda function is, but it's not what should be
passed to funcall.

Instead what I think should happen is that fn should be set to the lambda
function itself initially by calling cdr on the result of assoc.  Now fn
has the lambda function as it's value, so that later on when the test for
non-nil fn is done you can then simply do (funcall fn value) without the
extra cadr.  Another fix would be to change the cadr of fn to just cdr of
fn.  But then the test says if the list is non-nil then call the function
which is the cdr of fn, but that could be nil at that point since it wasn't
checked.

Best,
~>Bill

On Sun, Apr 29, 2012 at 2:43 AM, Bastien <b...@gnu.org> wrote:

> Hi Bill,
>
> Bill Wishon <b...@wishon.org> writes:
>
> > While hacking around I read the doc for
> > org-properties-postprocess-alist and I think it doesn't align with
> > what the implementation of org-set-property does.
>
> I don't see anything wrong.  Can you double-check?  If there is a
> problem, please tell us what version of Org you are using.
>
> Thanks,
>
> --
>  Bastien
>

Reply via email to