emacs-devel
[Top][All Lists]
Advanced

[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: Sun, 2 Jan 2022 19:40:45 +0100

> This is how we can make customization simpler, helping to get the old behavior
> back for a set of commands.  Currently there are 11 comint commands that
> have invocations like:
>
>    (pop-to-buffer "*inferior-lisp*" display-comint-buffer-action)
>    (pop-to-buffer "*scheme*" display-comint-buffer-action)
>    ...

IIUC 'shell' still has (pop-to-buffer buffer), 'sh-show-shell' has
(pop-to-buffer (process-buffer (sh-shell-process t))).  Shouldn't these
become part of the same scheme?

> To change their behavior at once the user needs to construct
> a complex regexp that matches all used comint buffer names,
>
>    "\\*inferior-lisp\\*\\|\\*scheme\\*\\|..."
>
> This is completely unmanageable.

*eshell*<1>, *eshell*<2> ... come to mind.

> Instead of this, all calls could add
> a special tag:
>
>    (pop-to-buffer "*inferior-lisp*" '(nil (comint . t)))
>
> Then a condition predicate could check for this tag:
>
>    (defun display-buffer-comint (buffer-name action)
>      (assq 'comint action))
>
> and the user can customize all comint commands with:
>
>    (add-to-list 'display-buffer-alist
>                 '(display-buffer-comint
>                   (display-buffer-same-window
>                    . ((reusable-frames . 0)
>                       (inhibit-same-window . nil)))))

If we do that we should first make a list of possible tags like 'occur'
or 'info' and check whether we should provide similar functions for them
too.

Yet the problem remains how to easily get back the old behavior for
individual 'display-buffer'-based calls we decided to change.

martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]