org-mode/lisp
Carsten Dominik 93af0ec925 Use save-excursion to remember position when updating dblocks
Magnus Henoch writes:

> This patch has been sitting in my tree for a while...  It's a fix to
> org-map-dblocks, to make it use save-excursion instead of remembering
> position values.  I need this since I have a dblock function that
> asynchronously updates dblocks from HTTP responses, and some dblocks
> ended up getting updated twice or thrice.

[...]

> 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.
2010-03-24 22:25:35 +01:00
..
ChangeLog Use save-excursion to remember position when updating dblocks 2010-03-24 22:25:35 +01:00
ChangeLog.01 Split ChangeLog file into parts. 2008-05-08 08:16:38 +02:00
org-agenda.el Add more options to `org-agenda-todo-ignore-with-deadline' 2010-03-24 13:13:53 +01:00
org-archive.el Archiving: Allow to reverse order in target node 2010-03-11 07:23:03 +01:00
org-ascii.el ASCII export: Remove narrowing of columns for export 2010-02-12 18:48:16 +01:00
org-attach.el Attachments: Commit to git after deleting a file 2010-03-24 22:19:55 +01:00
org-bbdb.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-beamer.el beamer: Add custom options to an outline frame. 2010-03-04 21:55:18 +01:00
org-bibtex.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-clock.el Refactor some functions in clocking 2010-03-09 17:10:15 +01:00
org-colview-xemacs.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-colview.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-compat.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-crypt.el Make `org-reveal' also decrypt encrypted entries 2010-03-21 08:16:08 +01:00
org-ctags.el Bug fixes in org-ctags.el 2010-01-18 08:21:33 +01:00
org-datetree.el Fix typo 2010-01-23 22:47:47 +01:00
org-docbook.el Docbook exporter: Fix problems with exporting footnotes and empty lines 2010-03-08 19:43:34 +01:00
org-docview.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-exp-blocks.el babel: greatly simplified block exportation 2010-02-09 19:09:19 -07:00
org-exp.el LaTeX export: Do not mistake table.el borders for strike-through emphasis. 2010-03-24 18:44:25 +01:00
org-faces.el Implement a simpler way to specify faces for tags and todo keywords 2010-02-25 16:41:28 +01:00
org-feed.el Remove comma after means in many docstrings 2010-01-21 16:15:40 +01:00
org-footnote.el Remove comma after means in many docstrings 2010-01-21 16:15:40 +01:00
org-freemind.el Freemind export: Simplify handling of odd levels 2010-03-24 16:18:25 +01:00
org-gnus.el Remove comma after means in many docstrings 2010-01-21 16:15:40 +01:00
org-habit.el Fix habit alignment problems 2010-01-31 17:51:49 +01:00
org-html.el HTML export: Fix linking to targets in external files 2010-03-19 18:04:23 +01:00
org-icalendar.el Remove comma after means in many docstrings 2010-01-21 16:15:40 +01:00
org-id.el Fix bug when there is no hast for id locations 2010-02-26 19:51:15 +01:00
org-indent.el Fix group name tag for org-indent 2010-03-23 08:31:55 +01:00
org-info.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-inlinetask.el Remove comma after means in many docstrings 2010-01-21 16:15:40 +01:00
org-irc.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-jsinfo.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-latex.el LaTeX export: Do not mistake table.el borders for strike-through emphasis. 2010-03-24 18:44:25 +01:00
org-list.el Fix cursor position after changing bullet types 2010-03-17 16:11:13 +01:00
org-mac-message.el Fix bug with insertion of date lines into a tree from the agenda 2010-02-01 14:30:36 +01:00
org-macs.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-mew.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-mhe.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-mobile.el Remove comma after means in many docstrings 2010-01-21 16:15:40 +01:00
org-mouse.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-plot.el plot: handles option lines starting after column 0 2010-03-01 08:22:18 -07:00
org-protocol.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-publish.el Publishing: Run the after-export-hook 2010-03-04 21:11:08 +01:00
org-remember.el Remember: Allow to file as sibling of current clock 2010-02-24 10:35:28 +01:00
org-rmail.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-src.el Don't leave point in hidden region after exiting code buffer. 2010-03-23 11:18:04 -04:00
org-table.el New helper functions in org-table.el 2010-03-21 20:08:01 +01:00
org-timer.el Update org-timer.el so that we only allow one timer. 2010-02-25 16:03:38 +01:00
org-vm.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-w3m.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-wl.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org-xoxo.el Version number to 6.34trans 2010-01-20 10:13:21 +01:00
org.el Use save-excursion to remember position when updating dblocks 2010-03-24 22:25:35 +01:00