GNU bug report logs -
#74246
[PATCH] Reuse display windows in image-dired
Previous Next
Full log
Message #41 received at 74246 <at> debbugs.gnu.org (full text, mbox):
>> Please explain why 'display-buffer-last-window' wouldn't help
>> for 'image-dired'? IIUC, 'image-dired' uses one source buffer
>> that could use the buffer-local variable to remember the last
>> window it used to display an image buffer.
>
> Hmm... Currently 'image-dired-display-image' does
>
> (let ((buf (get-buffer image-dired-display-image-buffer))
> (cur-win (selected-window)))
> (when buf
> (kill-buffer buf))
> (when-let ((buf (find-file-noselect file nil t)))
> (pop-to-buffer buf)
> (rename-buffer image-dired-display-image-buffer)
>
> so it kills that buffer and its local variables are gone.
It kills the target buffer, not the source buffer?
The idea was to set a buffer-local variable in the source buffer.
> Otherwise, you're right. The question is now whether
>
> - 'display-buffer-use-some-window' should use the buffer-local value of
> 'display-buffer-last-window' autonomously, or
>
> - get it via a (some-window . display-buffer-last-window) alist entry.
>
> And obviously whether 'display-buffer' should set the value of
> 'display-buffer-last-window' itself or leave that to the caller.
>
> Maybe something like (some-window . t) could be used to incite
> 'display-buffer-use-some-window' to go for the buffer-local value of
> that variable and 'window--display-buffer' to set it.
Or some more meaningful value e.g. (some-window . reuse)
This bug report was last modified 182 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.