all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Magnus Henoch <magnus.henoch@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: [PATCH] Use save-excursion in org-map-dblocks
Date: Wed, 24 Mar 2010 22:27:06 +0100	[thread overview]
Message-ID: <4B463C46-50B5-42FA-8459-9B4260AFBEF2@gmail.com> (raw)
In-Reply-To: <84d3ytsuep.fsf@linux-b2a3.site>


On Mar 24, 2010, at 2:47 PM, Magnus Henoch wrote:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> this looks like an OK patch and I don't have any problems applying  
>> it.
>> However, I do not quite understand the need for it.  Can you please
>> try to explain a bit better?  Do you have two processes running over
>> the same file at the same time, or why is there a conflict?
>
> My dblock-write function calls url-retrieve, to asynchronously  
> retrieve an
> HTML page.  The callback function I pass to url-retrieve will then  
> fill
> in the information I need into the dynamic block.
>
> So in the following case:
>
> * Find start of dblock 1, store as pos
> * Make HTTP request for dblock 1
> * Go back to pos
> * Find end of dblock 1
> * Find start of dblock 2, store as pos
> * Make HTTP request for dblock 2
> * Asynchronous event: HTTP response for dblock 1 arrives, insert  
> lots of
>  data in dblock 1
> * Go back to pos
> * Find end of dblock 2
>
> the last step will actually find the end of dblock 1, if the amount of
> data inserted in dblock 1 is great enough that pos suddenly points
> inside it.  (Then it will of course find dblock 2 again, request its  
> HTML
> page again, and thus insert the data twice.)
>
> An equivalent fix would be to make pos a marker instead.

Yes, that would be the same.

I have applied the patch, thanks.

Can I ask you to sign the FSF papers for future patches which might be  
more than a few lines?

Thanks.

- Carsten

  reply	other threads:[~2010-03-24 21:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23 17:37 [PATCH] Use save-excursion in org-map-dblocks Magnus Henoch
2010-03-24 11:16 ` Carsten Dominik
2010-03-24 13:47   ` Magnus Henoch
2010-03-24 21:27     ` Carsten Dominik [this message]
2010-03-24 22:03       ` Magnus Henoch

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=4B463C46-50B5-42FA-8459-9B4260AFBEF2@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=magnus.henoch@gmail.com \
    /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.