From: Carsten Dominik <carsten.dominik@gmail.com>
To: David Maus <dmaus@ictsoc.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: Infinite loop when escape replace string contains escape sequence it replaces [6.35trans]
Date: Sat, 8 May 2010 07:21:35 +0200 [thread overview]
Message-ID: <2E8CCCFE-DFCF-47D2-8FF5-2EE6E9FAF062@gmail.com> (raw)
In-Reply-To: <8739y3aed3.wl%dmaus@ictsoc.de>
Applied, thanks.
- Carsten
On May 7, 2010, at 6:03 PM, David Maus wrote:
>
> 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" . "87zl0qq1f3.wl%maus.david@gmail.com
> ")))
> `----
>
> 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.... dmjena@jabber.org
> Email..... dmaus@ictsoc.de
> <fix-infinite-loop-esc-
> repl.diff>_______________________________________________
> 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
- Carsten
prev parent reply other threads:[~2010-05-08 5:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-07 16:03 Bug: Infinite loop when escape replace string contains escape sequence it replaces [6.35trans] David Maus
2010-05-08 5:21 ` Carsten Dominik [this message]
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=2E8CCCFE-DFCF-47D2-8FF5-2EE6E9FAF062@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=dmaus@ictsoc.de \
--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).