Subject: Re: bug#76216: 29.4; display-buffer-reuse-mode-window does not respect dedicated flag
From: Eli Zaretskii <[email-masked]>
To: martin rudalics <[email-masked]>
Cc: [email-masked], [email-masked], [email-masked], [email-masked]
Date: Sat, 01 Mar 2025 14:02:46 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Wed, 12 Feb 2025 16:37:05 +0100
> Cc: [email-masked], Nicolas Richard <[email-masked]>,
>  [email-masked]
> From: martin rudalics <[email-masked]>
> 
>  >> Hey, all.  Per the subject line, I noticed that this display action
>  >> function isn't respecting when I mark a window dedicated to its buffer.
>  >>
>  >> Here's a minimal example you can step through in the scratch buffer:
>  >>
>  >> ```
>  >> (setq *w* (split-window-horizontally)
>  >>        *one* (get-buffer-create "one")
>  >>        *two* (get-buffer-create "two"))
>  >>
>  >> (display-buffer-use-some-window *one* '((inhibit-same-window . t)))
>  >> ;;; should see "one" appear in the *w* window
>  >>
>  >> (set-window-dedicated-p *w* t)
>  >> (display-buffer-use-some-window *two* '((inhibit-same-window . t)))
>  >> ;;; should not see any changes, the function returns nil
>  >> (display-buffer-reuse-mode-window *two* '((inhibit-same-window . t)))
>  >> ;;; bug -- should see "two" appear in the *w* window
>  >> ```
>  >>
>  >> I think this is a bug in -reuse-mode-window, and so I've attached a
>  >> patch that would fix the issue.  Though maybe I'm wrong?  Is
>  >> this intended behavior?
>  >
>  > Adding Martin to the discussion.
> 
> I think both approaches can be considered valid but would favor Trevor's
> variant.  In either case we should document the resulting behavior.
> 
> Adding both addresses of Nicolas Richard, maybe he still is somewhere.

Thanks, I've now installed Trevor's change on the master branch, and
I'm therefore closing this bug.