Subject: bug#70819: [PATCH] Make clone-indirect-buffer-other-window use other window

From: martin rudalics <[email-masked]>
Date: Mon, 13 May 2024 10:05:52 +0200

> -(defun clone-indirect-buffer-other-window (newname display-flag &optional norecord)
 > +(defun clone-indirect-buffer-other-window (newname &optional norecord)
 >     "Like `clone-indirect-buffer' but display in another window."
 >     (interactive
 >      (progn
 > @@ -10658,8 +10658,8 @@ Returns the newly created indirect buffer."
 >        (list (if current-prefix-arg
 >   	       (read-buffer "Name of indirect buffer: " (current-buffer)))
 >   	   t)))
 > -  (let ((pop-up-windows t))
 > -    (clone-indirect-buffer newname display-flag norecord)))
 > +  (switch-to-buffer-other-window
 > +   (clone-indirect-buffer newname nil norecord)))

I see two problems:

(1) 'clone-indirect-buffer-other-window' would still have to obey the
     DISPLAY_FLAG argument.  Some application may rely on the fact that
     'clone-indirect-buffer-other-window' doesn't display the buffer if
     it is nil.

(2) 'switch-to-buffer-other-window' does not get passed the NORECORD
     argument.

martin