From 94ef5242e72a39faa9eb14a705387ccad339be14 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 24 May 2026 14:36:43 -0500 Subject: fix(org-export): remove contradictory org-export-with-tasks default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit org-export-config.el set org-export-with-tasks twice in a row — first to ("TODO"), then to nil. The final value won (export no tasks), but the stale first assignment and its "export with tasks by default" comment contradicted it, so the intended policy was ambiguous on a read. Removed the leftover ("TODO") line. nil is the deliberate default: it is the value that was already winning, its comment matches, and it sits with the adjacent "export without tags / section numbers by default" settings. Added a smoke test that fires the deferred ox :config and pins org-export-with-tasks to nil so a future flip is caught. --- modules/org-export-config.el | 1 - tests/test-org-export-config-task-default.el | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 tests/test-org-export-config-task-default.el diff --git a/modules/org-export-config.el b/modules/org-export-config.el index 688d8f99..0cf0af15 100644 --- a/modules/org-export-config.el +++ b/modules/org-export-config.el @@ -46,7 +46,6 @@ (setq org-export-headline-levels 6) ;; export headlines 6 levels deep (setq org-export-with-section-numbers nil) ;; export without section numbers by default (setq org-export-with-tags nil) ;; export without tags by default - (setq org-export-with-tasks '("TODO")) ;; export with tasks by default (setq org-export-with-tasks nil) ;; export WITHOUT tasks by default (setq org-export-with-toc t) ;; export WITH table of contents by default (setq org-export-initial-scope 'buffer) ;; 'subtree is your other choice diff --git a/tests/test-org-export-config-task-default.el b/tests/test-org-export-config-task-default.el new file mode 100644 index 00000000..850249c9 --- /dev/null +++ b/tests/test-org-export-config-task-default.el @@ -0,0 +1,22 @@ +;;; test-org-export-config-task-default.el --- Org export task-default test -*- lexical-binding: t; -*- + +;;; Commentary: +;; org-export-config.el used to set `org-export-with-tasks' twice in a row +;; ('("TODO") then nil), leaving the final behavior ("export no tasks") +;; contradicted by the adjacent comment. Requiring the module then ox fires +;; the deferred :config in batch, so this test pins the single intended +;; default: tasks are not exported. + +;;; Code: + +(require 'ert) +(require 'org) +(require 'org-export-config) +(require 'ox) + +(ert-deftest test-org-export-config-tasks-default-is-nil () + "Normal: after ox config loads, tasks are excluded from export by default." + (should (null org-export-with-tasks))) + +(provide 'test-org-export-config-task-default) +;;; test-org-export-config-task-default.el ends here -- cgit v1.2.3