bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#49069: 28.0.50; [PATCH] Use display-buffer for re-builder


From: Trust me I am a Doctor
Subject: bug#49069: 28.0.50; [PATCH] Use display-buffer for re-builder
Date: Thu, 08 Jul 2021 17:18:33 +0200

Juri Linkov <juri@linkov.net> writes:

>>> Sorry, preventing the users from customizing windows is the wrong thing.
>>
>> I don't know really, let me explain my rational : some users have a very
>> constrained display-buffer-alist and match ".*". You can see such
>> rational explained at the end of this page :
>>
>> https://github.com/nex3/perspective-el
>
> Thanks for the reference.  Now I understand the reason for such absurdity
> in org-mode:
>
>   (defmacro org-no-popups (&rest body)
>     "Suppress popup windows and evaluate BODY."
>     `(let (pop-up-frames display-buffer-alist)
>        ,@body))
>
> So different packages are fighting with each other:
> one package recommends using display-buffer-alist to display
> all buffers only in the same window, another package
> throws away user customization on such grounds
> that users might follow such poor recommendations.

To be fair, blaming the different repositories gives no evidence that
this macro is a reaction to perspective.el

I CC its maintainer,
Hi Constantine Vetoshev,
While we was discussing window configurations, I introduced the
recommendations of your README that I used to follow in a particular
situation; in regard of the remarks of Juri, you maybe want to update
them?

> The correct way to display all buffers in the same window
> is documented in (info "(emacs) Window Choice") where
> display-buffer-base-action should be customized like this:
>
>   (customize-set-variable
>    'display-buffer-base-action
>    '((display-buffer-reuse-window display-buffer-same-window)))
>
> And the problem is solved.  So please avoid ignoring user customization
> with display-buffer-overriding-action because users with such
> display-buffer-base-action will be able to customize "*RE-Builder*" with
> display-buffer-alist.

Ok you convinced me. Thanks for the tip, I installed it on a low-vision
setup of a knowledge of me. We will see more in detail the differences
that it implies.

So it seems that the patch of the Thu, 17 Jun 2021 16:50:07 +0200
was indeed the one we want to keep.

I tested it again, with :

(customize-set-variable
 'display-buffer-base-action
 '((display-buffer-reuse-window display-buffer-same-window)))

(setf (alist-get "*RE-Builder*" display-buffer-alist nil nil #'string=)
      `((display-buffer-in-direction)
        (direction . top)
        (dedicated . t)))

(re-builder)

And it obeys to display-buffer-alist, be it for an other
function or others parameters, and keep being functional ... etc.
--





reply via email to

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