From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23823: 25.0.95; Reset between highlight buffer/file comparisons Date: Fri, 24 Jun 2016 10:07:11 +0300 Message-ID: <837fdf2hgg.fsf@gnu.org> References: <83y45x45l1.fsf@gnu.org> <8b3c0970-72af-3f33-627a-e520c7708f51@gmail.com> <83mvmc2aji.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1466752175 29897 80.91.229.3 (24 Jun 2016 07:09:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jun 2016 07:09:35 +0000 (UTC) Cc: f92capac@gmail.com, 23823@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 24 09:09:24 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bGLEv-0005Uq-3j for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Jun 2016 09:09:21 +0200 Original-Received: from localhost ([::1]:41489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGLEu-0005zH-1w for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Jun 2016 03:09:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGLEi-0005wo-Og for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2016 03:09:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGLEc-0007yO-Ld for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2016 03:09:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGLEc-0007yK-Hx for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2016 03:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bGLEc-00087x-EG for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2016 03:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jun 2016 07:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23823 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 23823-submit@debbugs.gnu.org id=B23823.146675209231177 (code B ref 23823); Fri, 24 Jun 2016 07:09:02 +0000 Original-Received: (at 23823) by debbugs.gnu.org; 24 Jun 2016 07:08:12 +0000 Original-Received: from localhost ([127.0.0.1]:53271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGLDo-00086n-Cg for submit@debbugs.gnu.org; Fri, 24 Jun 2016 03:08:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGLDm-00086Z-N0 for 23823@debbugs.gnu.org; Fri, 24 Jun 2016 03:08:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGLDc-0007Zx-H1 for 23823@debbugs.gnu.org; Fri, 24 Jun 2016 03:08:05 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGLDc-0007Z4-Dr; Fri, 24 Jun 2016 03:08:00 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3745 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bGLDX-0007AY-Ti; Fri, 24 Jun 2016 03:07:56 -0400 In-reply-to: (message from Tino Calancha on Fri, 24 Jun 2016 13:36:17 +0900 (JST)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 208.118.235.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:119996 Archived-At: > From: Tino Calancha > Date: Fri, 24 Jun 2016 13:36:17 +0900 (JST) > cc: Tino Calancha , 23823@debbugs.gnu.org > > >> My point is: why don't we perform a fresh comparison in 2? > > > > Because the first time you call highlight-compare-with-file, it turns > > on the highlight-changes-mode, which begins to mark changes, including > > the replacement of 'b' with 'f'. > Yeah, that sounds nice to me: the user is still somehow in the context > of the first func. call. > > > > Why does it make sense to forget all that information? > Because the user called the function again: this may start a new context, > i.e., reset the minor mode in that buffer. But the function's doc string clearly makes that expected behavior: If the current buffer is visiting the file being compared against, it also will have its differences highlighted. The only way I can interpret that "also" part is that the changes against the file are highlighted _in_addition_ to the changes tracked by the mode. Your scenario just happens to produce a clash between these two sets of differences, and the result could be ambiguous. But what we get in fact doesn't seem unreasonable to me. > I imagine buf-a becaming a mess of colors with all those changes around. > At some point the user may want to compare again the current status of > buf-a with file-b. Well, then maybe a prefix argument to that effect could provide this as an optional behavior?