[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'di
From: |
martin rudalics |
Subject: |
Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action' |
Date: |
Fri, 31 Dec 2021 20:40:20 +0100 |
>> That's an exaggeration. You can always work around this problem via
>> 'display-buffer-alist'.
>
> Are you saying that by manipulating `display-buffer-alist' I can stop
> `pop-to-buffer' from using the same window?!
Yes.
> How?
(add-to-list 'display-buffer-alist
'("\\*shell\\*" nil (inhibit-same-window . t)))
(pop-to-buffer-same-window "*shell*")
Have you ever read sections 29.15.5 and 29.15.6 of the Elisp manual?
These contain numerous examples of how to add the 'inhibit-same-window'
action alist entry to do precisely that.
>> But we cannot simply convert everything that used
>> 'switch-to-buffer' once (or still uses it) to use 'pop-to-buffer'
>> instead.
>
> That's okay, we can leave `switch-to-buffer' alone.
Then we have to leave 'pop-to-buffer-same-window' alone too.
'pop-to-buffer-same-window' is the customizable version of
'switch-to-buffer'.
>> The greatest problem the 'display-buffer-alist' functionality had to
>> deal with was to leave the default behavior unchanged while adding
>> enough facilities so users could change the behavior to their like.
>
> IIUC, using `pop-to-buffer' for *shell* and adding something like
>
> (("*shell*" (display-buffer-reuse-window)))
>
> to `display-buffer-alist' is equivalent to using
> `pop-to-buffer-same-window' on *shell*.
There is no such equivalence. Think of 'pop-to-buffer' as a proposal.
It's what the writer of an application considers the best choice for
fulfilling its customers' needs. 'display-buffer-alist' is the user's
answer for dealing with that proposal.
>> Deciding is not sufficient. Users have to customize it and you should
>> have now noticed by yourself that dealing with 'display-buffer-alist' is
>> not entirely trivial.
>
> Understatement of the year.
Every second specification I write fails initially.
> This is why I want us to use it instead of `pop-to-buffer-*' - to give
> users a good starting example to modify.
We can add that to the manual - as soon as we think it's good enough.
martin
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', (continued)
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Juri Linkov, 2021/12/30
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', martin rudalics, 2021/12/30
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Sam Steingold, 2021/12/31
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', martin rudalics, 2021/12/31
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Sam Steingold, 2021/12/31
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', martin rudalics, 2021/12/31
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Sam Steingold, 2021/12/31
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action',
martin rudalics <=
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Dmitry Gutov, 2021/12/30
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', martin rudalics, 2021/12/30
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Lars Ingebrigtsen, 2021/12/31
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', martin rudalics, 2021/12/31
Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Sam Steingold, 2021/12/29
Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Glenn Morris, 2021/12/29