[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: |
Tue, 4 Jan 2022 11:26:45 +0100 |
> Or to add more semantics:
>
> (pop-to-buffer "*shell*" '(nil . ((caller . comint))))
IIRC I once used the term 'label' for it. It vanished soon.
>> which means that customizing 'display-buffer-alist' with that value on
>> Emacs 28 will report a mismatch but that's the only mishap that should
>> happen.
>>
>> We also could have 'display-buffer-assq-regexp' do
>>
>> (when (or (and (stringp key)
>> (string-match-p key buffer-name))
>> (and (functionp key)
>> (funcall key buffer-name action))
>> (and (symbolp key)
>> (cadr (assq key (cdr action)))))
>
> That will shorten the above example to
>
> (customize-set-variable
> 'display-buffer-alist
> '((comint
> display-buffer-same-window (nil))))
>
> ?
Yes. Although we should be careful with the symbol. 'shell' would be
interpreted as a function to call via (funcall key buffer-name action).
We could wrap that in a 'condition-case' but what if the function has
some nasty side-effect before it errs out? So maybe *comint* or
something similar ...
>> so we could do away with 'display-buffer-match-comint' but then we would
>> have to change the custom type of 'display-buffer-alist' - no great deal
>> either. WDYT?
>
> The obvious downside is the need to tag hundreds of existing calls of
> display-buffer, pop-to-buffer, etc.
Just the ones we care about. With our usual speed of progress in this
area I won't live long enough to see that happen. Think of pearls like
(select-window ; to return to
(prog1 (selected-window) ; WoMan window
(select-window (display-buffer (current-buffer)))
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', martin rudalics, 2022/01/02
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Juri Linkov, 2022/01/02
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', martin rudalics, 2022/01/02
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Dmitry Gutov, 2022/01/02
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Juri Linkov, 2022/01/03
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', martin rudalics, 2022/01/03
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Stefan Monnier, 2022/01/03
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', martin rudalics, 2022/01/04
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Stefan Monnier, 2022/01/04
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Juri Linkov, 2022/01/03
- 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', martin rudalics, 2022/01/06
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Juri Linkov, 2022/01/06
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', martin rudalics, 2022/01/07
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Sam Steingold, 2022/01/07
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Eli Zaretskii, 2022/01/07
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Sam Steingold, 2022/01/07
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Juri Linkov, 2022/01/11
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', martin rudalics, 2022/01/11
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', Juri Linkov, 2022/01/11
- Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action', martin rudalics, 2022/01/12