lisp/org-colview.el: Fix computing summary with low-level first child

* lisp/org-colview.el (org-columns--compute-spec): Do not assume that
all the children of an entry have the same LAST-LEVEL.  Handle
situation when the first child has lower level:

* Heading
****** Child 1
** Child 2
** Child 3

Reported-by: Uwe Brauer <oub@mat.ucm.es>
Link: https://orgmode.org/list/87wn8yj2i5.fsf@localhost
This commit is contained in:
Ihor Radchenko 2024-01-29 16:09:29 +01:00
parent d2df9624ce
commit ac1ed2bf85
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 3 additions and 3 deletions

View File

@ -1253,9 +1253,9 @@ properties drawers."
;; property `org-summaries', in alist whose key is SPEC. ;; property `org-summaries', in alist whose key is SPEC.
(let* ((summary (let* ((summary
(and summarize (and summarize
(let ((values (append (and (/= last-level inminlevel) (let ((values
(aref lvals last-level)) (cl-loop for l from (1+ level) to lmax
(aref lvals inminlevel)))) append (aref lvals l))))
(and values (funcall summarize values printf)))))) (and values (funcall summarize values printf))))))
;; Leaf values are not summaries: do not mark them. ;; Leaf values are not summaries: do not mark them.
(when summary (when summary