Przeglądaj źródła

Export: Fix timestamp processing

There were two bugs:

1. Timestamp processing did not honor the setting of
   `org-export-with-timestamps' in the text before the first
   headline.

2. When `org-export-with-timestamps' was nil, time stamps were removed
   even in tables.  I think this is incorrect, so in tables, time
   stamps are now never removed.
Carsten Dominik 16 lat temu
rodzic
commit
d438d616b7
3 zmienionych plików z 19 dodań i 6 usunięć
  1. 9 0
      lisp/ChangeLog
  2. 7 5
      lisp/org-exp.el
  3. 3 1
      lisp/org-export-latex.el

+ 9 - 0
lisp/ChangeLog

@@ -1,3 +1,12 @@
+2009-01-26  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-exp.el (org-export-remove-timestamps): Never remove
+	timestamps from tables.
+
+	* org-export-latex.el (org-export-latex-first-lines): Add more
+	options to the preprocessing of the text before the first
+	headline.
+
 2009-01-25  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-faces.el (org-clock-overlay): Make face compatible with

+ 7 - 5
lisp/org-exp.el

@@ -1,6 +1,7 @@
 ;;; org-exp.el --- ASCII, HTML, XOXO and iCalendar export for Org-mode
 
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
+;;   Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
@@ -1863,10 +1864,11 @@ from the buffer."
   (while (re-search-forward org-maybe-keyword-time-regexp nil t)
     (backward-char 1)
     (org-if-unprotected
-     (replace-match "")
-     (beginning-of-line 1)
-     (if (looking-at "[- \t]*\\(=>[- \t0-9:]*\\)?[ \t]*\n")
-	 (replace-match "")))))
+     (unless (save-match-data (org-at-table-p))
+       (replace-match "")
+       (beginning-of-line 1)
+       (if (looking-at "[- \t]*\\(=>[- \t0-9:]*\\)?[ \t]*\n")
+	   (replace-match ""))))))
 
 (defun org-export-remove-clock-lines ()
   "Remove timestamps and keywords for export."

+ 3 - 1
lisp/org-export-latex.el

@@ -790,7 +790,9 @@ If BEG is non-nil, the is the beginning of he region."
 	    :add-text nil
 	    :comments nil
 	    :skip-before-1st-heading nil
-	    :LaTeX-fragments nil))
+	    :LaTeX-fragments nil
+	    :timestamps (plist-get opt-plist :timestamps)
+	    :footnotes (plist-get opt-plist :footnotes)))
 	(add-text-properties pt (max pt (1- end))
 			     '(:org-license-to-kill t))))))