From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74246: [PATCH] Reuse display windows in image-dired Date: Tue, 10 Dec 2024 16:55:32 +0100 Message-ID: <24d8f9ec-788b-4bff-a67f-ccfbca1da725@gmx.at> References: <86a5dqm9gl.fsf@gnu.org> <06f264c8-b1a1-4a7f-8fe9-1ca58b2343ff@gmx.at> <87jzcn1af7.fsf@mail.linkov.net> <08f46ed1-e489-4859-8a25-ba7dc4262b95@gmx.at> <87y1108u9k.fsf@mail.linkov.net> <87ldwyil8q.fsf@mail.linkov.net> <3a5afa37-0ea1-4183-a563-ecc3067818c2@gmx.at> <871pypb43g.fsf@mail.linkov.net> <8cd0088f-1beb-4871-a06c-17f8cfb23e29@gmx.at> <87plm8addt.fsf@mail.linkov.net> <90c5f5d6-37f3-41a6-be7c-903e6d0359ac@gmx.at> <87ikrzjrj1.fsf@mail.linkov.net> <87cyi6f2gb.fsf@mail.linkov.net> <6689d418-d028-40b8-b3d2-4ff12fe4283a@gmx.at> <87ed2jwhm5.fsf@mail.linkov.net> <7a548d2f-144b-45e3-9558-8908a2a4a86b@gmx.at> <875xnsll9k.fsf@mail.linkov.net> Reply-To: martin rudalics Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7884"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Morgan Smith , Eli Zaretskii , 74246@debbugs.gnu.org, stefankangas@gmail.com To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 10 16:56:12 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tL2aq-0001uK-CS for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Dec 2024 16:56:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tL2aj-0006vL-MB; Tue, 10 Dec 2024 10:56:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tL2ag-0006vD-4V for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2024 10:56:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tL2af-0003Om-Rh for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2024 10:56:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=s1k6FvFnnjm7WDmYF5afEMbh6FfV53Ka2ezN7CNhm4I=; b=V9Sv+/xOMwIDUFI11zaJ4RFImSrYsIX4z3gSTlDgBr4vM2kjq2R0GC41Z3sul1CWVZXU0NNQNTAubiot7zcWOhqiX1a4GTSwrolHZcoG05UMw2cF71piAL81EIrL8r7wv054sFYuqBHEAWb0NAX2wa2Y/mIExMUv2xpip1jSmO+JS8SYAehCrfHFp/tBvTf89WBbAk3X7r7giXVUNJUdQ4xIHHzO/N9ycGc3b1P7HcGO+Pc4OqkMTQwIVUU8D0bmcdEJn++cBqi5JHOII4V1RNI9rJKkQPzbE4nEz/GcZi4a+EZs5T9V6Nik2IDayxAMem5PwfzgybZOpIN+NUsOdQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tL2af-0000Ra-NI for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2024 10:56:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Dec 2024 15:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74246 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74246-submit@debbugs.gnu.org id=B74246.17338461461661 (code B ref 74246); Tue, 10 Dec 2024 15:56:01 +0000 Original-Received: (at 74246) by debbugs.gnu.org; 10 Dec 2024 15:55:46 +0000 Original-Received: from localhost ([127.0.0.1]:59179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tL2aQ-0000Qj-9W for submit@debbugs.gnu.org; Tue, 10 Dec 2024 10:55:46 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:56833) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tL2aO-0000QI-1m for 74246@debbugs.gnu.org; Tue, 10 Dec 2024 10:55:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1733846133; x=1734450933; i=rudalics@gmx.at; bh=s1k6FvFnnjm7WDmYF5afEMbh6FfV53Ka2ezN7CNhm4I=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=QGp+lJxVC1H+gSU7op1cMiNl72GbtVCvBFSvodBJtN3lsi30lDual/a/zhKBkBeK /BB/QYsK1rOqggWxkUtzXu+pz7y4YGDQjXWvaUhjfJ767VgeHAVKOgo9yD79gBCyB SdOZ7twEC6ZX9l2WYWSdHtkArpfGhYiSFhAHYXwmYVJ54+HXFgaL0wUA4/SPBuPOg Wq5POzxkubxlS7yGtD8NFfqaYn9mU4ber+uMTMVH8i39pdDE7aHlCBgcACN3iK1MM RjeKDfWNbafqyV66bocBD7vomUIg9COx2crQk7eI3aS8VkHt5c8IIO731AAjklywt Bifx4Hpl+QNLyrHrlQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([212.95.5.34]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N7i8Y-1thdvb01C6-00ynQS; Tue, 10 Dec 2024 16:55:33 +0100 Content-Language: en-US In-Reply-To: <875xnsll9k.fsf@mail.linkov.net> X-Provags-ID: V03:K1:7RO2AG9JyAsq0L+S0uUQTxlNNEiWmHkNb9CdPSRwUbVjv6UHbnX t79B+82/NulzEyCFCbxyjxtervghzl/ZvVn4gYqvtReUX7Ju18MluyQx4o2L0TuC+eVjCen RdL1+if0/8QGep2x9OofP7ymw4moLMHt5POckycatcwMoiTXJ354PWygv3EpNs53z7/KSDY zy1X18TuwmcFoANl6GliQ== UI-OutboundReport: notjunk:1;M01:P0:5m2FkdkYsqw=;oNAq4tS8Lby/GN0dYTV38WnXyjS L4RHuRqvd1w7H3eLXXK35gB2S8EsIk/cmHjtsT/LAm0km2VTXTvxLCMBPgOjUGlX6Htcheelv 512FwIS4dB7+wf19AhERKb1GIsvemSCk32cjeeHyfhbcp/UzixcpMX4ygiCGYJxFBVEvpQjm3 bZCeQksYou3aBjcv6VUdUbAgcKkrmv6xIVOnBnadfAh0WFwYbCJXie0O2YPNXzE2MKFb1DZo1 4ppCGxe9PLPaW2Hod0C0CUCWBkkR7dhvGOWukKJGsKUfixve1NQJYnHo/5dtbVcJq7k7IE0k6 j+y6jFj1bw3n0XG6Ti+L99zBSxBJPLP4qJcM/uSKLlE5wcZPMbhuKHCf+M179X2JRUm0Fm7i7 vRr/eviILOp5b4ykEqLj7wujIJRqOeYnqB4viuD9QZzKJURpUukGpVD6CZO/8vZT4wR3kW6Is Wso8boH6nCzEyyITl8NbcuIdMCJnd+dSYsp87SVKmWfXMYL34vkwWphScmvGF7KhkjCnuvmeE 80pYvdWpoc9uYV3Wbrxw/Mjf5llMmVuUq66Yprond6GuoFv67V2Xac5+AIKViBORGIMqSbR02 +n7IMDZDcd18xgmE9Ryzm+3gjr8QpOkJpmXyvumkMHrO8jqfBdcFgd3HY68ZORIzi7YQ19FG5 /NnTyBKvgQNb0rqr2JZPOFJc41orRD9SlIm9Dq5EBkU3ubC4+uQsIQPyVjXRrIS/M/ISkZbS9 6Jj8+fJs1HRUsP4d1+7EP/04oaGT6oKSnP3RHa8nl6TYea3taelk7yvOVUGJwpARQR2QeLzN X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296763 Archived-At: > What would be the safest approach to detect the same 'display-buffer' call? > A category? As I already mentioned: The calling function would have to reserve a separate alist entry for it. In my initial proposal I had even a separate argument for that purpose. Alternatively, one could reserve a local variable in the target buffer for that purpose ('display-buffer' would have to reset it). >> Unless a user has customized it or 'display-buffer-below-selected' fails >> for some reason. > > Then displaying it by some-window in the same window instead of lru > looks as a nice thing to do. Would you like that? I think displaying *backtrace* in the same window is always a bad idea. >> As I said above this is not reliable. The only reliable thing is to >> pass the symbol of the function calling 'display-buffer' with some >> unique number identifying the nth call of 'display-buffer' within that >> function. Everything else is guesswork. > > There is already such a symbol: 'category'. But this one is already handled by 'buffer-match-p'. We can't set it willy-nilly to some arbitrary value. Otherwise, that function might match it in an unexpected way. >> If a user issues the command to display an image in a window that >> already shows an image and insists on using another window, an arbitrary >> other window can be chosen. Users who want that just get the usual >> chaotic behavior lru provides. They asked for it. > > The users might want to switch displaying to another window, > and continue displaying other images in the same other window. Yes. But then either of the windows could be chosen by the next call (if that window still exists). >> With 'image-dired' it can be set in the image buffer because that buffer >> is always the same. > > This is an exception, not a general rule such as for navigating > grep/xref results. I see no reason for image-dired be different > from grep/xref. 'image-dired' _is_ different because it always uses the same buffer for showing images stored in different files. I know of no other function doing that. Do you? martin