Explorar o código

Allow to export to LaTeX while in column view

Carsten Dominik %!s(int64=15) %!d(string=hai) anos
pai
achega
a482182a73
Modificáronse 4 ficheiros con 28 adicións e 14 borrados
  1. 6 0
      lisp/ChangeLog
  2. 12 10
      lisp/org-beamer.el
  3. 4 0
      lisp/org-exp.el
  4. 6 4
      lisp/org-latex.el

+ 6 - 0
lisp/ChangeLog

@@ -1,5 +1,11 @@
 2009-12-16  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-latex.el (org-export-as-latex): Ignore read-only
+	properties.
+
+	* org-exp.el (org-export-preprocess-string): Remove any
+	`read-only' properties.
+
 	* org-agenda.el (org-agenda-inactive-leader): New option.
 	(org-agenda-get-timestamps): Use `org-agenda-inactive-leader'.
 	(org-tags-view): Prompt for matcher if MATCH is an empty string.

+ 12 - 10
lisp/org-beamer.el

@@ -432,16 +432,18 @@ The effect is that these values will be accessible during export."
 		       (match-string 1))))
 	      (plist-get org-export-latex-options-plist
 			 :beamer-header-extra)))
-    (remove-text-properties (point-min) (point-max) '(org-props nil))
-    (org-map-entries
-     '(put-text-property (point-at-bol) (point-at-eol) 'org-props
-			 (org-entry-properties nil 'standard)))
-    (setq org-export-latex-options-plist
-	  (plist-put org-export-latex-options-plist :tags nil))
-    (remove-text-properties (point-min) (point-max) '(org-props nil))
-    (org-map-entries
-     '(put-text-property (point-at-bol) (point-at-eol) 'org-props
-			 (org-entry-properties nil 'standard)))))
+    (let ((inhibit-read-only t))
+      (org-unmodified
+       (remove-text-properties (point-min) (point-max) '(org-props nil))
+       (org-map-entries
+	'(put-text-property (point-at-bol) (point-at-eol) 'org-props
+			    (org-entry-properties nil 'standard)))
+       (setq org-export-latex-options-plist
+	     (plist-put org-export-latex-options-plist :tags nil))
+       (remove-text-properties (point-min) (point-max) '(org-props nil))
+       (org-map-entries
+	'(put-text-property (point-at-bol) (point-at-eol) 'org-props
+			    (org-entry-properties nil 'standard)))))))
 
 (defun org-beamer-auto-fragile-frames ()
   "Mark any frames containing verbatim environments as fragile.

+ 4 - 0
lisp/org-exp.el

@@ -1278,6 +1278,10 @@ on this string to produce the exported version."
       (insert string)
       (setq case-fold-search t)
 
+      (let ((inhibit-read-only t))
+	(remove-text-properties (point-min) (point-max)
+				'(read-only t)))
+
       ;; Remove license-to-kill stuff
       ;; The caller marks some stuff for killing, stuff that has been
       ;; used to create the page title, for example.

+ 6 - 4
lisp/org-latex.el

@@ -560,8 +560,9 @@ when PUB-DIR is set, use this as the publishing directory."
 
   (message "Exporting to LaTeX...")
   (org-unmodified
-   (remove-text-properties (point-min) (point-max)
-			   '(:org-license-to-kill nil)))
+   (let ((inhibit-read-only t))
+     (remove-text-properties (point-min) (point-max)
+			     '(:org-license-to-kill nil))))
   (org-update-radio-target-regexp)
   (org-export-latex-set-initial-vars ext-plist arg)
   (run-hooks 'org-export-latex-after-initial-vars-hook)
@@ -1129,8 +1130,9 @@ If END is non-nil, it is the end of the region."
 	    :timestamps (plist-get opt-plist :timestamps)
 	    :footnotes (plist-get opt-plist :footnotes)))
 	(org-unmodified
-	 (add-text-properties pt (max pt (1- end))
-			      '(:org-license-to-kill t)))))))
+	 (let ((inhibit-read-only t))
+	   (add-text-properties pt (max pt (1- end))
+				'(:org-license-to-kill t))))))))
 
 (defvar org-export-latex-header-defs nil
   "The header definitions that might be used in the LaTeX body.")