From 97ecc2c180f9513fdcf9b9a47062ae6aae28d4fc Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sun, 6 Sep 2009 07:54:31 +0200 Subject: [PATCH] LaTeX export: Fix bug with accidental multiline protection in comments --- lisp/ChangeLog | 3 +++ lisp/org-latex.el | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b82ff3486..b23a5f1c0 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-09-06 Carsten Dominik + * org-latex.el (org-export-latex-preprocess): Do not protect in + the LaTeX header. + * org-src.el (org-edit-src-save): Save window setup while saving. (org-edit-src-code): Use new buffer name construction scheme. diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 08fc47501..2c6d4cc4a 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1691,8 +1691,10 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." "\\)?" (org-create-multibrace-regexp "{" "}" 3)))) (while (re-search-forward re nil t) - (add-text-properties (match-beginning 0) (match-end 0) - '(org-protected t)))) + (unless (save-excursion (goto-char (match-beginning 0)) + (equal (char-after (point-at-bol)) ?#)) + (add-text-properties (match-beginning 0) (match-end 0) + '(org-protected t))))) ;; Protect LaTeX entities (goto-char (point-min))