unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Constantine Vetoshev <gepardcv@gmail.com>
To: Juri Linkov <juri@linkov.net>,
	Trust me I am a Doctor <pillule@riseup.net>
Cc: 49069@debbugs.gnu.org
Subject: bug#49069: 28.0.50; [PATCH] Use display-buffer for re-builder
Date: Thu, 8 Jul 2021 11:38:41 -0700	[thread overview]
Message-ID: <a00181a3-ce6b-42d2-b5c9-a968cfed02ca@Spark> (raw)
In-Reply-To: <87mtqw6cg8.fsf@riseup.net>

[-- Attachment #1: Type: text/plain, Size: 3467 bytes --]

Thank you for bringing this to my attention. I’ll test the display-buffer-base-action approach over the next couple of days, and if it works as I expect, I’ll update the Perspective README.

Note that Juri’s example is not quite the same as mine. Please test with this instead:

(customize-set-variable 'display-buffer-base-action
 '((display-buffer-reuse-window display-buffer-same-window)
 (reusable-frames . t)))

That said: it seems to me that rebinding display-buffer-overriding-action is intended for this very purpose: a judicious, rarely-used, and highly-targeted change to display-buffer behavior where it is imperative for the user’s customizations to not have an undesirable effect.
On Jul 8, 2021, 08:40 -0700, Trust me I am a Doctor <pillule@riseup.net>, wrote:
>
> 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.
> --

[-- Attachment #2: Type: text/html, Size: 4283 bytes --]

      parent reply	other threads:[~2021-07-08 18:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17  1:16 bug#49069: 28.0.50; [PATCH] Use display-buffer for re-builder pillule
2021-06-17  4:10 ` pillule
2021-06-17 14:50   ` pillule
2021-06-29 15:51     ` Trust me I am a Doctor
2021-06-29 20:47       ` Juri Linkov
2021-06-29 21:50         ` Trust me I am a Doctor
2021-06-30 19:49           ` Juri Linkov
2021-07-08 15:18             ` Trust me I am a Doctor
2021-07-08 17:40               ` Juri Linkov
2021-07-08 21:12                 ` Trust me I am a Doctor
     [not found]                   ` <87bl7c5wgl.fsf@riseup.net>
     [not found]                     ` <7355eaf3-5ae2-46e7-80f5-d3d23ffff7d8@Spark>
2021-07-09  9:00                       ` bug#49069: Fwd: " Trust me I am a Doctor
2021-07-08 18:38               ` Constantine Vetoshev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a00181a3-ce6b-42d2-b5c9-a968cfed02ca@Spark \
    --to=gepardcv@gmail.com \
    --cc=49069@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=pillule@riseup.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).