From 9f0060acc279d726cc1bb3e769e704c554de8dd2 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sun, 21 Dec 2008 11:00:05 +0100 Subject: [PATCH] LaTeX export: Fix two bugs. 1. When LaTeX export was done with a time-stamped file, a format error in the timestamp format caused the output file to not have the % comment in front of the time string. As this line is early in the file, a LaTeX error would result. 2. Replacement of some special characters could fail. Strangely this shows up only in XEmacs, but it still is a bug. Both bugs were reported by Hugh Daschbach. --- lisp/ChangeLog | 7 +++++++ lisp/org-export-latex.el | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bec5200da..213269a25 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2008-12-21 Carsten Dominik + + * org-export-latex.el (org-export-latex-make-header): Double the % + in the time stamp format. + (org-export-latex-special-chars): Handle case where there is no + match group 3. + 2008-12-20 Carsten Dominik * org.el (org-get-refile-targets, org-refile-get-location): Use diff --git a/lisp/org-export-latex.el b/lisp/org-export-latex.el index d23652df2..78a5f9d18 100644 --- a/lisp/org-export-latex.el +++ b/lisp/org-export-latex.el @@ -689,7 +689,7 @@ OPT-PLIST is the options plist for current buffer." (author (plist-get opt-plist :author))) (concat (if (plist-get opt-plist :time-stamp-file) - (format-time-string "% Created %Y-%m-%d %a %H:%M\n")) + (format-time-string "%% Created %Y-%m-%d %a %H:%M\n")) ;; insert LaTeX custom header org-export-latex-header "\n" @@ -913,7 +913,8 @@ See the `org-export-latex.el' code for a complete conversion table." (replace-match (or (save-match-data (org-export-latex-treat-backslash-char (match-string 1) - (match-string 3))) "") t t)) + (or (match-string 3) ""))) + "") t t)) ((member (match-string 2) '("_" "^")) (replace-match (or (save-match-data (org-export-latex-treat-sub-super-char -- 2.11.4.GIT