From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Nov 2014 19:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 19170@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.141685710617498 (code B ref -1); Mon, 24 Nov 2014 19:26:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Nov 2014 19:25:06 +0000 Received: from localhost ([127.0.0.1]:44253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XszFy-0004Y8-5f for submit@debbugs.gnu.org; Mon, 24 Nov 2014 14:25:06 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39082) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XszFw-0004XP-GJ for submit@debbugs.gnu.org; Mon, 24 Nov 2014 14:25:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XszFg-0006pJ-V4 for submit@debbugs.gnu.org; Mon, 24 Nov 2014 14:24:59 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XszFg-0006pB-Sh for submit@debbugs.gnu.org; Mon, 24 Nov 2014 14:24:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XszFY-0007PJ-3A for bug-gnu-emacs@gnu.org; Mon, 24 Nov 2014 14:24:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XszFO-0006jt-43 for bug-gnu-emacs@gnu.org; Mon, 24 Nov 2014 14:24:40 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:28170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XszFN-0006jk-UB for bug-gnu-emacs@gnu.org; Mon, 24 Nov 2014 14:24:30 -0500 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sAOJOS8I027941 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 24 Nov 2014 19:24:29 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAOJOQeP006384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 24 Nov 2014 19:24:27 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAOJOQuf004092 for ; Mon, 24 Nov 2014 19:24:26 GMT MIME-Version: 1.0 Message-ID: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> Date: Mon, 24 Nov 2014 11:24:26 -0800 (PST) From: Drew Adams X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Provide support for `compare-windows' to compare two windows in different frames. Ediff lets you compare buffers in different frames. It would be great if `compare-windows' did also. Yes, this would require users to choose the windows, instead of just using the selected window and the next window. This could be optional. Or it could be solicited by, e.g., using a particular prefix arg value. E.g., with a non-negative prefix arg, do what the presence of any prefix arg does now. With a non-positive prefix arg, prompt the user to choose the 2 windows. (So a zero prefix arg would do both.) Choosing a window could take any reasonable form: click mouse-1 in it, choose by its buffer name (with uniquification when multiple windows show the same buffer),... Successive calls (with no prefix arg) should, as now, keep using the same two windows. (None of the current behavior should be lost, in particular, behavior per `compare-windows-sync'.) In GNU Emacs 25.0.50.1 (i686-pc-mingw32) of 2014-10-20 on LEG570 Bzr revision: 118168 rgm@gnu.org-20141020195941-icp42t8ttcnud09g Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --enable-checking=3Dyes,glyphs CPPFLAGS=3D-DGLYPH_DEBUG=3D1' From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Nov 2014 22:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.141686846718806 (code B ref 19170); Mon, 24 Nov 2014 22:35:02 +0000 Received: (at 19170) by debbugs.gnu.org; 24 Nov 2014 22:34:27 +0000 Received: from localhost ([127.0.0.1]:44349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xt2DD-0004tG-6O for submit@debbugs.gnu.org; Mon, 24 Nov 2014 17:34:27 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:34212) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xt2DA-0004t6-Tr for 19170@debbugs.gnu.org; Mon, 24 Nov 2014 17:34:25 -0500 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sAOMYLiL000778 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 24 Nov 2014 22:34:22 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAOMYKRP017038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 24 Nov 2014 22:34:20 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id sAOMYJ6i012557; Mon, 24 Nov 2014 22:34:19 GMT MIME-Version: 1.0 Message-ID: <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> Date: Mon, 24 Nov 2014 14:34:18 -0800 (PST) From: Drew Adams References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> In-Reply-To: <87egss9r7v.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > (None of the current behavior should be lost, in particular, > > behavior per `compare-windows-sync'.) >=20 > Thanks for the bug report. The patch below fixes it in > `compare-windows-sync' to use the same frame-selecting logic > like existed for a long time in `compare-windows': Thanks, that does indeed seem to take care of the sync behavior, for `compare-windows-sync-default-function', at least. The main reason for the bug report, however, is the inability to choose the two windows, especially when they are in different frames. Cycling via `other-window' is limited when you have multiple frames (each possibly with multiple windows). It is even somewhat limited in the typical case of two windows in the same frame. From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Nov 2014 23:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.141687019423907 (code B ref 19170); Mon, 24 Nov 2014 23:04:02 +0000 Received: (at 19170) by debbugs.gnu.org; 24 Nov 2014 23:03:14 +0000 Received: from localhost ([127.0.0.1]:44352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xt2f3-0006DU-IR for submit@debbugs.gnu.org; Mon, 24 Nov 2014 18:03:14 -0500 Received: from ps18281.dreamhost.com ([69.163.222.226]:57001 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xt1z8-0004CE-AX for 19170@debbugs.gnu.org; Mon, 24 Nov 2014 17:19:54 -0500 Received: from localhost.linkov.net (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id E5F23348328E6C; Mon, 24 Nov 2014 14:19:53 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> Date: Tue, 25 Nov 2014 00:19:32 +0200 In-Reply-To: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> (Drew Adams's message of "Mon, 24 Nov 2014 11:24:26 -0800 (PST)") Message-ID: <87egss9r7v.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Mon, 24 Nov 2014 18:03:12 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > (None of the current behavior should be lost, in particular, behavior > per `compare-windows-sync'.) Thanks for the bug report. The patch below fixes it in `compare-windows-sync' to use the same frame-selecting logic like existed for a long time in `compare-windows': diff --git a/lisp/vc/compare-w.el b/lisp/vc/compare-w.el index 25d4cf7..26f8be4 100644 --- a/lisp/vc/compare-w.el +++ b/lisp/vc/compare-w.el @@ -304,6 +304,9 @@ on third call it again advances points to the next difference and so on." (if (not compare-windows-sync-point) (let* ((w1 (selected-window)) (w2 (next-window w1)) + (w2 (if (eq w2 (selected-window)) + (next-window (selected-window) nil 'visible) + w2)) (b2 (window-buffer w2)) (point-max2 (with-current-buffer b2 (point-max))) (op2 (window-point w2)) From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Nov 2014 00:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.14168744153960 (code B ref 19170); Tue, 25 Nov 2014 00:14:02 +0000 Received: (at 19170) by debbugs.gnu.org; 25 Nov 2014 00:13:35 +0000 Received: from localhost ([127.0.0.1]:44385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xt3l9-00011o-9K for submit@debbugs.gnu.org; Mon, 24 Nov 2014 19:13:35 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:38560) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xt3l7-00011L-0x for 19170@debbugs.gnu.org; Mon, 24 Nov 2014 19:13:33 -0500 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sAP0DPNX000977 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 25 Nov 2014 00:13:26 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAP0DOdX008186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 25 Nov 2014 00:13:25 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAP0DOU8003960; Tue, 25 Nov 2014 00:13:24 GMT MIME-Version: 1.0 Message-ID: Date: Mon, 24 Nov 2014 16:13:23 -0800 (PST) From: Drew Adams References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> In-Reply-To: <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) BTW, while you're at it, you might also want to remove the unused variable `w1' from `compare-windows'. Not important, but it's useless. From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Nov 2014 00:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.14168759528722 (code B ref 19170); Tue, 25 Nov 2014 00:40:01 +0000 Received: (at 19170) by debbugs.gnu.org; 25 Nov 2014 00:39:12 +0000 Received: from localhost ([127.0.0.1]:44413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xt49w-0002Gc-Fh for submit@debbugs.gnu.org; Mon, 24 Nov 2014 19:39:12 -0500 Received: from ps18281.dreamhost.com ([69.163.222.226]:58827 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xt49t-0002GJ-Vq for 19170@debbugs.gnu.org; Mon, 24 Nov 2014 19:39:10 -0500 Received: from localhost.linkov.net (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 3ACD7348328E73; Mon, 24 Nov 2014 16:39:07 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> Date: Tue, 25 Nov 2014 02:37:03 +0200 In-Reply-To: <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> (Drew Adams's message of "Mon, 24 Nov 2014 14:34:18 -0800 (PST)") Message-ID: <87egss86a8.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > The main reason for the bug report, however, is the inability > to choose the two windows, especially when they are in different > frames. Cycling via `other-window' is limited when you have > multiple frames (each possibly with multiple windows). It is > even somewhat limited in the typical case of two windows in the > same frame. Ediff-windows is session-based, whereas compare-windows is stateless. It would be a major inconvenience to select a window to compare before every invocation of compare-windows. Although I'm aware of this problem in the single frame with three windows, at least the rule of selecting a window is simple, so it's easy to arrange windows in the previous-next order for comparison. From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Nov 2014 04:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.141688857113859 (code B ref 19170); Tue, 25 Nov 2014 04:10:02 +0000 Received: (at 19170) by debbugs.gnu.org; 25 Nov 2014 04:09:31 +0000 Received: from localhost ([127.0.0.1]:44445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xt7RT-0003bR-BU for submit@debbugs.gnu.org; Mon, 24 Nov 2014 23:09:31 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:30641) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xt7RQ-0003bF-2E for 19170@debbugs.gnu.org; Mon, 24 Nov 2014 23:09:28 -0500 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sAP49Oui030032 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 25 Nov 2014 04:09:25 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAP49NV7013486 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 25 Nov 2014 04:09:24 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAP49Ne5013476; Tue, 25 Nov 2014 04:09:23 GMT MIME-Version: 1.0 Message-ID: Date: Mon, 24 Nov 2014 20:09:22 -0800 (PST) From: Drew Adams References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> In-Reply-To: <87egss86a8.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > The main reason for the bug report, however, is the inability > > to choose the two windows, especially when they are in different > > frames. Cycling via `other-window' is limited when you have > > multiple frames (each possibly with multiple windows). It is > > even somewhat limited in the typical case of two windows in the > > same frame. >=20 > Ediff-windows is session-based, whereas compare-windows is > stateless. > It would be a major inconvenience to select a window to compare > before every invocation of compare-windows. I didn't say before every invocation of compare-windows, did I? I said that an optional behavior would be to choose the second window in some way. IOW, on user request (e.g., via non-positive prefix arg), a user would be able to choose the second window. How to choose? Click the mouse in a window, or choose a window by name using the keyboard - those are two possibilities I suggested. I can code something up as a POC, when I get a moment, if that helps. Yes, I realize that things are different for Ediff: `buffer-list' is ordered wrt access time, and there is no equivalent list for windows (AFAIK). For Ediff, you can just click two buffers with the mouse and they become the defaults, because of the time-ordering of `buffer-list'. (Ediff only needs the buffer, regardless of which window you click in that might be showing the same buffer.) > Although I'm aware > of this problem in the single frame with three windows, at least > the rule of selecting a window is simple, so it's easy to arrange > windows in the previous-next order for comparison. I guess I'm not aware of this. What is the "rule of selecting a window", so that I can get `compare-windows' to compare the selected window against any other window that I choose? From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Nov 2014 21:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.14169518256289 (code B ref 19170); Tue, 25 Nov 2014 21:44:01 +0000 Received: (at 19170) by debbugs.gnu.org; 25 Nov 2014 21:43:45 +0000 Received: from localhost ([127.0.0.1]:45300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtNtg-0001dM-M2 for submit@debbugs.gnu.org; Tue, 25 Nov 2014 16:43:44 -0500 Received: from ps18281.dreamhost.com ([69.163.222.226]:51011 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtNtc-0001dA-Jw for 19170@debbugs.gnu.org; Tue, 25 Nov 2014 16:43:41 -0500 Received: from localhost.linkov.net (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id E6135348328E6C; Tue, 25 Nov 2014 13:43:40 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> Date: Tue, 25 Nov 2014 23:39:50 +0200 In-Reply-To: (Drew Adams's message of "Mon, 24 Nov 2014 20:09:22 -0800 (PST)") Message-ID: <87egsr0xjt.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > How to choose? Click the mouse in a window, This is what `ediff-get-window-by-clicking' does. But what to do if the user doesn't use the mouse? > or choose a window by name using the keyboard - > those are two possibilities I suggested. You mean to choose a window by it's buffer name? I.e. like `ediff-buffers'? But the problem is that the uniqueness of buffer names is not guaranteed in this case. What do you think about such workflow: select a target window using normal keybindings or mouse clicks. Then mark the selected window as the target window using a new prefix of `compare-windows'. Then switch back to the original window using standard keybindings, and run `compare-windows'. It could use the remembered target window. From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Nov 2014 22:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.14169528328055 (code B ref 19170); Tue, 25 Nov 2014 22:01:02 +0000 Received: (at 19170) by debbugs.gnu.org; 25 Nov 2014 22:00:32 +0000 Received: from localhost ([127.0.0.1]:45310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtO9v-00025q-HD for submit@debbugs.gnu.org; Tue, 25 Nov 2014 17:00:31 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:18875) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtO9t-00025g-9i for 19170@debbugs.gnu.org; Tue, 25 Nov 2014 17:00:29 -0500 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sAPM0REm012097 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 25 Nov 2014 22:00:28 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAPM0QtH017896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 25 Nov 2014 22:00:27 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAPM0QSL013304; Tue, 25 Nov 2014 22:00:26 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 25 Nov 2014 14:00:25 -0800 (PST) From: Drew Adams References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> <87egsr0xjt.fsf@mail.linkov.net> In-Reply-To: <87egsr0xjt.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > How to choose? Click the mouse in a window, >=20 > This is what `ediff-get-window-by-clicking' does. Yes. > But what to do if the user doesn't use the mouse? See next. > > or choose a window by name using the keyboard - > > those are two possibilities I suggested. >=20 > You mean to choose a window by it's buffer name? > I.e. like `ediff-buffers'? But the problem is that the > uniqueness of buffer names is not guaranteed in this case. See what I wrote at the outset: Choosing a window could take any reasonable form: click mouse-1 in it, choose by its buffer name (with uniquification when multiple windows show the same buffer),... FWIW, I use this in Icicles. Maybe it helps to give an idea what I had in mind wrt window naming. If not, ignore. (defun icicle-make-window-alist (&optional all-p) "Return an alist of entries (WNAME . WINDOW), where WNAME names WINDOW. The name of the buffer in a window is used as its name, unless there is more than one window displaying the same buffer. In that case, WNAME includes a suffix [NUMBER], to make it a unique name. The NUMBER order among window names that differ only by their [NUMBER] is arbitrary. Argument ALL-P determines which frames to use when gathering windows, as follows: * `visible' - include windows from all visible frames. * otherwise non-nil - include windows from all frames (including those that are iconified and invisible). * nil - include only windows from the selected frame." (lexical-let ((win-alist ()) (count 2) wname new-name) (walk-windows (lambda (w) ; FREE here: COUNT, NEW-NAME, WIN-ALIST, WNAME. (setq wname (buffer-name (window-buffer w))) (if (not (assoc wname win-alist)) (push (cons wname w) win-alist) (setq new-name wname) (while (assoc new-name win-alist) (setq new-name (format "%s[%d]" wname count) count (1+ count))) (push (cons new-name w) win-alist)) (setq count 2)) 'no-mini (case all-p (visible 'visible) ((nil) 'this-frame) (otherwise t))) win-alist)) > What do you think about such workflow: select a target window > using normal keybindings or mouse clicks. Then mark the > selected window as the target window using a new prefix > of `compare-windows'. Then switch back to the original window > using standard keybindings, and run `compare-windows'. > It could use the remembered target window. Not sure I understand what you describe, but it sounds like you mean to just somehow select the other window (the one you want, not `other-window'), then move back to the original window, and have the fact that the other window was the previously selected window let it be used as the default second window for the comparison. If so, yes, that's what I was suggesting by comparison with Ediff. With buffers it is enough to select another buffer, to make it become recorded as the previous buffer, so it becomes the default. But that works because `buffer-list' records chronological access. AFAIK, we do not have that (yet) for windows. And yes, we need only record the previously selected window, not a whole access history (at least for this command). This would be for the click-in-another-window approach. But for keyboard use the problem really is, as I see it, that when there are many windows (this is across possibly many frames) the usual way to select one of them, which is to repeat `C-x o', is tedious. That's why I suggested choosing by name in this case. HTH. From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Nov 2014 23:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.141695635313920 (code B ref 19170); Tue, 25 Nov 2014 23:00:03 +0000 Received: (at 19170) by debbugs.gnu.org; 25 Nov 2014 22:59:13 +0000 Received: from localhost ([127.0.0.1]:45333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtP4i-0003cR-4S for submit@debbugs.gnu.org; Tue, 25 Nov 2014 17:59:12 -0500 Received: from ps18281.dreamhost.com ([69.163.222.226]:60684 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtP4f-0003cF-RA for 19170@debbugs.gnu.org; Tue, 25 Nov 2014 17:59:10 -0500 Received: from localhost.linkov.net (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 71531348328E6C; Tue, 25 Nov 2014 14:59:06 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> <87egsr0xjt.fsf@mail.linkov.net> Date: Wed, 26 Nov 2014 00:56:30 +0200 In-Reply-To: (Drew Adams's message of "Tue, 25 Nov 2014 14:00:25 -0800 (PST)") Message-ID: <87egsqzy74.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > And yes, we need only record the previously selected window, > not a whole access history (at least for this command). Below is the smallest patch that implements this feature. It refactors the next-window choosing logic into a separate function that you can redefine using define-advice if you want to define own logic. By default, it provides a special command `compare-windows-set-next-window' that you can bind to an own key and use to define the next window that `compare-windows' will use, then move back to the original window and execute `compare-windows' normally (with or without its current argument to ignore whitespace). diff --git a/lisp/vc/compare-w.el b/lisp/vc/compare-w.el index 25d4cf7..a8a0a17 100644 --- a/lisp/vc/compare-w.el +++ b/lisp/vc/compare-w.el @@ -140,6 +140,22 @@ out all highlighting later with the command `compare-windows-dehighlight'." (defvar compare-windows-overlays2 nil) (defvar compare-windows-sync-point nil) +(defvar compare-windows-next-window nil) + +(defun compare-windows-set-next-window () + (interactive) + (setq compare-windows-next-window (selected-window))) + +(defun compare-windows-get-next-window () + (let ((w2 (if (window-live-p compare-windows-next-window) + compare-windows-next-window + (next-window)))) + (if (eq w2 (selected-window)) + (setq w2 (next-window (selected-window) nil 'visible))) + (if (eq w2 (selected-window)) + (error "No other window")) + w2)) + ;;;###autoload (defun compare-windows (ignore-whitespace) "Compare text in current window with text in next window. @@ -179,11 +195,7 @@ on third call it again advances points to the next difference and so on." 'compare-windows-sync-regexp compare-windows-sync))) (setq p1 (point) b1 (current-buffer)) - (setq w2 (next-window)) - (if (eq w2 (selected-window)) - (setq w2 (next-window (selected-window) nil 'visible))) - (if (eq w2 (selected-window)) - (error "No other window")) + (setq w2 (compare-windows-get-next-window)) (setq p2 (window-point w2) b2 (window-buffer w2)) (setq opoint2 p2) @@ -303,7 +315,7 @@ on third call it again advances points to the next difference and so on." (defun compare-windows-sync-default-function () (if (not compare-windows-sync-point) (let* ((w1 (selected-window)) - (w2 (next-window w1)) + (w2 (compare-windows-get-next-window)) (b2 (window-buffer w2)) (point-max2 (with-current-buffer b2 (point-max))) (op2 (window-point w2)) From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Nov 2014 23:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.141695883218235 (code B ref 19170); Tue, 25 Nov 2014 23:41:02 +0000 Received: (at 19170) by debbugs.gnu.org; 25 Nov 2014 23:40:32 +0000 Received: from localhost ([127.0.0.1]:45337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtPih-0004k2-2q for submit@debbugs.gnu.org; Tue, 25 Nov 2014 18:40:31 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:21459) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtPib-0004jn-9y for 19170@debbugs.gnu.org; Tue, 25 Nov 2014 18:40:26 -0500 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sAPNeNiS011698 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 25 Nov 2014 23:40:24 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAPNeKjx011382 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 25 Nov 2014 23:40:22 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id sAPNeJ5c027644; Tue, 25 Nov 2014 23:40:20 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 25 Nov 2014 15:40:19 -0800 (PST) From: Drew Adams References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> <87egsr0xjt.fsf@mail.linkov.net> <87egsqzy74.fsf@mail.linkov.net> In-Reply-To: <87egsqzy74.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > Below is the smallest patch that implements this feature. > It refactors the next-window choosing logic into a separate > function that you can redefine using define-advice if you want > to define own logic. By default, it provides a special command > `compare-windows-set-next-window' that you can bind to an own key > and use to define the next window that `compare-windows' will use, > then move back to the original window and execute `compare-windows' > normally (with or without its current argument to ignore > whitespace). Thanks for working on this, Juri. I don't have the time to check it out well now, but a quick try says please go for it. Some things that I think are missing, or that might be helpful: 1. Maybe echo some indication of which two windows are compared (?). 2. Have a command that goes back and forth between the selected window and the previously selected one. E.g., make the window-selecting command swap the values, so that the previous window is always the other one. #2 will let you easily go between the two windows being compared, but you will also be able to use it more generally. IOW, whenever another window is selected, update the previous-window value. I guess maybe I'm specifying a different approach, where instead of using `compare-windows-get-next-window' we would use just (a) the selected window and (b) the previously selected window. (That would be the default behavior.) And every command (should it be limited to interactive only?) that selects a different window would automatically update the saved value of the last-used window (a variable). In sum, instead of having `compare-windows' be the one that gets the "next window" (per `compare-windows-get-next-window'), and instead of having command `compare-windows-set-next-window', `compare-window' would just use the last two windows selected (by default). The real change would be in having the "last window selected" be kept up to date automatically. If that were done always, and not just when you select a window interactively (dunno whether that is the right thing to do) then presumably it could be, for example, `select-window' that does it (updates a variable `last-window-selected'). I'm thinking that having that last-selected window recorded always might be a good thing, useful for more than just `compare-windows'. (And perhaps (?) the NORECORD arg of `select-window' should control updating of `last-window-selected' also. Dunno.) What do you think? Does this make sense? If not, please go with what you have; I'm sure it's an improvement on what is there now. Thx. From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Nov 2014 01:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.141705131512562 (code B ref 19170); Thu, 27 Nov 2014 01:22:02 +0000 Received: (at 19170) by debbugs.gnu.org; 27 Nov 2014 01:21:55 +0000 Received: from localhost ([127.0.0.1]:46746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtnmM-0003GX-M0 for submit@debbugs.gnu.org; Wed, 26 Nov 2014 20:21:54 -0500 Received: from ps18281.dreamhost.com ([69.163.222.226]:33645 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtnmK-0003GP-Ur for 19170@debbugs.gnu.org; Wed, 26 Nov 2014 20:21:53 -0500 Received: from localhost.linkov.net (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 5E50C348328E6E; Wed, 26 Nov 2014 17:21:53 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> <87egsr0xjt.fsf@mail.linkov.net> <87egsqzy74.fsf@mail.linkov.net> Date: Thu, 27 Nov 2014 02:57:31 +0200 In-Reply-To: (Drew Adams's message of "Tue, 25 Nov 2014 15:40:19 -0800 (PST)") Message-ID: <877fyhfno0.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > Some things that I think are missing, or that might be helpful: > > 1. Maybe echo some indication of which two windows are compared (?). Currently `compare-windows' displays in the echo area "Mark set" which is mostly useless. We could overwrite it with more specific messages, e.g. Next difference between window1 and window2 Next match between window1 and window2 No more matching points between window1 and window2 > I'm thinking that having that last-selected window recorded > always might be a good thing, useful for more than just > `compare-windows'. (And perhaps (?) the NORECORD arg of > `select-window' should control updating of `last-window-selected' > also. Dunno.) > > What do you think? Does this make sense? We already have a lot of `last-...' variables, so a new variable for the last selected window makes sense. Then it would be convenient to compare `(selected-window)' with `last-selected-window'. From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Nov 2014 03:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.141705832724095 (code B ref 19170); Thu, 27 Nov 2014 03:19:01 +0000 Received: (at 19170) by debbugs.gnu.org; 27 Nov 2014 03:18:47 +0000 Received: from localhost ([127.0.0.1]:46799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtpbS-0006GZ-JP for submit@debbugs.gnu.org; Wed, 26 Nov 2014 22:18:46 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:48533) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtpbP-0006GP-O4 for 19170@debbugs.gnu.org; Wed, 26 Nov 2014 22:18:44 -0500 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sAR3IggF014871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 Nov 2014 03:18:42 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAR3Ifp5014293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 27 Nov 2014 03:18:42 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id sAR3IecT029635; Thu, 27 Nov 2014 03:18:41 GMT MIME-Version: 1.0 Message-ID: <3dcedc6e-0613-4af5-a061-02395bc9a506@default> Date: Wed, 26 Nov 2014 19:18:39 -0800 (PST) From: Drew Adams References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> <87egsr0xjt.fsf@mail.linkov.net> <87egsqzy74.fsf@mail.linkov.net> <877fyhfno0.fsf@mail.linkov.net> In-Reply-To: <877fyhfno0.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > Some things that I think are missing, or that might be helpful: > > > > 1. Maybe echo some indication of which two windows are compared > > (?). >=20 > Currently `compare-windows' displays in the echo area "Mark set" > which is mostly useless. We could overwrite it with more specific > messages, e.g. >=20 > Next difference between window1 and window2 > Next match between window1 and window2 > No more matching points between window1 and window2 Please do. And maybe print the point values too, unless they're the same buffer? Different, A: 2349, B: 1358 Same: A: 2349, B: 1358 No match Dunno what the names might be. They could be the buffer names (possibly truncated, if long), if different. > > I'm thinking that having that last-selected window recorded > > always might be a good thing, useful for more than just > > `compare-windows'. (And perhaps (?) the NORECORD arg of > > `select-window' should control updating of `last-window-selected' > > also. Dunno.) > > > > What do you think? Does this make sense? >=20 > We already have a lot of `last-...' variables, so a new variable > for the last selected window makes sense. Then it would be > convenient to compare `(selected-window)' with `last-selected- > window'. Please do. I'm sure that whatever you come up with will be good. IMO, this will make the command much more useful. I've been using it for decades, but never gave much thought to trying to improve it. It is a very useful command. From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Nov 2014 00:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.141713616612717 (code B ref 19170); Fri, 28 Nov 2014 00:57:02 +0000 Received: (at 19170) by debbugs.gnu.org; 28 Nov 2014 00:56:06 +0000 Received: from localhost ([127.0.0.1]:47989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xu9qv-0003J3-Tl for submit@debbugs.gnu.org; Thu, 27 Nov 2014 19:56:06 -0500 Received: from ps18281.dreamhost.com ([69.163.222.226]:52991 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xu9qt-0003Is-4D for 19170@debbugs.gnu.org; Thu, 27 Nov 2014 19:56:03 -0500 Received: from localhost.linkov.net (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id B2D87348328E73; Thu, 27 Nov 2014 16:56:02 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> <87egsr0xjt.fsf@mail.linkov.net> <87egsqzy74.fsf@mail.linkov.net> <877fyhfno0.fsf@mail.linkov.net> <3dcedc6e-0613-4af5-a061-02395bc9a506@default> Date: Fri, 28 Nov 2014 02:54:32 +0200 In-Reply-To: <3dcedc6e-0613-4af5-a061-02395bc9a506@default> (Drew Adams's message of "Wed, 26 Nov 2014 19:18:39 -0800 (PST)") Message-ID: <87y4qw5elz.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > And maybe print the point values too, unless they're the same buffer? > > Different, A: 2349, B: 1358 > Same: A: 2349, B: 1358 > No match Or the size of the region of difference or sameness. > Dunno what the names might be. They could be the buffer names > (possibly truncated, if long), if different. There is no displayable information associated with windows other than buffer names. >> We already have a lot of `last-...' variables, so a new variable >> for the last selected window makes sense. Then it would be >> convenient to compare `(selected-window)' with `last-selected- >> window'. > > Please do. There are still open questions about this new variable, e.g.: what should be recorded in `last-selected-window' in case of `C-x 0' (`delete-window') when the last window is deleted? From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Nov 2014 07:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov , Drew Adams Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.141715977724835 (code B ref 19170); Fri, 28 Nov 2014 07:30:03 +0000 Received: (at 19170) by debbugs.gnu.org; 28 Nov 2014 07:29:37 +0000 Received: from localhost ([127.0.0.1]:48083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuFzk-0006SV-Gm for submit@debbugs.gnu.org; Fri, 28 Nov 2014 02:29:36 -0500 Received: from mout.gmx.net ([212.227.17.21]:62951) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuFzi-0006SN-LE for 19170@debbugs.gnu.org; Fri, 28 Nov 2014 02:29:35 -0500 Received: from [88.117.48.182] ([88.117.48.182]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0Ma2Lr-1XcSWZ3xEN-00LjHN; Fri, 28 Nov 2014 08:29:33 +0100 Message-ID: <54782455.3020206@gmx.at> Date: Fri, 28 Nov 2014 08:29:25 +0100 From: martin rudalics MIME-Version: 1.0 References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> <87egsr0xjt.fsf@mail.linkov.net> <87egsqzy74.fsf@mail.linkov.net> <877fyhfno0.fsf@mail.linkov.net> <3dcedc6e-0613-4af5-a061-02395bc9a506@default> <87y4qw5elz.fsf@mail.linkov.net> In-Reply-To: <87y4qw5elz.fsf@mail.linkov.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:BvH84+PUMugYp7HJMVYQlWyZY/blnKihNtnaBClV7imuQa3ZMJz I40lL8sRadkcfWqwTiqht3cG9kAp4g/eJ8QAsmTovFfhfVfAvFiJ9xMuxTOGwKcGFAEiYEp zt44i868e241VJayjjAHK/Ka2U2oD2tebBw9/Qho6+trR6qXaJV46r7kxg1PwShoK2cdQ51 TpqouBJjvM94+VPyX5vhA== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > There are still open questions about this new variable, e.g.: > what should be recorded in `last-selected-window' in case of > `C-x 0' (`delete-window') when the last window is deleted? You mean when the window referenced by `last-selected-window' is deleted? The one returned by (get-mru-window t t t) I presume. In any case `window-use-time' allows to order all windows by the time when they were selected. martin From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Nov 2014 15:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.141718834520097 (code B ref 19170); Fri, 28 Nov 2014 15:26:01 +0000 Received: (at 19170) by debbugs.gnu.org; 28 Nov 2014 15:25:45 +0000 Received: from localhost ([127.0.0.1]:48556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuNQX-0005E5-2T for submit@debbugs.gnu.org; Fri, 28 Nov 2014 10:25:45 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:43449) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuNQU-0005Du-Cy for 19170@debbugs.gnu.org; Fri, 28 Nov 2014 10:25:42 -0500 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sASFPeAV025921 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 28 Nov 2014 15:25:41 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sASFPdqo019819 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 28 Nov 2014 15:25:40 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sASFPdgJ005938; Fri, 28 Nov 2014 15:25:39 GMT MIME-Version: 1.0 Message-ID: <5df4c77f-ec7f-4084-88bc-737288ae815e@default> Date: Fri, 28 Nov 2014 07:25:36 -0800 (PST) From: Drew Adams References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> <87egsr0xjt.fsf@mail.linkov.net> <87egsqzy74.fsf@mail.linkov.net> <877fyhfno0.fsf@mail.linkov.net> <3dcedc6e-0613-4af5-a061-02395bc9a506@default> <87y4qw5elz.fsf@mail.linkov.net> In-Reply-To: <87y4qw5elz.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > And maybe print the point values too, unless they're the same > > buffer? > > > > Different, A: 2349, B: 1358 > > Same: A: 2349, B: 1358 > > No match >=20 > Or the size of the region of difference or sameness. Maybe. Or both: Diff: 623 chars, A: 2349, B: 1358 Same: 623 chars, A: 2349, B: 1358 No match > > Dunno what the names might be. They could be the buffer names > > (possibly truncated, if long), if different. >=20 > There is no displayable information associated with windows > other than buffer names. Yes, but names can be assigned. In this case, only two names are needed. Just as for Ediff, we could use A & B, e.g., A for the selected window. > >> We already have a lot of `last-...' variables, so a new variable > >> for the last selected window makes sense. Then it would be > >> convenient to compare `(selected-window)' with `last-selected- > >> window'. >=20 > There are still open questions about this new variable, e.g.: > what should be recorded in `last-selected-window' in case of > `C-x 0' (`delete-window') when the last window is deleted? Pick one. The (newly) selected window, for example. Or reset it to nil or whatever (i.e., none). Selected window makes sense, I think. Unless we are going to record a whole history, as for buffers, we cannot set it to the previous "last". Imagine five `C-x 0' in a row. From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Nov 2014 15:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics , Juri Linkov Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.141718867320722 (code B ref 19170); Fri, 28 Nov 2014 15:32:01 +0000 Received: (at 19170) by debbugs.gnu.org; 28 Nov 2014 15:31:13 +0000 Received: from localhost ([127.0.0.1]:48566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuNVo-0005OA-SV for submit@debbugs.gnu.org; Fri, 28 Nov 2014 10:31:13 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:36342) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuNVm-0005O2-SY for 19170@debbugs.gnu.org; Fri, 28 Nov 2014 10:31:11 -0500 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sASFV8ZY020844 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 28 Nov 2014 15:31:09 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sASFV8T1019906 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 28 Nov 2014 15:31:08 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sASFV7N4019876; Fri, 28 Nov 2014 15:31:07 GMT MIME-Version: 1.0 Message-ID: <57cad684-f228-4a49-b66b-2c00e658fe1d@default> Date: Fri, 28 Nov 2014 07:31:05 -0800 (PST) From: Drew Adams References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> <87egsr0xjt.fsf@mail.linkov.net> <87egsqzy74.fsf@mail.linkov.net> <877fyhfno0.fsf@mail.linkov.net> <3dcedc6e-0613-4af5-a061-02395bc9a506@default> <87y4qw5elz.fsf@mail.linkov.net> <54782455.3020206@gmx.at> In-Reply-To: <54782455.3020206@gmx.at> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > There are still open questions about this new variable, e.g.: > > what should be recorded in `last-selected-window' in case of > > `C-x 0' (`delete-window') when the last window is deleted? >=20 > You mean when the window referenced by `last-selected-window' is > deleted? The one returned by (get-mru-window t t t) I presume. In > any case `window-use-time' allows to order all windows by the time > when they were selected. That (too) sounds good. But maybe (get-mru-window 0 t t) is better. Or (get-mru-window 'visible t t). I'm not that familiar with use of frames in terminal mode, so it's not clear to me what the restriction of these to "the current terminal" entails. That restriction is not mentioned in regard to an ALL-FRAMES value of `t'. I wasn't aware of (or forgot about) `window-use-time'. From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Nov 2014 21:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics Cc: 19170@debbugs.gnu.org, Drew Adams Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.141720941322447 (code B ref 19170); Fri, 28 Nov 2014 21:17:01 +0000 Received: (at 19170) by debbugs.gnu.org; 28 Nov 2014 21:16:53 +0000 Received: from localhost ([127.0.0.1]:48705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuSuL-0005pz-69 for submit@debbugs.gnu.org; Fri, 28 Nov 2014 16:16:53 -0500 Received: from ps18281.dreamhost.com ([69.163.222.226]:43742 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuSuI-0005pr-3k for 19170@debbugs.gnu.org; Fri, 28 Nov 2014 16:16:51 -0500 Received: from localhost.linkov.net (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 1AC53348328E6E; Fri, 28 Nov 2014 13:16:49 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> <87egsr0xjt.fsf@mail.linkov.net> <87egsqzy74.fsf@mail.linkov.net> <877fyhfno0.fsf@mail.linkov.net> <3dcedc6e-0613-4af5-a061-02395bc9a506@default> <87y4qw5elz.fsf@mail.linkov.net> <54782455.3020206@gmx.at> Date: Fri, 28 Nov 2014 23:15:38 +0200 In-Reply-To: <54782455.3020206@gmx.at> (martin rudalics's message of "Fri, 28 Nov 2014 08:29:25 +0100") Message-ID: <8761dzxc05.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > You mean when the window referenced by `last-selected-window' is > deleted? The one returned by (get-mru-window t t t) I presume. In any > case `window-use-time' allows to order all windows by the time when they > were selected. Thank you, Martin. This is exactly what we need. diff --git a/lisp/vc/compare-w.el b/lisp/vc/compare-w.el index 25d4cf7..8e5cf11 100644 --- a/lisp/vc/compare-w.el +++ b/lisp/vc/compare-w.el @@ -140,9 +140,37 @@ out all highlighting later with the command `compare-windows-dehighlight'." (defvar compare-windows-overlays2 nil) (defvar compare-windows-sync-point nil) +(defcustom compare-windows-get-window-function 'compare-windows-get-recent-window + "Function that provides the window to compare with." + :type '(choice + (function-item :tag "Most recently used window" + compare-windows-get-recent-window) + (function-item :tag "Next window" + compare-windows-get-next-window) + (function :tag "Your function")) + :group 'compare-windows + :version "25.0") + +(defun compare-windows-get-recent-window () + (let ((w2 (get-mru-window 'visible t t))) + (if (eq w2 (selected-window)) + (error "No other window")) + w2)) + +(defun compare-windows-get-next-window () + (let ((w2 (next-window))) + (if (eq w2 (selected-window)) + (setq w2 (next-window (selected-window) nil 'visible))) + (if (eq w2 (selected-window)) + (error "No other window")) + w2)) + ;;;###autoload (defun compare-windows (ignore-whitespace) - "Compare text in current window with text in next window. + "Compare text in current window with text in another window. +The option `compare-windows-get-window-function' defines how +to get another window. + Compares the text starting at point in each window, moving over text in each one as far as they match. @@ -179,11 +207,7 @@ on third call it again advances points to the next difference and so on." 'compare-windows-sync-regexp compare-windows-sync))) (setq p1 (point) b1 (current-buffer)) - (setq w2 (next-window)) - (if (eq w2 (selected-window)) - (setq w2 (next-window (selected-window) nil 'visible))) - (if (eq w2 (selected-window)) - (error "No other window")) + (setq w2 (funcall compare-windows-get-window-function)) (setq p2 (window-point w2) b2 (window-buffer w2)) (setq opoint2 p2) @@ -255,12 +279,15 @@ on third call it again advances points to the next difference and so on." (recenter (car compare-windows-recenter)) (with-selected-window w2 (recenter (cadr compare-windows-recenter)))) ;; If points are still not synchronized, then ding - (when (and (= p1 opoint1) (= p2 opoint2)) - ;; Display error message when current points in two windows - ;; are unmatched and next matching points can't be found. - (compare-windows-dehighlight) - (ding) - (message "No more matching points")))))) + (if (and (= p1 opoint1) (= p2 opoint2)) + (progn + ;; Display error message when current points in two windows + ;; are unmatched and next matching points can't be found. + (compare-windows-dehighlight) + (ding) + (message "No more matching points with %s" b2)) + (message "Match with %s" b2))) + (message "Difference with %s" b2)))) ;; Move forward over whatever might be called whitespace. ;; compare-windows-whitespace is a regexp that matches whitespace. @@ -303,7 +330,7 @@ on third call it again advances points to the next difference and so on." (defun compare-windows-sync-default-function () (if (not compare-windows-sync-point) (let* ((w1 (selected-window)) - (w2 (next-window w1)) + (w2 (funcall compare-windows-get-window-function)) (b2 (window-buffer w2)) (point-max2 (with-current-buffer b2 (point-max))) (op2 (window-point w2)) From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Nov 2014 22:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov , martin rudalics Cc: 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.141721322128824 (code B ref 19170); Fri, 28 Nov 2014 22:21:02 +0000 Received: (at 19170) by debbugs.gnu.org; 28 Nov 2014 22:20:21 +0000 Received: from localhost ([127.0.0.1]:48711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuTtk-0007Uo-8c for submit@debbugs.gnu.org; Fri, 28 Nov 2014 17:20:20 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:17222) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuTth-0007Ug-EC for 19170@debbugs.gnu.org; Fri, 28 Nov 2014 17:20:17 -0500 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sASMKEFg019352 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 28 Nov 2014 22:20:15 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id sASMKAST008416 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 28 Nov 2014 22:20:12 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sASMKA2r012388; Fri, 28 Nov 2014 22:20:10 GMT MIME-Version: 1.0 Message-ID: Date: Fri, 28 Nov 2014 14:20:07 -0800 (PST) From: Drew Adams References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> <87egsr0xjt.fsf@mail.linkov.net> <87egsqzy74.fsf@mail.linkov.net> <877fyhfno0.fsf@mail.linkov.net> <3dcedc6e-0613-4af5-a061-02395bc9a506@default> <87y4qw5elz.fsf@mail.linkov.net> <54782455.3020206@gmx.at> <8761dzxc05.fsf@mail.linkov.net> In-Reply-To: <8761dzxc05.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > Thank you, Martin. This is exactly what we need. Looks good to me. Please apply it. But "matching points" should be "match positions" - "point" can be confusing. Possible enhancements, but not required to close this enhancement request: 1. I do still think it would be good to provide more info in the message. 2. As I proposed in the past, I think it would be good to (as I do) bind comparison commands to the same prefix. I bind them to prefix `C-=3D' (just one possibility): C-=3D b is ediff-buffers C-=3D d is diff C-=3D e is ediff-files C-=3D f is ediff-files C-=3D w is compare-windows-repeat 3. `compare-windows-repeat' is just a repeatable version of `compare-windows', so you can repeat it using, for example, `C-=3D w w w w w'. Very handy, especially given the improvements you've just made. Maybe consider doing #3 even if you don't want to do #2. I use the definition below, but you can do it another way (e.g., using `set-transient-map'). I use this helper function all the time. It makes it trivial to make a repeatable command: (defun repeat-command (command) "Repeat COMMAND." (let ((repeat-message-function 'ignore)) (setq last-repeatable-command command) (repeat nil))) So for example: (defun compare-windows-repeat (ignore-whitespace) "Compare text in current window with text in next window. You can repeat this by hitting the last key again... See `compare-windows' - this is the same, except repeatable." (interactive "P") (require 'repeat) (repeat-command 'compare-windows)) From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Nov 2014 01:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: martin rudalics , 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.141722298819137 (code B ref 19170); Sat, 29 Nov 2014 01:04:02 +0000 Received: (at 19170) by debbugs.gnu.org; 29 Nov 2014 01:03:08 +0000 Received: from localhost ([127.0.0.1]:48774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuWRH-0004yb-Qe for submit@debbugs.gnu.org; Fri, 28 Nov 2014 20:03:08 -0500 Received: from ps18281.dreamhost.com ([69.163.222.226]:57464 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuWRG-0004yR-0w for 19170@debbugs.gnu.org; Fri, 28 Nov 2014 20:03:06 -0500 Received: from localhost.linkov.net (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 1A503348328E6C; Fri, 28 Nov 2014 17:03:05 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> <87egsr0xjt.fsf@mail.linkov.net> <87egsqzy74.fsf@mail.linkov.net> <877fyhfno0.fsf@mail.linkov.net> <3dcedc6e-0613-4af5-a061-02395bc9a506@default> <87y4qw5elz.fsf@mail.linkov.net> <54782455.3020206@gmx.at> <8761dzxc05.fsf@mail.linkov.net> Date: Sat, 29 Nov 2014 02:50:00 +0200 In-Reply-To: (Drew Adams's message of "Fri, 28 Nov 2014 14:20:07 -0800 (PST)") Message-ID: <87oarqvn01.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > Looks good to me. Please apply it. But "matching points" > should be "match positions" - "point" can be confusing. Wouldn't a shorter phrase be valid too: "No more matches"? > Possible enhancements, but not required to close this > enhancement request: > > 1. I do still think it would be good to provide more info > in the message. All extra info is easy to get using standard commands: a) point values are easy to get with `C-x =' b) the previous point with `C-x C-x' c) the size of the skipped region with `M-=' The only info that is not obvious is the name of another window compared with the selected window. > 2. As I proposed in the past, I think it would be good to > (as I do) bind comparison commands to the same prefix. > I bind them to prefix `C-=' (just one possibility): > > C-= b is ediff-buffers > C-= d is diff > C-= e is ediff-files > C-= f is ediff-files > C-= w is compare-windows-repeat > > 3. `compare-windows-repeat' is just a repeatable version > of `compare-windows', so you can repeat it using, for > example, `C-= w w w w w'. Very handy, especially > given the improvements you've just made. Binding `compare-windows' to a single key `C-=' makes it easy to repeat in a long sequence of its invocations :) From unknown Mon Sep 08 22:57:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Nov 2014 01:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: martin rudalics , 19170@debbugs.gnu.org Received: via spool by 19170-submit@debbugs.gnu.org id=B19170.141722602924092 (code B ref 19170); Sat, 29 Nov 2014 01:54:02 +0000 Received: (at 19170) by debbugs.gnu.org; 29 Nov 2014 01:53:49 +0000 Received: from localhost ([127.0.0.1]:48795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuXEK-0006GW-BJ for submit@debbugs.gnu.org; Fri, 28 Nov 2014 20:53:48 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:49026) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuXEH-0006GM-LP for 19170@debbugs.gnu.org; Fri, 28 Nov 2014 20:53:46 -0500 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sAT1rh1w031313 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 29 Nov 2014 01:53:44 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAT1rgRn026999 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 29 Nov 2014 01:53:42 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAT1rfCk011195; Sat, 29 Nov 2014 01:53:41 GMT MIME-Version: 1.0 Message-ID: Date: Fri, 28 Nov 2014 17:53:38 -0800 (PST) From: Drew Adams References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> <87egsr0xjt.fsf@mail.linkov.net> <87egsqzy74.fsf@mail.linkov.net> <877fyhfno0.fsf@mail.linkov.net> <3dcedc6e-0613-4af5-a061-02395bc9a506@default> <87y4qw5elz.fsf@mail.linkov.net> <54782455.3020206@gmx.at> <8761dzxc05.fsf@mail.linkov.net> <87oarqvn01.fsf@mail.linkov.net> In-Reply-To: <87oarqvn01.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > Looks good to me. Please apply it. But "matching points" > > should be "match positions" - "point" can be confusing. >=20 > Wouldn't a shorter phrase be valid too: "No more matches"? Sure, for that case. > > Possible enhancements, but not required to close this > > enhancement request: > > > > 1. I do still think it would be good to provide more info > > in the message. >=20 > All extra info is easy to get using standard commands: >=20 > a) point values are easy to get with `C-x =3D' > b) the previous point with `C-x C-x' > c) the size of the skipped region with `M-=3D' Not for both windows/buffers, not without moving between them. Think about `diff' output, for instance. Sometimes it can be helpful to see the point or line numbers. Admittedly, it's not essential. Whatever info we show should be because we want to show the two together, for comparison. > The only info that is not obvious is the name of another > window compared with the selected window. I don't agree - see previous. But I don't feel strongly about it. > > 2. As I proposed in the past, I think it would be good to > > (as I do) bind comparison commands to the same prefix. > > I bind them to prefix `C-=3D' (just one possibility): > > > > C-=3D b is ediff-buffers > > C-=3D d is diff > > C-=3D e is ediff-files > > C-=3D f is ediff-files > > C-=3D w is compare-windows-repeat > > > > 3. `compare-windows-repeat' is just a repeatable version > > of `compare-windows', so you can repeat it using, for > > example, `C-=3D w w w w w'. Very handy, especially > > given the improvements you've just made. >=20 > Binding `compare-windows' to a single key `C-=3D' makes it easy > to repeat in a long sequence of its invocations :) Sure, but why not put comparison commands on the same, mnemonic prefix key? If you forget a particular comparison command binding, `C-=3D C-h' will tell you. And as soon as you put `compare-windows' on a prefix key you cannot use it repeatedly, the way it is currently defined. Operations that one might want to use repeatedly (e.g. because they perform an incremental operation) should, in general, be repeatable from a prefix key too, IMO. But this is not part of this particular enhancement request. From unknown Mon Sep 08 22:57:36 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Drew Adams Subject: bug#19170: closed (Re: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames) Message-ID: References: <87oarikjgl.fsf@mail.linkov.net> <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> X-Gnu-PR-Message: they-closed 19170 X-Gnu-PR-Package: emacs Reply-To: 19170@debbugs.gnu.org Date: Fri, 05 Dec 2014 00:55:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1417740902-30433-1" This is a multi-part message in MIME format... ------------=_1417740902-30433-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #19170: 25.0.50; enhancement request: `compare-windows' use across frames which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 19170@debbugs.gnu.org. --=20 19170: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D19170 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1417740902-30433-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 19170-done) by debbugs.gnu.org; 5 Dec 2014 00:54:18 +0000 Received: from localhost ([127.0.0.1]:54164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XwhA2-0007tv-4Z for submit@debbugs.gnu.org; Thu, 04 Dec 2014 19:54:18 -0500 Received: from ps18281.dreamhost.com ([69.163.222.226]:59143 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xwh9z-0007tm-Al for 19170-done@debbugs.gnu.org; Thu, 04 Dec 2014 19:54:16 -0500 Received: from localhost.linkov.net (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 0721F348328E7A; Thu, 4 Dec 2014 16:54:14 -0800 (PST) From: Juri Linkov To: Drew Adams Subject: Re: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames Organization: LINKOV.NET References: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> <87egss9r7v.fsf@mail.linkov.net> <2f6cb7a6-e050-4909-9b54-d651523bb5d5@default> <87egss86a8.fsf@mail.linkov.net> <87egsr0xjt.fsf@mail.linkov.net> <87egsqzy74.fsf@mail.linkov.net> <877fyhfno0.fsf@mail.linkov.net> <3dcedc6e-0613-4af5-a061-02395bc9a506@default> <87y4qw5elz.fsf@mail.linkov.net> <54782455.3020206@gmx.at> <8761dzxc05.fsf@mail.linkov.net> <87oarqvn01.fsf@mail.linkov.net> Date: Fri, 05 Dec 2014 02:51:07 +0200 In-Reply-To: (Drew Adams's message of "Fri, 28 Nov 2014 17:53:38 -0800 (PST)") Message-ID: <87oarikjgl.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19170-done Cc: martin rudalics , 19170-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > Think about `diff' output, for instance. Thanks for the comparison with `diff' output. I installed the patch that adds a message similar to `diff' output, e.g.: Diff -7069,7233 +8280,8323 with compare-w.el ------------=_1417740902-30433-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 24 Nov 2014 19:25:06 +0000 Received: from localhost ([127.0.0.1]:44253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XszFy-0004Y8-5f for submit@debbugs.gnu.org; Mon, 24 Nov 2014 14:25:06 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39082) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XszFw-0004XP-GJ for submit@debbugs.gnu.org; Mon, 24 Nov 2014 14:25:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XszFg-0006pJ-V4 for submit@debbugs.gnu.org; Mon, 24 Nov 2014 14:24:59 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XszFg-0006pB-Sh for submit@debbugs.gnu.org; Mon, 24 Nov 2014 14:24:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XszFY-0007PJ-3A for bug-gnu-emacs@gnu.org; Mon, 24 Nov 2014 14:24:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XszFO-0006jt-43 for bug-gnu-emacs@gnu.org; Mon, 24 Nov 2014 14:24:40 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:28170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XszFN-0006jk-UB for bug-gnu-emacs@gnu.org; Mon, 24 Nov 2014 14:24:30 -0500 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sAOJOS8I027941 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 24 Nov 2014 19:24:29 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAOJOQeP006384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 24 Nov 2014 19:24:27 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAOJOQuf004092 for ; Mon, 24 Nov 2014 19:24:26 GMT MIME-Version: 1.0 Message-ID: <32848088-e8db-46dc-b9c7-f53bc46bb4e1@default> Date: Mon, 24 Nov 2014 11:24:26 -0800 (PST) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 25.0.50; enhancement request: `compare-windows' use across frames X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Provide support for `compare-windows' to compare two windows in different frames. Ediff lets you compare buffers in different frames. It would be great if `compare-windows' did also. Yes, this would require users to choose the windows, instead of just using the selected window and the next window. This could be optional. Or it could be solicited by, e.g., using a particular prefix arg value. E.g., with a non-negative prefix arg, do what the presence of any prefix arg does now. With a non-positive prefix arg, prompt the user to choose the 2 windows. (So a zero prefix arg would do both.) Choosing a window could take any reasonable form: click mouse-1 in it, choose by its buffer name (with uniquification when multiple windows show the same buffer),... Successive calls (with no prefix arg) should, as now, keep using the same two windows. (None of the current behavior should be lost, in particular, behavior per `compare-windows-sync'.) In GNU Emacs 25.0.50.1 (i686-pc-mingw32) of 2014-10-20 on LEG570 Bzr revision: 118168 rgm@gnu.org-20141020195941-icp42t8ttcnud09g Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --enable-checking=3Dyes,glyphs CPPFLAGS=3D-DGLYPH_DEBUG=3D1' ------------=_1417740902-30433-1--