فهرست منبع

Export: Do not remove drawers in protected examples.

Export used to remove drawers in examples.  This is fixed now.
Carsten Dominik 16 سال پیش
والد
کامیت
c5a596bee7
2فایلهای تغییر یافته به همراه6 افزوده شده و 3 حذف شده
  1. 3 0
      lisp/ChangeLog
  2. 3 3
      lisp/org-exp.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-01-29  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-exp.el (org-export-remove-or-extract-drawers): Only remove
+	drawers that are unprotected.
+
 	* org.el (org-toggle-ordered-property): New function.
 	(org-mode-map): Add a key for `org-toggle-ordered-property'.
 	(org-org-menu): Add menu entries for TODO dependencies.

+ 3 - 3
lisp/org-exp.el

@@ -1767,7 +1767,8 @@ whose content to keep."
 		       "\\|")
 		      "\\):[ \t]*\n\\([^@]*?\n\\)?[ \t]*:END:[ \t]*\n")))
       (while (re-search-forward re nil t)
-	(replace-match "")))))
+	(org-if-unprotected
+	 (replace-match ""))))))
 
 (defun org-export-handle-export-tags (select-tags exclude-tags)
   "Modify the buffer, honoring SELECT-TAGS and EXCLUDE-TAGS.
@@ -2618,7 +2619,6 @@ underlined headlines.  The default is 3."
 		 "\n"))
 	 thetoc have-headings first-heading-pos
 	 table-open table-buffer link desc)
-
     (let ((inhibit-read-only t))
       (org-unmodified
        (remove-text-properties (point-min) (point-max)
@@ -2776,7 +2776,7 @@ underlined headlines.  The default is 3."
 	(if (string-match "\\\\\\\\[ \t]*$" line)
 	    (setq line (replace-match "" t t line)))
 	(if (and org-export-with-fixed-width
-		 (string-match "^\\([ \t]*\\)\\(:\\)" line))
+		 (string-match "^\\([ \t]*\\)\\(:\\( \\|$\\)\\)" line))
 	    (setq line (replace-match "\\1" nil nil line)))
 	(insert line "\n"))))