"Jacob S. Gordon" <[email protected]> writes:

> On 2026-06-07 09:05, Ihor Radchenko wrote:
>> 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.
>
> Alright, I’ll leave it be then. Perhaps it should be stated somewhere
> that ‘org-indirect-buffer-display’ is ignored when following in
> agendas.

Well. Its docstring says

    This applies to indirect buffers created with the commands
    org-tree-to-indirect-buffer and org-agenda-tree-to-indirect-buffer.

and says nothing about org-agenda-do-context-action.

>>> +   (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.
>
> Done in v2.

I am looking at this again and wondering if a simple
org-with-wide-buffer would be more robust.
POS may be within narrowing, the containing heading could still be
outside.

-- 
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>

Reply via email to