From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kim Rutherford Subject: [PATCH] Fix for infinite loop in org-html-protect Date: Fri, 11 Mar 2011 17:30:43 +0000 Message-ID: <19834.23619.813886.886825@gargle.gargle.HOWL> Reply-To: kmr44@cam.ac.uk Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="IqncpNGBSy" Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=49430 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Py6Ao-0003Z7-QT for emacs-orgmode@gnu.org; Fri, 11 Mar 2011 12:30:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Py6An-0003nw-Gx for emacs-orgmode@gnu.org; Fri, 11 Mar 2011 12:30:46 -0500 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]:58165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Py6An-0003n7-Cb for emacs-orgmode@gnu.org; Fri, 11 Mar 2011 12:30:45 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --IqncpNGBSy Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit When I export the following as HTML, emacs hangs in org-html-protect: #+begin_src org & #+end_src The attached patch fixes the problem for me. Thanks, Kim. --IqncpNGBSy Content-Type: text/plain; name="0001-Fix-infinite-loop-in-org-html-protect.patch" Content-Description: Patch for org mode Content-Disposition: inline; filename="0001-Fix-infinite-loop-in-org-html-protect.patch" Content-Transfer-Encoding: 7bit >From cfb1ccb6f9cfd84530c73b7f72d686a2062b3c3b Mon Sep 17 00:00:00 2001 From: Kim Rutherford Date: Fri, 11 Mar 2011 16:44:09 +0000 Subject: [PATCH] Fix infinite loop in org-html-protect --- lisp/org-html.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index c60c90d..2312b21 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -2186,7 +2186,7 @@ Possible conversions are set in `org-export-html-protect-char-alist'." (let ((start 0)) (while (string-match (car c) s start) (setq s (replace-match (cdr c) t t s) - start (match-beginning 0))))) + start (1+ (match-beginning 0)))))) s)) (defun org-html-expand (string) -- 1.7.1 --IqncpNGBSy--