From cf9a05052f7524c1c8ae67320a646019d9279c2b Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Fri, 5 Sep 2008 09:36:07 -0500 Subject: [PATCH] Fix bug about LaTeX export of QUOTE and VERSE environments. Also allow completion for *_QUOTE *_VERSE and *_SRC keywords. --- lisp/ChangeLog | 8 ++++++++ lisp/org-export-latex.el | 8 ++++---- lisp/org.el | 5 ++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 28413aed5..1384448ff 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2008-09-05 Bastien Guerry + + * org.el (org-additional-option-like-keywords): Added keywords for + the _QUOTE, _VERSE and _SRC environments. + + * org-export-latex.el (org-export-latex-preprocess): Fix bug when + exporting _QUOTE and _VERSE environments. + 2008-09-05 Carsten Dominik * org-remember.el (org-remember-templates): Add nil instead of diff --git a/lisp/org-export-latex.el b/lisp/org-export-latex.el index c388166eb..d6661c0ac 100644 --- a/lisp/org-export-latex.el +++ b/lisp/org-export-latex.el @@ -1122,18 +1122,18 @@ Regexps are those from `org-export-latex-special-string-regexps'." ;; Convert blockquotes (goto-char (point-min)) - (while (re-search-forward "^#\\+BEGIN_QUOTE" nil t) + (while (search-forward "ORG-BLOCKQUOTE-START" nil t) (replace-match "\\begin{quote}" t t)) (goto-char (point-min)) - (while (re-search-forward "^#\\+END_QUOTE" nil t) + (while (search-forward "ORG-BLOCKQUOTE-END" nil t) (replace-match "\\end{quote}" t t)) ;; Convert verse (goto-char (point-min)) - (while (re-search-forward "^#\\+BEGIN_VERSE" nil t) + (while (search-forward "ORG-VERSE-START" nil t) (replace-match "\\begin{verse}" t t)) (goto-char (point-min)) - (while (re-search-forward "^#\\+END_VERSE" nil t) + (while (search-forward "ORG-VERSE-END" nil t) (replace-match "\\end{verse}" t t)) ;; Convert horizontal rules diff --git a/lisp/org.el b/lisp/org.el index 7ed2d1f32..55944c405 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8022,7 +8022,10 @@ This function can be used in a hook." (defconst org-additional-option-like-keywords '("BEGIN_HTML" "BEGIN_LaTeX" "END_HTML" "END_LaTeX" "ORGTBL" "HTML:" "LaTeX:" "BEGIN:" "END:" "TBLFM" - "BEGIN_EXAMPLE" "END_EXAMPLE")) + "BEGIN_EXAMPLE" "END_EXAMPLE" + "BEGIN_QUOTE" "END_QUOTE" + "BEGIN_VERSE" "END_VERSE" + "BEGIN_SRC" "END_SRC")) (defcustom org-structure-template-alist '(