Slawomir Grochowski <[email protected]> writes:
> I would be grateful for feedback, particularly on whether this is the
> right way to represent and reuse the scope.
Two comments.
> (org-columns--prepare-rows, org-columns--compute-spec): Use the recorded
> scope.
The docstring of org-columns--prepare-rows says
(defun org-columns--prepare-rows (global columns-format)
"Set up column view and return rows for the current scope.
When GLOBAL is non-nil, use the whole buffer as the scope. Otherwise,
But GLOBAL will no longer use the whole buffer.
> + ;; Compute summaries separately for each top-level tree when viewing
> + ;; the whole document.
> (should
> (equal
> - '("1" "1")
> + '(("H1" . "1")
> + ("S1" . "1")
> + ("H2" . "2")
> + ("S2" . "2"))
> (org-test-with-temp-text
> - "Top\n* H1\n** <point>H2\n:PROPERTIES:\n:A: 1\n:END:"
> - (let ((org-columns-default-format "%A{+}")) (org-columns t))
> + "* H1
> +** S1
> +:PROPERTIES:
> +:A: 1
> +:END:
> +* H2
> +** S2
> +:PROPERTIES:
> +:A: 2
> +:END:"
> + (let ((org-columns-default-format "%A{+}"))
> + (org-columns t))
> (org-map-entries
> - (lambda () (get-char-property (point) 'org-columns-value)))))))
> + (lambda ()
> + (cons (org-get-heading t t t t)
> + (get-char-property (point) 'org-columns-value))))))))
Why did you remove the existing test case?
--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>