From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#35385: 27.0.50; Make dired-dwim-target aware of other frames Date: Tue, 17 Sep 2019 00:39:13 +0300 Message-ID: <877e67x6ny.fsf@mail.linkov.net> References: <87k1fl3e6z.fsf@tcd.ie> <87zhj4osjw.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="11162"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: "Basil L. Contovounesios" , 35385@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 16 23:43:44 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i9ymd-0002lq-SH for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Sep 2019 23:43:44 +0200 Original-Received: from localhost ([::1]:40242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9ymc-0008Nk-St for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Sep 2019 17:43:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35450) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9ym1-0008NT-MW for bug-gnu-emacs@gnu.org; Mon, 16 Sep 2019 17:43:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9ylz-0001Dx-8T for bug-gnu-emacs@gnu.org; Mon, 16 Sep 2019 17:43:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42405) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i9yly-0001DC-JN for bug-gnu-emacs@gnu.org; Mon, 16 Sep 2019 17:43:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i9yly-0006gC-Fg for bug-gnu-emacs@gnu.org; Mon, 16 Sep 2019 17:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Sep 2019 21:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35385 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35385-submit@debbugs.gnu.org id=B35385.156867016725653 (code B ref 35385); Mon, 16 Sep 2019 21:43:02 +0000 Original-Received: (at 35385) by debbugs.gnu.org; 16 Sep 2019 21:42:47 +0000 Original-Received: from localhost ([127.0.0.1]:51226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9ylj-0006fh-GE for submit@debbugs.gnu.org; Mon, 16 Sep 2019 17:42:47 -0400 Original-Received: from caracal.birch.relay.mailchannels.net ([23.83.209.30]:5726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9ylh-0006fY-9i for 35385@debbugs.gnu.org; Mon, 16 Sep 2019 17:42:46 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 0BCEF1A167F; Mon, 16 Sep 2019 21:42:44 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a42.g.dreamhost.com (100-96-114-48.trex.outbound.svc.cluster.local [100.96.114.48]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 8D84A1A1639; Mon, 16 Sep 2019 21:42:43 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a42.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.5); Mon, 16 Sep 2019 21:42:43 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Continue-Celery: 1b92ab5b2dd9ab71_1568670163790_1389132481 X-MC-Loop-Signature: 1568670163789:712087148 X-MC-Ingress-Time: 1568670163789 Original-Received: from pdx1-sub0-mail-a42.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a42.g.dreamhost.com (Postfix) with ESMTP id 50CD583A07; Mon, 16 Sep 2019 14:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=WTrltQ3XtH3qEorMJi6i8414ig8=; b= 1SDOkdVOcWuUp8JCFtf/EijcwsnZnx+uQV4+GUjZyG6kARK6Q1t8AT8L7//+0lJN dxDLY//sKiFrlYZ2KmYpRawECLStgnYNzaC0/HuXUERGXDn7nCPrUeuFZBma6xUJ JgFlPY88yL0CmvsQN0+TOTPIcwM6V6VTXhm1uOjulnY= Original-Received: from mail.jurta.org (m91-129-107-243.cust.tele2.ee [91.129.107.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a42.g.dreamhost.com (Postfix) with ESMTPSA id 22893839F8; Mon, 16 Sep 2019 14:42:35 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a42 In-Reply-To: <87zhj4osjw.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 16 Sep 2019 23:11:15 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrudeggddtvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeefnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdegfedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehlrghrshhisehgnhhushdrohhrghenucevlhhushhtvghrufhiiigvpedt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:166592 Archived-At: >>> Currently, the user option dired-dwim-target applies only to windows >>> displaying Dired buffers on the selected frame. IWBNI this were >>> customisable, so that Dired buffers displayed on other frames were also >>> considered as default targets for file operations. This would be useful >>> for users like me who enable pop-up-frames. >>> >>> Patch implementing this to follow. >> >> This makes sense to me, and the code in the patch looked OK. But what >> did you think of Juri's comments about dired-dwim-target-windows? > > That was 12 weeks ago. Basil, have you had an opportunity to look at > this? I'd like to elaborate on my comments: the thought was that instead of extending the scope of the search for the first random Dired window from the selected frame to all frames, would it be better to improve the heuristic of finding the window that the user really meant to use (remember that the user option name contains the word "DWIM"). The proposed heuristic was to use `get-mru-window' to get the most recently used window from all frames, and even better way is to traverse all windows ordered by their visiting recency on all frames to find the window with Dired mode buffer.