[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67993: Selecting buffer automatically
From: |
martin rudalics |
Subject: |
bug#67993: Selecting buffer automatically |
Date: |
Mon, 15 Jan 2024 11:23:14 +0100 |
User-agent: |
Mozilla Thunderbird |
> However, the name 'select-window' would be too confusing for users
> because based on such name they will expect that it will select
> the window immediately after it's displayed.
>
> Therefore I propose to rename it to the less ambiguous name
> 'post-command-select-window'. Of course it should be documented in
> any case, but this will help the users who never read the documentation.
That's better.
> Ok, here is a complete patch with the documentation:
+ `post-command-select-window' -- A non-nil value means that after the
+ current command is executed and the hook `post-command-hook' is called,
+ the window displayed by this function will be selected. A nil value
+ means that if functions like `pop-to-buffer' selected another window,
+ at the end of this command that window will be deselected, and the
+ window that was selected before calling this function will remain
+ selected.
I'd say "will be usually selected" and "will be usually deselected".
For example, (post-command-select-window . nil) will effectively select
the window that was selected before 'display-buffer' was called,
regardless of which other window were selected after the
'display-buffer'. Think of
(progn
(select-window x)
(pop-to-buffer ... '(post-command-select-window . nil))
(select-window y))
which will select x overriding the call to select y. Or think of two
'display-buffer' calls within one and the same command.
martin
- bug#67993: Selecting buffer automatically, (continued)
- 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, 2024/01/10
- 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 <=
- 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