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.
This commit is contained in:
Carsten Dominik 2008-12-21 11:00:05 +01:00
parent d89284b240
commit 9f0060acc2
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2008-12-21 Carsten Dominik <carsten.dominik@gmail.com>
* 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 <carsten.dominik@gmail.com>
* org.el (org-get-refile-targets, org-refile-get-location): Use

View File

@ -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