all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Changing the behavior of display-buffer in next-error-no-select
@ 2024-05-03 15:33 Richard Sent
  2024-05-14  6:41 ` Juri Linkov
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Sent @ 2024-05-03 15:33 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Emacs,

When cycling through, say, a rgrep result buffer with n
(next-error-no-select) and p (previous-error-no-select), file results
are displayed in every open window, with the exception of the window
containing the rgrep results themselves.

I'd rather have file results remain in just one window so that I can use
other buffers while still viewing search results. Is this possible?

I see that next-error-no-select contains
display-buffer-overriding-action, so I suspect the answer might be
advising next-error-no-select and let-binding
display-buffer-overriding-action, but actually working that out is a bit
difficult.

How would I go about this? Are there any better options?

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Changing the behavior of display-buffer in next-error-no-select
  2024-05-03 15:33 Changing the behavior of display-buffer in next-error-no-select Richard Sent
@ 2024-05-14  6:41 ` Juri Linkov
  0 siblings, 0 replies; 2+ messages in thread
From: Juri Linkov @ 2024-05-14  6:41 UTC (permalink / raw)
  To: Richard Sent; +Cc: help-gnu-emacs

> When cycling through, say, a rgrep result buffer with n
> (next-error-no-select) and p (previous-error-no-select), file results
> are displayed in every open window, with the exception of the window
> containing the rgrep results themselves.
>
> I'd rather have file results remain in just one window so that I can use
> other buffers while still viewing search results. Is this possible?
>
> I see that next-error-no-select contains
> display-buffer-overriding-action, so I suspect the answer might be
> advising next-error-no-select and let-binding
> display-buffer-overriding-action, but actually working that out is a bit
> difficult.
>
> How would I go about this? Are there any better options?

The problem is that the first thing that
'display-buffer-use-some-window' tries to do
is to find the least recently used window
with 'display-buffer--lru-window'.

I think this behavior should be customizable with a new option,
so that you could prefer always to use
the most recently used window.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-14  6:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-03 15:33 Changing the behavior of display-buffer in next-error-no-select Richard Sent
2024-05-14  6:41 ` Juri Linkov

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.