[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Bug: Infinite loop when escape replace string contains escape
From: |
David Maus |
Subject: |
[Orgmode] Bug: Infinite loop when escape replace string contains escape sequence it replaces [6.35trans] |
Date: |
Fri, 07 May 2010 18:03:20 +0200 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/23.1 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See
http://orgmode.org/manual/Feedback.html#Feedback
Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------
Org enters an infinite loop when `org-replace-escapes' is called with
a table containing a replace string that contains the escape sequence
it should be replaced with.
Example:
,----
| (org-replace-escapes "%m" '(("%m" . "address@hidden")))
`----
I stumpled upon when I tried to store a link to a internet message
whose message id contained the sequence "%m" (perfectly valid for a
message id) while using "%m" as message description.
Attached patch fixes this by
1. detecting such 'self reference' and replacing the offending
sequence in the replace string by a string with a text property
that contains the original sequence
2. replacing occurences of substrings with this text property by the
original sequence.
HTH
-- David
Emacs : GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.18.2)
of 2009-11-02 on raven, modified by Debian
Package: Org-mode version 6.35trans
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... address@hidden
Email..... address@hidden
fix-infinite-loop-esc-repl.diff
Description: Binary data
pgpaq4F2nVc1n.pgp
Description: PGP signature
- [Orgmode] Bug: Infinite loop when escape replace string contains escape sequence it replaces [6.35trans],
David Maus <=