`org-agenda-tree-to-indirect-buffer' does not respect the
`org-indirect-buffer-display' value of 'current-window unless invoked with a prefix arg.

The function does respect all other values for
`org-indirect-buffer-display'. And it does respect the value
'current-window when the function is called with a prefix arg.
However, without prefix arg, 'current-window and 'other-window are treated the same and call to `split-window' is made.

Modifying the initial lines of `org-agenda-tree-to-indirect-buffer':

  (if current-prefix-arg
      (org-agenda-do-tree-to-indirect-buffer arg)

to be:

  (if (or current-prefix-arg
          (eq org-indirect-buffer-display 'current-window))
      (org-agenda-do-tree-to-indirect-buffer arg)

produces the behavior I would expect. This may or may not be the ideal fix, but it seems viable and simple.

Org mode version 9.6.29
GNU Emacs 29.3

- Jeff


Reply via email to