diff --git a/contrib/lisp/org-export.el b/contrib/lisp/org-export.el index c5cbaaaea..24dc35bf5 100644 --- a/contrib/lisp/org-export.el +++ b/contrib/lisp/org-export.el @@ -138,6 +138,7 @@ (:with-entities nil "e" org-export-with-entities) (:with-fixed-width nil ":" org-export-with-fixed-width) (:with-footnotes nil "f" org-export-with-footnotes) + (:with-inlinetasks nil "inline" org-export-with-inlinetasks) (:with-plannings nil "p" org-export-with-planning) (:with-priority nil "pri" org-export-with-priority) (:with-special-strings nil "-" org-export-with-special-strings) @@ -405,9 +406,7 @@ e.g. \"f:nil\"." (defcustom org-export-headline-levels 3 "The last level which is still exported as a headline. -Inferior levels will produce itemize lists when exported. Note -that a numeric prefix argument to an exporter function overrides -this setting. +Inferior levels will produce itemize lists when exported. This option can also be set with the #+OPTIONS line, e.g. \"H:2\"." :group 'org-export-general @@ -444,6 +443,13 @@ e.g. \"e:nil\"." :group 'org-export-general :type 'boolean) +(defcustom org-export-with-inlinetasks t + "Non-nil means inlinetasks should be exported. +This option can also be set with the #+OPTIONS line, +e.g. \"inline:nil\"." + :group 'org-export-general + :type 'boolean) + (defcustom org-export-with-planning nil "Non-nil means include planning info in export. This option can also be set with the #+OPTIONS: line, @@ -453,9 +459,6 @@ e.g. \"p:t\"." (defcustom org-export-with-priority nil "Non-nil means include priority cookies in export. - -When nil, remove priority cookies for export. - This option can also be set with the #+OPTIONS line, e.g. \"pri:t\"." :group 'org-export-general @@ -1814,6 +1817,8 @@ tag." (and (memq with-tasks '(todo done)) (not (eq todo-type with-tasks))) (and (consp with-tasks) (not (member todo with-tasks)))))))) + ;; Check inlinetask. + (inlinetask (not (plist-get options :with-inlinetasks))) ;; Check timestamp. (timestamp (case (plist-get options :with-timestamps) diff --git a/testing/lisp/test-org-export.el b/testing/lisp/test-org-export.el index 3b372f964..56b351e06 100644 --- a/testing/lisp/test-org-export.el +++ b/testing/lisp/test-org-export.el @@ -65,14 +65,14 @@ already filled in `info'." (equal (org-export--parse-option-keyword "H:1 num:t \\n:t timestamp:t arch:t author:t creator:t d:t email:t - *:t e:t ::t f:t pri:t -:t ^:t toc:t |:t tags:t tasks:t <:t todo:t") + *:t e:t ::t f:t pri:t -:t ^:t toc:t |:t tags:t tasks:t <:t todo:t inline:nil") '(:headline-levels 1 :preserve-breaks t :section-numbers t :time-stamp-file t :with-archived-trees t :with-author t :with-creator t :with-drawers t :with-email t :with-emphasize t :with-entities t :with-fixed-width t - :with-footnotes t :with-priority t :with-special-strings t - :with-sub-superscript t :with-toc t :with-tables t :with-tags t - :with-tasks t :with-timestamps t :with-todo-keywords t))) + :with-footnotes t :with-inlinetasks nil :with-priority t + :with-special-strings t :with-sub-superscript t :with-toc t :with-tables t + :with-tags t :with-tasks t :with-timestamps t :with-todo-keywords t))) ;; Test some special values. (should (equal @@ -265,7 +265,24 @@ Paragraph" "CLOSED: [2012-04-29 sun. 10:45]\n")) (should (equal (org-export-as 'test nil nil nil '(:with-plannings nil)) - "")))))) + ""))))) + ;; Inlinetasks. + (when (featurep 'org-inlinetask) + (should + (equal + (let ((org-inlinetask-min-level 15)) + (org-test-with-temp-text "*************** Task" + (org-test-with-backend test + (org-export-as 'test nil nil nil '(:with-inlinetasks nil))))) + "")) + (should + (equal + (let ((org-inlinetask-min-level 15)) + (org-test-with-temp-text + "*************** Task\nContents\n*************** END" + (org-test-with-backend test + (org-export-as 'test nil nil nil '(:with-inlinetasks nil))))) + "")))) (ert-deftest test-org-export/comment-tree () "Test if export process ignores commented trees."