Subject: bug#76216: 29.4; display-buffer-reuse-mode-window does not respect dedicated flag

From: martin rudalics <[email-masked]>
Date: Wed, 12 Feb 2025 16:37:05 +0100

>> 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.

martin