Slawomir Grochowski <[email protected]> writes: >> (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. > > GLOBAL still covers the entire accessible buffer (from `point-min` to > `point-max`). `org-columns` does not widen narrowed buffers, so in a > narrowed buffer the scope spans the accessible portion. > > To make the architecture cleaner and avoid ambiguity, I refactored > `org-columns--prepare-rows` to not take `global` at all. Establishing > the scope is now handled solely by `org-columns-goto-top-level` at the > entry points (`org-columns` and `org-columns--capture-view`), and > `org-columns--prepare-rows` strictly operates on that already recorded > scope.
> -(defun org-columns-goto-top-level () > +(defun org-columns-goto-top-level (&optional global) > "Move to the beginning of the column view area. > -Also sets `org-columns-top-level-marker' to the new position." > +Also set `org-columns-top-level-marker' and > +`org-columns--scope-end-marker' to the scope boundaries. When > +optional argument GLOBAL is non-nil, use the accessible portion of > +the buffer." Now, I find the function name misleading. Previously, it moved to the beginning "top level" and stored the point position as side effect. Now, it does more, which is surprising if one just looks at the function name. Also, the docstring is not very clear. What does "use the accessible portion of the buffer" mean? It is not obvious that it implies ignoring current subtree. -- 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>
