[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67993: Selecting buffer automatically
From: |
Juri Linkov |
Subject: |
bug#67993: Selecting buffer automatically |
Date: |
Wed, 10 Jan 2024 19:12:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
>>> That's why any such 'select-window' call (or its avoidance) you
>>> propose would be better handled within 'display-buffer' and not later
>>> in a 'post-command-hook'.
>>
>> No way to call 'select-window' immediately, because this will
>> break too many functions that expect a window to be selected
>> from the previous call of pop-to-buffer until the command
>> is finished.
>
> Do you mean that if I have two 'pop-to-buffer' calls within one and the
> same command, the first one has a (select-window . nil) entry and the
> second one no such entry, then the entry from the first call will cause
> the window from the second call to get deselected? If so, then this
> deserves a special explanation in the manual.
This is what I see with the current patch:
1.
(let ((display-buffer-alist '(("1" nil (select-window . nil)))))
(delete-other-windows) (split-window) (split-window) (balance-windows)
(pop-to-buffer (get-buffer-create "1"))
(pop-to-buffer (get-buffer-create "2")))
then the original window remains selected.
2.
(let ((display-buffer-alist '(("2" nil (select-window . nil)))))
(delete-other-windows) (split-window) (split-window) (balance-windows)
(pop-to-buffer (get-buffer-create "1"))
(pop-to-buffer (get-buffer-create "2")))
then the window with "1" is selected after the command finishes.
- bug#67993: Selecting buffer automatically, Juri Linkov, 2024/01/04
- bug#67993: Selecting buffer automatically, martin rudalics, 2024/01/05
- bug#67993: Selecting buffer automatically, Juri Linkov, 2024/01/06
- bug#67993: Selecting buffer automatically, martin rudalics, 2024/01/07
- bug#67993: Selecting buffer automatically, Juri Linkov, 2024/01/07
- bug#67993: Selecting buffer automatically, martin rudalics, 2024/01/08
- bug#67993: Selecting buffer automatically, Juri Linkov, 2024/01/09
- bug#67993: Selecting buffer automatically, martin rudalics, 2024/01/10
- bug#67993: Selecting buffer automatically,
Juri Linkov <=
- bug#67993: Selecting buffer automatically, martin rudalics, 2024/01/11
- bug#67993: Selecting buffer automatically, Juri Linkov, 2024/01/12
- bug#67993: Selecting buffer automatically, martin rudalics, 2024/01/13
- bug#67993: Selecting buffer automatically, Juri Linkov, 2024/01/14
- bug#67993: Selecting buffer automatically, martin rudalics, 2024/01/15
- bug#67993: Selecting buffer automatically, Juri Linkov, 2024/01/15
- bug#67993: Selecting buffer automatically, martin rudalics, 2024/01/16
- bug#67993: Selecting buffer automatically, Juri Linkov, 2024/01/16