unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: martin rudalics <rudalics@gmx.at>
Cc: Morgan Smith <Morgan.J.Smith@outlook.com>,
	Eli Zaretskii <eliz@gnu.org>,
	74246@debbugs.gnu.org, stefankangas@gmail.com
Subject: bug#74246: [PATCH] Reuse display windows in image-dired
Date: Mon, 02 Dec 2024 09:42:45 +0200	[thread overview]
Message-ID: <87ldwyil8q.fsf@mail.linkov.net> (raw)
In-Reply-To: <a36e24d6-91c9-407b-b961-5f0b8683600e@gmx.at> (martin rudalics's message of "Sun, 1 Dec 2024 09:46:18 +0100")

>> I agree with the need to set the window parameter always.
>> For example, I often use commands that override the default action
>> with e.g. windmove-display-up/down, etc.  Therefore needed
>> to add an advice that remembers the last window in the
>> buffer-local variable:
>>
>> (defvar-local display-buffer-last-window nil)
>
> Let's define it via DEFVAR_PER_BUFFER in buffer.c and have
> 'window--display-buffer' always set it.
> 'display-buffer-use-some-window' then could use it either by default or
> if it finds a 'some-window' entry whose cdr is nil or t or whatever we
> want.
>
>> However, I still like your proposal to use a category instead of lru,
>> that could be used here later as well.
>
> With 'image-dired' 'display-buffer-last-window' wouldn't help.  But
> 'image-dired' could define a mode-local variable, say
> 'image-dired-last-window', and propose that as 'some-window'.  We could
> make 'some-window-method' accept a live window for that purpose.

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.





  reply	other threads:[~2024-12-02  7:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07 20:19 bug#74246: [PATCH] Reuse display windows in image-dired Morgan Smith
2024-11-09 11:37 ` Eli Zaretskii
2024-11-09 17:36   ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-23 12:16     ` Eli Zaretskii
2024-11-28  0:32       ` Morgan Smith
2024-11-28  9:28         ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-28 18:27           ` Juri Linkov
2024-11-29 15:53             ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-30 18:03               ` Juri Linkov
2024-12-01  8:46                 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-02  7:42                   ` Juri Linkov [this message]
2024-12-02 11:22                     ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-03  7:47                       ` Juri Linkov
2024-12-03  8:25                         ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-03 17:24                           ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ldwyil8q.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=74246@debbugs.gnu.org \
    --cc=Morgan.J.Smith@outlook.com \
    --cc=eliz@gnu.org \
    --cc=rudalics@gmx.at \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).