"Jacob S. Gordon" <[email protected]> writes: > Patch #2: While fixing #1 I noticed that ‘org-indirect-buffer-display’ > is unconditionally let-bound to ‘other-window’ in > ‘org-agenda-do-context-action’, ignoring the user choice. I traced > this back to ‘db5478108’ and [this bug], and confirmed that it’s still > fixed. This patch removes it, but I could also imagine people wanting > to have different behaviour when following vs. calling > ‘tree-to-indirect-buffer’ directly.
The reason I added that let-binding, is to preserve existing behavior. Without let-binding, that patch would risk more breaking changes. The let-binding also makes sure that the window behavior is the same regardless of the value of `org-agenda-follow-indirect'. If you want to avoid that let-binding, having a dedicated customization would make more sense. > + (save-restriction > + (when (or (< pos (point-min)) > + (> pos (point-max))) > + (widen)) > + (goto-char pos) > + (org-tree-to-indirect-buffer arg))))) Nitpick: (unless (<= (point-min) pos (point-max)) ...) would be more compact. -- 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>
