[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#70819: 29.3; clone-indirect-buffer-other-window is inconsistent with
From: |
Stefan Monnier |
Subject: |
bug#70819: 29.3; clone-indirect-buffer-other-window is inconsistent with *-other-window commands |
Date: |
Sun, 12 May 2024 22:26:28 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>> (defun my-clone-indirect-buffer-other-window (newname display-flag &optional
>> norecord)
>> "Like `clone-indirect-buffer' but display in another window."
>> (interactive
>> (progn
>> (if (get major-mode 'no-clone-indirect)
>> (error "Cannot indirectly clone a buffer in %s mode" mode-name))
>> (list (if current-prefix-arg
>> (read-buffer "Name of indirect buffer: " (current-buffer)))
>> t)))
>> (switch-to-buffer-other-window
>> (clone-indirect-buffer newname display-flag norecord)))
`switch-to-buffer-other-window` sounds good, but we need to get rid of
`display-flag` (it makes no sense to call
`clone-indirect-buffer-other-window` with a nil value for
`display-flag` and `clone-indirect-buffer-other-window` should not call
`clone-indirect-buffer` with a non-nil `display-flag` because it wants
to be in charge of displaying the buffer).
Stefan
bug#70819: [PATCH v2] Make clone-indirect-buffer-other-window use other window (bug#70819), Richard Sent, 2024/05/27