all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bill Wishon <bill@wishon.org>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Documentation vs. implementation for org-properties-postprocess-alist
Date: Sun, 29 Apr 2012 08:50:19 -0700	[thread overview]
Message-ID: <CAP2uJAuxAQtiZi8e127AV2GxX+T5ktfgDnPMFX6qqH_Q3uOgCQ@mail.gmail.com> (raw)
In-Reply-To: <87ipgig9ej.fsf@altern.org>

[-- Attachment #1: Type: text/plain, Size: 1701 bytes --]

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 <bzg@gnu.org> wrote:

> Hi Bill,
>
> Bill Wishon <bill@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
>

[-- Attachment #2: Type: text/html, Size: 2213 bytes --]

  reply	other threads:[~2012-04-29 15:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-23  4:54 Documentation vs. implementation for org-properties-postprocess-alist Bill Wishon
2012-04-29  9:43 ` Bastien
2012-04-29 15:50   ` Bill Wishon [this message]
2012-04-29 16:07     ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAP2uJAuxAQtiZi8e127AV2GxX+T5ktfgDnPMFX6qqH_Q3uOgCQ@mail.gmail.com \
    --to=bill@wishon.org \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.