[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] [PATCH] org-macs: store evaluated version of pom
From: |
Julien Danjou |
Subject: |
Re: [Orgmode] [PATCH] org-macs: store evaluated version of pom |
Date: |
Sat, 26 Feb 2011 19:15:19 +0100 |
User-agent: |
Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (gnu/linux) |
On Sat, Feb 26 2011, Bastien wrote:
>> * lisp/org-macs.el (org-with-point-at): Store evaluated version of pom. This
>> fixes a potential bug when using (org-with-point-at (func) …), where (func)
>> would be evaluated multiple times
>
> I'm not sure I understand this patch.
>
> Can you show an actual use of org-with-point-at as the one you describe?
>
> Maybe that's related to some code your are working on?
Yes it is. This patch just fix one problem. Without it, what is set
with pom is evaluated multiple times:
(org-with-point-at (function-that-return-some-marker)
(do-stuff))
(function-that-return-some-marker) will be called several times, which
can causes a lot of problem, as you imagine just by reading the current
code.
This patch evalute the function, store it to `pom' and use this variable
instead.
--
Julien Danjou
❱ http://julien.danjou.info
pgpVt2TzVSiDO.pgp
Description: PGP signature