emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Julien Danjou <julien@danjou.info>
To: Bastien <bzg@altern.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] org-macs: store evaluated version of pom
Date: Sat, 26 Feb 2011 19:15:19 +0100	[thread overview]
Message-ID: <87k4gmek7c.fsf@keller.adm.naquadah.org> (raw)
In-Reply-To: <87hbbqaet6.fsf@gnu.org> (Bastien's message of "Sat, 26 Feb 2011 18:25:25 +0100")


[-- Attachment #1.1: Type: text/plain, Size: 899 bytes --]

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

[-- Attachment #1.2: Type: application/pgp-signature, Size: 835 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2011-02-26 18:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25 13:30 [PATCH] org-macs: store evaluated version of pom Julien Danjou
2011-02-26 17:25 ` Bastien
2011-02-26 18:15   ` Julien Danjou [this message]
2011-02-27 11:46     ` 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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=87k4gmek7c.fsf@keller.adm.naquadah.org \
    --to=julien@danjou.info \
    --cc=bzg@altern.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).