branch: externals/org
commit 03fbbd498f7d2d63b4614cce21186254fe030e4a
Author: Slawomir Grochowski <[email protected]>
Commit: Slawomir Grochowski <[email protected]>
org-colview: Stop consulting undefined inline task max level
* lisp/org-colview.el (org-columns--compute-spec): Use the hard-coded
deepest level directly instead of checking the undefined
`org-inlinetask-max-level'. Remove the unused
`org-inlinetask-min-level' declaration.
* testing/lisp/test-org-colview.el (test-org-colview/columns-update):
Test an inline task deeper than `org-inlinetask-min-level'.
`org-inlinetask-min-level' is the minimum level where inline tasks start,
not the deepest inline task level. `org-inlinetask-max-level' is not
defined by Org, so the previous code always fell back to the hard-coded
deepest level in normal Org setups.
---
lisp/org-colview.el | 5 +----
testing/lisp/test-org-colview.el | 34 +++++++++++++++++++---------------
2 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 75ce3daa07..d9d1c50472 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -56,7 +56,6 @@
(defvar org-agenda-columns-compute-summary-properties)
(defvar org-agenda-columns-show-summaries)
(defvar org-agenda-view-columns-initially)
-(defvar org-inlinetask-min-level)
(defvar org-columns-summary-types-default) ; defined below
@@ -1430,9 +1429,7 @@ surrounding whitespace, which is not significant in
property values."
SPEC is a column format specification. When optional argument
UPDATE-PROPERTY-P is non-nil, summarized values can replace
existing ones in properties drawers."
- (let* ((deepest-level (if (bound-and-true-p org-inlinetask-max-level)
- org-inlinetask-max-level
- 29)) ;Hard-code deepest level.
+ (let* ((deepest-level 29) ;Hard-code deepest level.
(values-by-level (make-vector (1+ deepest-level) nil))
(level 0)
(previous-level deepest-level)
diff --git a/testing/lisp/test-org-colview.el b/testing/lisp/test-org-colview.el
index 7e0c4dd978..01152a19f4 100644
--- a/testing/lisp/test-org-colview.el
+++ b/testing/lisp/test-org-colview.el
@@ -1250,30 +1250,34 @@
https://list.orgmode.org/[email protected]/T/#u."
(insert "very long ")
(org-columns-update "A")
(get-char-property (point-min) 'display))))
- ;; Values obtained from inline tasks are at the same level as those
- ;; obtained from children of the current node.
+ ;; Values obtained from inline tasks at the minimum inline task level
+ ;; or deeper are at the same level as those obtained from children of
+ ;; the current node.
(when (featurep 'org-inlinetask)
- (should
- (equal
- "2"
- (org-test-with-temp-text
- "* H
-*************** Inline task
+ (dolist (stars '("***************" "****************"))
+ (should
+ (equal
+ "2"
+ (org-test-with-temp-text
+ (format "* H
+%s Inline task
:PROPERTIES:
:A: 2
:END:
-*************** END
+%s END
** Children
:PROPERTIES:
:A: 3
:END:
"
- (let ((org-columns-default-format "%A{min}")
- (org-columns-ellipses "..")
- (org-inlinetask-min-level 15))
- (org-element-update-syntax)
- (org-columns))
- (get-char-property (point-min) 'org-columns-value)))))
+ stars
+ stars)
+ (let ((org-columns-default-format "%A{min}")
+ (org-columns-ellipses "..")
+ (org-inlinetask-min-level 15))
+ (org-element-update-syntax)
+ (org-columns))
+ (get-char-property (point-min) 'org-columns-value))))))
;; Handle `org-columns-modify-value-for-display-function', even with
;; multiple titles for the same property.
(should