[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Inconsistency between org-store-link-functions and org-store-lin
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Inconsistency between org-store-link-functions and org-store-link |
Date: |
Fri, 06 Nov 2015 21:26:10 +0100 |
Hello,
Aaron Ecay <address@hidden> writes:
> The docstring of org-store-link-functions says: “Each function will be
> called in turn until one returns a non-nil value.” However, the code of
> org-store-link actually calls all the functions, and if more than one
> returns a non-nil value raises a prompt asking the user to choose (and
> then calls that function a second time).
>
> Should we change the code to match the doc, or vice versa?
The former, IMO.
> Aaron
>
> PS I vote for keeping the semantics described in the doc, because the
> current implementation’s double calling of the selected function
> means that store-link functions that have side effects will behave
> unpredictably. Imagine a store-link function for image buffers that
> uploads the buffer to imgur or a similar hosting site, and stores the
> http url of the uploaded file. The current implementation would
> upload the image twice.
I agree.
Regards,
--
Nicolas Goaziou
P.S: next release is AFAIK "8.4", not "9.0", you may want to update your
recent changes advertising the latter. Thank you.