Subject: bug#74246: [PATCH] Reuse display windows in image-dired

From: martin rudalics <[email-masked]>
Date: Wed, 4 Dec 2024 08:59:59 +0100

> Here is how I do this in the snippet I posted 3 days ago:
 >
 > (setq display-buffer-base-action
 >        '(nil . ((some-window
 >                  . (lambda (_buffer alist)
 >                      (let ((last-window (buffer-local-value
 >                                          'display-buffer-last-window
 >                                          (window-buffer))))

This would imply that

- the window showing the buffer from where to read the value of
   'display-buffer-last-window' must be selected at the time
   'display-buffer' is called,

- as a rule, 'display-buffer' cannot set the buffer-local value of
   'display-buffer-last-window' in the window it uses for showing the
   buffer.

Both implications seem harmful to me.

martin