emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Documentation vs. implementation for org-properties-postprocess-alis


From: Bill Wishon
Subject: [O] Documentation vs. implementation for org-properties-postprocess-alist
Date: Sun, 22 Apr 2012 21:54:23 -0700

Hi,

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.

The example in the docstring says:

    (("Remaining" (lambda(value)
                      (let ((clocksum (org-clock-sum-current-item))
                            (effort (org-duration-string-to-minutes
                                      (org-entry-get (point) "Effort"))))
                        (org-minutes-to-hh:mm-string (- effort clocksum))))))

But in order for this to work with the implementation I think it would need to be :

    (("Remaining" ((lambda(value)
                      (let ((clocksum (org-clock-sum-current-item))
                            (effort (org-duration-string-to-minutes
                                      (org-entry-get (point) "Effort"))))
                        (org-minutes-to-hh:mm-string (- effort clocksum)))))))

Adding extra parens around the lambda _expression_ in the example to make it a list.  Either that or the implementation of org-set-property should change to :

$ diff org.el org.el.new
14593c14593
<        (fn (assoc property org-properties-postprocess-alist)))
---
>        (fn (cdr (assoc property org-properties-postprocess-alist))))
14596c14596
<     (when fn (setq value (funcall (cadr fn) value)))
---
>     (when fn (setq value (funcall fn value)))

What do you think?

~>Bill

reply via email to

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