From unknown Thu Jun 19 14:06:22 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#32991 <32991@debbugs.gnu.org> To: bug#32991 <32991@debbugs.gnu.org> Subject: Status: 27.0.50; diff-auto-refine-mode a no-op Reply-To: bug#32991 <32991@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:06:22 +0000 retitle 32991 27.0.50; diff-auto-refine-mode a no-op reassign 32991 emacs submitter 32991 charles@aurox.ch severity 32991 normal tag 32991 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 08 14:27:05 2018 Received: (at submit) by debbugs.gnu.org; 8 Oct 2018 18:27:05 +0000 Received: from localhost ([127.0.0.1]:40750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9aFE-0000YN-T8 for submit@debbugs.gnu.org; Mon, 08 Oct 2018 14:27:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54191) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9aFD-0000Xt-G6 for submit@debbugs.gnu.org; Mon, 08 Oct 2018 14:27:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9aF7-0000YX-Ap for submit@debbugs.gnu.org; Mon, 08 Oct 2018 14:26:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49546) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g9aF7-0000Y8-2N for submit@debbugs.gnu.org; Mon, 08 Oct 2018 14:26:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9aF5-0005ca-Og for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 14:26:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9aF3-0000Un-AI for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 14:26:55 -0400 Received: from sinyavsky.aurox.ch ([2a03:2040:2:1b::1]:46929) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g9aEy-0000Oa-Qs for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 14:26:50 -0400 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id F217D22892 for ; Mon, 8 Oct 2018 18:30:48 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= reply-to:subject:subject:to:from:from:message-id:date:date; s= dkim; t=1539023446; x=1539887447; bh=TgyerbFan1T6Svb3NcdxB3fCPWA F1rmgAw/LicRa1GU=; b=d2KSa6NqGGNexglU2bKzWSKIl0vprJOKfLxNnM68Z/v qBIjmp3HIRAgUTU3hqb1U0jg6SPmtrexHT3VcnXdSA8YJkEtSmyCYghoIyfXY7W1 4zTnDWyjqBBmKS9oHyPxWj107497BIQkP3g91bLgSmibjK1kVGyJA6zcptVQSyp4 = X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id sK-8Tdd2EB60 for ; Mon, 8 Oct 2018 18:30:46 +0000 (UTC) Received: from gray (unknown [IPv6:2a02:1205:c693:2d60:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id BBAAF22882; Mon, 8 Oct 2018 18:30:46 +0000 (UTC) Date: Mon, 08 Oct 2018 20:30:42 +0200 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: bug-gnu-emacs@gnu.org Subject: 27.0.50; diff-auto-refine-mode a no-op X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: charles@aurox.ch Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > commit f8b1e40fb63b0a6bc6692cc0bc84e5f5e65c2644 > Author: Stefan Monnier > Date: Tue Jul 10 22:52:21 2018 -0400 > * lisp/vc/diff-mode.el: Perform hunk refinement from font-lock > Remove redundant :group arguments. > (diff-font-lock-refine): New var. > (diff--refine-hunk): New function, extracted from diff-refine-hunk. > (diff-refine-hunk): Use it. > (diff--font-lock-refine--refresh): New function. > (diff--font-lock-refined): New function. > (diff-font-lock-keywords): Use it. Looks like this commit makes diff-auto-refine-mode a no-op, since hunks are now always refined. Is that the intention? Also, with automatic refinement always on, does the following part of diff-mode.el still require refining the hunk? It must be repeating font lock's job (unless font lock is switched off, of course). (easy-mmode-define-navigation diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view (when diff-auto-refine-mode (unless (prog1 diff--auto-refine-data (setq diff--auto-refine-data (cons (current-buffer) (point-marker)))) (run-at-time 0.0 nil (lambda () (when diff--auto-refine-data (let ((buffer (car diff--auto-refine-data)) (point (cdr diff--auto-refine-data))) (setq diff--auto-refine-data nil) (with-local-quit (when (buffer-live-p buffer) (with-current-buffer buffer (save-excursion (goto-char point) (diff-refine-hunk)))))))))))) From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 08 17:01:07 2018 Received: (at submit) by debbugs.gnu.org; 8 Oct 2018 21:01:07 +0000 Received: from localhost ([127.0.0.1]:40870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9ceJ-0006ST-0V for submit@debbugs.gnu.org; Mon, 08 Oct 2018 17:01:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9ceH-0006Rr-7R for submit@debbugs.gnu.org; Mon, 08 Oct 2018 17:01:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9ce5-0007wP-4v for submit@debbugs.gnu.org; Mon, 08 Oct 2018 17:00:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48101) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g9cdz-0007uD-4E for submit@debbugs.gnu.org; Mon, 08 Oct 2018 17:00:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9cdy-0001im-Dk for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 17:00:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9cdr-0007pX-MZ for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 17:00:44 -0400 Received: from pmta11.teksavvy.com ([76.10.157.34]:37165) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1g9cdp-0007n6-8O for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 17:00:37 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2GhAAB1xLtb/6Sfs2tkHAEBAQQBAQcEA?= =?us-ascii?q?QGBUQcBAQsBAYIEQ4EQEohNg2Vfi1ABggwTIAGWNYF6DYRmBAIChD0iNA0NAQM?= =?us-ascii?q?BAQEBAQECAgJpKEIBDgGEaQEEAVYjBQsLNBIUGA2FUgimLYoPi1CCAIQkilYCn?= =?us-ascii?q?W4JkGCBPwGHS4ZslXKBQjmBVTMaCDCDKJBwI4MWixIBAQ?= X-IPAS-Result: =?us-ascii?q?A2GhAAB1xLtb/6Sfs2tkHAEBAQQBAQcEAQGBUQcBAQsBAYI?= =?us-ascii?q?EQ4EQEohNg2Vfi1ABggwTIAGWNYF6DYRmBAIChD0iNA0NAQMBAQEBAQECAgJpK?= =?us-ascii?q?EIBDgGEaQEEAVYjBQsLNBIUGA2FUgimLYoPi1CCAIQkilYCnW4JkGCBPwGHS4Z?= =?us-ascii?q?slXKBQjmBVTMaCDCDKJBwI4MWixIBAQ?= X-IronPort-AV: E=Sophos;i="5.54,358,1534824000"; d="scan'208";a="49026498" Received: from 107-179-159-164.cpe.teksavvy.com (HELO fmsmemgm.homelinux.net) ([107.179.159.164]) by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Oct 2018 17:00:31 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 4EA6FAEA0F; Mon, 8 Oct 2018 17:00:31 -0400 (EDT) From: Stefan Monnier To: charles@aurox.ch (Charles A. Roelli) Subject: Re: 27.0.50; diff-auto-refine-mode a no-op Message-ID: References: Date: Mon, 08 Oct 2018 17:00:31 -0400 In-Reply-To: (Charles A. Roelli's message of "Mon, 08 Oct 2018 20:30:42 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -5.0 (-----) >> * lisp/vc/diff-mode.el: Perform hunk refinement from font-lock > Looks like this commit makes diff-auto-refine-mode a no-op, since > hunks are now always refined. Is that the intention? Yes. Of course, it depends on the value of diff-font-lock-refine. > Also, with automatic refinement always on, does the following part of > diff-mode.el still require refining the hunk? I believe this is the same question. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 09 15:11:53 2018 Received: (at submit) by debbugs.gnu.org; 9 Oct 2018 19:11:53 +0000 Received: from localhost ([127.0.0.1]:42567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9xQ9-0000T6-Dn for submit@debbugs.gnu.org; Tue, 09 Oct 2018 15:11:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43131) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9xQ8-0000Su-7B for submit@debbugs.gnu.org; Tue, 09 Oct 2018 15:11:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9xQ0-0007EC-T1 for submit@debbugs.gnu.org; Tue, 09 Oct 2018 15:11:46 -0400 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]:39645) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g9xPz-0007CL-BB for submit@debbugs.gnu.org; Tue, 09 Oct 2018 15:11:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9xPy-0003ht-Ho for bug-gnu-emacs@gnu.org; Tue, 09 Oct 2018 15:11:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9xPt-00074F-SU for bug-gnu-emacs@gnu.org; Tue, 09 Oct 2018 15:11:42 -0400 Received: from sinyavsky.aurox.ch ([37.35.109.145]:38514) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g9xPt-00072A-IE for bug-gnu-emacs@gnu.org; Tue, 09 Oct 2018 15:11:37 -0400 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 4438522891 for ; Tue, 9 Oct 2018 19:15:41 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:reply-to:subject:subject:in-reply-to:to:from:from :message-id:date:date; s=dkim; t=1539112540; x=1539976541; bh=Gw uSopTayxpwGcBOm02G9LAHG7KB9Z9Pn63HMK0fwwk=; b=wcv/g+oK780MrlzDjn FEy57OPgJRnFym6htzZYOf4iOGBt5dAtWd1tqR5/+2D23GCgi4Cz+FenuvtH0xvI EE/7AAmKDjoI79mja2z+GNiH7ObKBPafZAxt+IIVllzkYDj41g50srmfJNU93o5X 0dcsTGLPK/tBKv/oqL7IpcVgo= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id GeeCR37UGhtZ for ; Tue, 9 Oct 2018 19:15:40 +0000 (UTC) Received: from gray (unknown [IPv6:2a02:1205:c693:2d60:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 234A922879; Tue, 9 Oct 2018 19:15:39 +0000 (UTC) Date: Tue, 09 Oct 2018 21:15:39 +0200 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Mon, 08 Oct 2018 17:00:31 -0400) Subject: Re: 27.0.50; diff-auto-refine-mode a no-op References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: charles@aurox.ch Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Stefan Monnier > Date: Mon, 08 Oct 2018 17:00:31 -0400 > > >> * lisp/vc/diff-mode.el: Perform hunk refinement from font-lock > > Looks like this commit makes diff-auto-refine-mode a no-op, since > > hunks are now always refined. Is that the intention? > > Yes. Of course, it depends on the value of diff-font-lock-refine. Ok. In that case, do we still need diff-auto-refine-mode? > > Also, with automatic refinement always on, does the following part of > > diff-mode.el still require refining the hunk? > > I believe this is the same question. I'm not sure I understand. If the default value of diff-font-lock-refine results in hunks being automatically refined by font-lock, why should the navigation function possibly re-do the refining already done by font-lock? From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 09 15:55:35 2018 Received: (at submit) by debbugs.gnu.org; 9 Oct 2018 19:55:35 +0000 Received: from localhost ([127.0.0.1]:42576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9y6R-0001YM-81 for submit@debbugs.gnu.org; Tue, 09 Oct 2018 15:55:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56759) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9y6N-0001Y6-11 for submit@debbugs.gnu.org; Tue, 09 Oct 2018 15:55:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9y61-0004r7-1i for submit@debbugs.gnu.org; Tue, 09 Oct 2018 15:55:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59133) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g9y5y-0004pn-1m for submit@debbugs.gnu.org; Tue, 09 Oct 2018 15:55:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9y5x-0002B3-8q for bug-gnu-emacs@gnu.org; Tue, 09 Oct 2018 15:55:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9y5s-0004op-Af for bug-gnu-emacs@gnu.org; Tue, 09 Oct 2018 15:55:05 -0400 Received: from alt22.smtp-out.videotron.ca ([70.80.0.73]:13754) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g9y5s-0004o8-5q for bug-gnu-emacs@gnu.org; Tue, 09 Oct 2018 15:55:00 -0400 Received: from fmsmemgm.homelinux.net ([23.233.195.134]) by Videotron with SMTP id 9y5ngHviMScMV9y5ogj4FM; Tue, 09 Oct 2018 15:54:58 -0400 X-Authority-Analysis: v=2.3 cv=eZsTgYMH c=1 sm=1 tr=0 a=xXJ578j8WyTliCxld3/pTA==:117 a=xXJ578j8WyTliCxld3/pTA==:17 a=smKx5t2vBNcA:10 a=Hj2seF0fXGBZ_v0IXuYA:9 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id BC7F3AEA12; Tue, 9 Oct 2018 15:54:55 -0400 (EDT) From: Stefan Monnier To: charles@aurox.ch (Charles A. Roelli) Subject: Re: 27.0.50; diff-auto-refine-mode a no-op Message-ID: References: Date: Tue, 09 Oct 2018 15:54:55 -0400 In-Reply-To: (Charles A. Roelli's message of "Tue, 09 Oct 2018 21:15:39 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-CMAE-Envelope: MS4wfDx5GGmrHufaqrbRI+GvSJQpiMNWigbjtHjUIkHb9tea1UgkeH/ti4CEYgspi4McrM5bkuUqrZ3xdqLI8vyR4RjPp3OiWYGrKl0tO8hxrSnJc8v6b2oY 2/xLxdH/bvTgGN/73zxc/2wOwr0CuW54Djl65WCnngFuqXveh0jlVVHgAMbfXhWsq4M1GGh3dufnlM/JO+GE45E8w4jb65zlFnso+WlwWE20sbRqVUEchws7 hc/l6WaDTykYVzmlgmWFQA== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -5.0 (-----) >> >> * lisp/vc/diff-mode.el: Perform hunk refinement from font-lock >> > Looks like this commit makes diff-auto-refine-mode a no-op, since >> > hunks are now always refined. Is that the intention? >> Yes. Of course, it depends on the value of diff-font-lock-refine. > Ok. In that case, do we still need diff-auto-refine-mode? It should probably be merged with diff-font-lock-refine (e.g. have 3 possible values). >> > Also, with automatic refinement always on, does the following part of >> > diff-mode.el still require refining the hunk? >> I believe this is the same question. > I'm not sure I understand. I'm saying that this is the same question as that discussed in the previous paragraph: one looks at the config var, and the other looks at the code implementing the functionality related to the config var, but the two are inextricably linked. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 10 14:28:17 2018 Received: (at submit) by debbugs.gnu.org; 10 Oct 2018 18:28:17 +0000 Received: from localhost ([127.0.0.1]:43823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAJDU-00069s-VU for submit@debbugs.gnu.org; Wed, 10 Oct 2018 14:28:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAJDT-00069d-0z for submit@debbugs.gnu.org; Wed, 10 Oct 2018 14:28:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAJDM-0005UT-TK for submit@debbugs.gnu.org; Wed, 10 Oct 2018 14:28:09 -0400 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]:40413) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAJDM-0005UO-PZ for submit@debbugs.gnu.org; Wed, 10 Oct 2018 14:28:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAJDL-0001Oz-Vl for bug-gnu-emacs@gnu.org; Wed, 10 Oct 2018 14:28:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAJDH-0005TK-VX for bug-gnu-emacs@gnu.org; Wed, 10 Oct 2018 14:28:07 -0400 Received: from sinyavsky.aurox.ch ([37.35.109.145]:39199) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAJDH-0005Mh-Kq for bug-gnu-emacs@gnu.org; Wed, 10 Oct 2018 14:28:03 -0400 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id C0AB122899 for ; Wed, 10 Oct 2018 18:32:00 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:reply-to:subject:subject:in-reply-to:to:from:from :message-id:date:date; s=dkim; t=1539196318; x=1540060319; bh=/Y 3Oh0xByLH5pGOYC4+CQYh4mq0DF9ayYCSiSotH46M=; b=bQmq7D/2qRVExJ0zDj M7oHWXCPg0LZOrEY3FMBXiS2j3ZB1tEvtKXOgwoNCaZx5FRI2vEYvsRjp5bcPStb 5FUJHlNAE1YqTTFFAi26heYvM0G/XliljEpimWxjh6Xu2D6San4vCvwynXva90fl 6yCft4Q8UW0wT1OTXs07fQWUw= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id x3BKKKkmuQuX for ; Wed, 10 Oct 2018 18:31:58 +0000 (UTC) Received: from gray (unknown [IPv6:2a02:1205:c693:2d60:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 6DF2122879; Wed, 10 Oct 2018 18:31:58 +0000 (UTC) Date: Wed, 10 Oct 2018 20:31:52 +0200 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Tue, 09 Oct 2018 15:54:55 -0400) Subject: Re: 27.0.50; diff-auto-refine-mode a no-op References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: charles@aurox.ch Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Stefan Monnier > Date: Tue, 09 Oct 2018 15:54:55 -0400 > > >> >> * lisp/vc/diff-mode.el: Perform hunk refinement from font-lock > >> > Looks like this commit makes diff-auto-refine-mode a no-op, since > >> > hunks are now always refined. Is that the intention? > >> Yes. Of course, it depends on the value of diff-font-lock-refine. > > Ok. In that case, do we still need diff-auto-refine-mode? > > It should probably be merged with diff-font-lock-refine (e.g. have > 3 possible values). So diff-font-lock-refine could have 3 possible values, t and nil as it has now, and 'auto for doing the refinement as you navigate to hunks with "n" or "p". While we're on this point, what is the use case for offering automatic refining during navigation if we can now offer "just-in-time" highlighting via font-lock? The new, instant refining seems more logical and less surprising to the user. It could be even better if C-c C-b could interactively toggle the refining of the hunk at point (for those times when the refining turns out to be an eye-sore). Another advantage of the new font-lock based approach is that with a little change we might be able to customize how much highlighting is done in a diff-mode buffer via "font-lock-maximum-decoration". From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 10 15:21:45 2018 Received: (at submit) by debbugs.gnu.org; 10 Oct 2018 19:21:45 +0000 Received: from localhost ([127.0.0.1]:43861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAK3F-00018O-7f for submit@debbugs.gnu.org; Wed, 10 Oct 2018 15:21:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAK3C-00018B-5T for submit@debbugs.gnu.org; Wed, 10 Oct 2018 15:21:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAK36-0007M2-4p for submit@debbugs.gnu.org; Wed, 10 Oct 2018 15:21:36 -0400 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]:51118) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAK36-0007Lw-10 for submit@debbugs.gnu.org; Wed, 10 Oct 2018 15:21:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAK35-0005ca-3I for bug-gnu-emacs@gnu.org; Wed, 10 Oct 2018 15:21:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAK32-0007LN-08 for bug-gnu-emacs@gnu.org; Wed, 10 Oct 2018 15:21:35 -0400 Received: from alt42.smtp-out.videotron.ca ([23.233.128.29]:19694) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAK31-0007Ky-9D for bug-gnu-emacs@gnu.org; Wed, 10 Oct 2018 15:21:31 -0400 Received: from fmsmemgm.homelinux.net ([23.233.195.134]) by Videotron with SMTP id AK2xgQJ5qymKmAK2yg8oiS; Wed, 10 Oct 2018 15:21:29 -0400 X-Authority-Analysis: v=2.3 cv=WccilXpX c=1 sm=1 tr=0 a=xXJ578j8WyTliCxld3/pTA==:117 a=xXJ578j8WyTliCxld3/pTA==:17 a=smKx5t2vBNcA:10 a=TKczq8gekYiTKiIK8bgA:9 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 761C8AE319; Wed, 10 Oct 2018 15:21:27 -0400 (EDT) From: Stefan Monnier To: charles@aurox.ch (Charles A. Roelli) Subject: Re: 27.0.50; diff-auto-refine-mode a no-op Message-ID: References: Date: Wed, 10 Oct 2018 15:21:27 -0400 In-Reply-To: (Charles A. Roelli's message of "Wed, 10 Oct 2018 20:31:52 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-CMAE-Envelope: MS4wfEDOISDFyD3+pS0Eb8ejiZO/8atWZXk2BAk72gz9DKlP8yA3cktLvddhiHdpQgE2uKUPIubUBU8j1c08eTNy7PdtxurBiiksBJV9jfTwPQNSPWE2a8k8 knFFOfgHgV2bCzY4fZJOzZRuYDdpJJ7XQes/tQG/hTNlkjfhciA6a1pe+Sz8rFWDEQGApgWDiK4Uj62Uv3Lvq1of1VS6OOH9ppgJCVJnGMABh+IQpEuJXWvu EA8ynyXdgocuh53MlZJwxg== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -5.0 (-----) > So diff-font-lock-refine could have 3 possible values, t and nil as it > has now, and 'auto for doing the refinement as you navigate to hunks > with "n" or "p". I don't see what the navigation-triggered refinement has of "auto"matism, compared to font-lock, so I wouldn't use `auto` here. I'd rather go with something like `nil`, `font-lock`, or `navigation` (and default to `font-lock`). > While we're on this point, what is the use case for offering automatic > refining during navigation if we can now offer "just-in-time" > highlighting via font-lock? Good question. Maybe it's just not worth it and we should simply get rid of the old navigation-triggered refinement. This said, the new font-lock thingy can be problematic if the diff takes too much time since it happens within jit-lock with inhibit-quit set to a non-nil value, so it completely freezes your Emacs session, whereas if it happens during `n` you can stop it with C-g. Hopefully, we can fix this problem by calling `diff` asynchronously so it can't block Emacs. > It could be even better if C-c C-b could interactively toggle the > refining of the hunk at point (for those times when the refining turns > out to be an eye-sore). Sounds good (but note that diff-refine-hunk can also be useful to *refresh* the fine highlighting, e.g. after manually editing a hunk). > Another advantage of the new font-lock based approach is that with a > little change we might be able to customize how much highlighting is > done in a diff-mode buffer via "font-lock-maximum-decoration". font-lock-maximum-decoration is fundamentally flawed in that it is unidimensional (you can only have more or less) whereas often some users may want more of one kind of info and less of another. E.g. how would you order the "decoration levels" between: basic basic + refine basic + prettify basic + prettify + refine The first and last are easy, but there's no natural ordering between the middle two. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 13 09:39:07 2018 Received: (at submit) by debbugs.gnu.org; 13 Oct 2018 13:39:07 +0000 Received: from localhost ([127.0.0.1]:47865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gBK8J-0001ol-CJ for submit@debbugs.gnu.org; Sat, 13 Oct 2018 09:39:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gBK8G-0001oF-II for submit@debbugs.gnu.org; Sat, 13 Oct 2018 09:39:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBK8A-0001GK-D8 for submit@debbugs.gnu.org; Sat, 13 Oct 2018 09:38:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40291) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gBK8A-0001GF-90 for submit@debbugs.gnu.org; Sat, 13 Oct 2018 09:38:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBK89-0007ad-8o for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2018 09:38:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBK84-0001FR-Tg for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2018 09:38:57 -0400 Received: from sinyavsky.aurox.ch ([37.35.109.145]:41248) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gBK84-0001Ec-FU for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2018 09:38:52 -0400 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id B33BF2289F for ; Sat, 13 Oct 2018 13:42:52 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:reply-to:subject:subject:in-reply-to:to:from:from :message-id:date:date; s=dkim; t=1539438171; x=1540302172; bh=mJ M/OKU/K3/CwMQLmcfNb4qjaNWQ0rYNGUmTGsOTZ/E=; b=xN2NFaGBvRCJ81/I9Q tLPCjuOBrQF4bKoNnPJ+mwSb/aPStTPQzaCPrwB3cdVKcPBFEll4wPUTw8gOfcN5 fSYtnvi5KGcuzGtgwqNPPUclPWDPuNy5h8FhDY3qW22nNcJ7ZV3Uhk7cEtC609Fz 1SGfLG1LSH0qir6/6guGVwDYE= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id X64T_HyP28lG for ; Sat, 13 Oct 2018 13:42:51 +0000 (UTC) Received: from gray (unknown [IPv6:2a02:1205:c693:2d60:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 1844F22881; Sat, 13 Oct 2018 13:42:50 +0000 (UTC) Date: Sat, 13 Oct 2018 15:42:54 +0200 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Wed, 10 Oct 2018 15:21:27 -0400) Subject: Re: 27.0.50; diff-auto-refine-mode a no-op References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: charles@aurox.ch Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Stefan Monnier > Date: Wed, 10 Oct 2018 15:21:27 -0400 > > I don't see what the navigation-triggered refinement has of > "auto"matism, compared to font-lock, so I wouldn't use `auto` here. > I'd rather go with something like `nil`, `font-lock`, or `navigation` > (and default to `font-lock`). Sounds good. > > While we're on this point, what is the use case for offering automatic > > refining during navigation if we can now offer "just-in-time" > > highlighting via font-lock? > > Good question. Maybe it's just not worth it and we should simply get > rid of the old navigation-triggered refinement. This said, the new > font-lock thingy can be problematic if the diff takes too much time > since it happens within jit-lock with inhibit-quit set to a non-nil > value, so it completely freezes your Emacs session, whereas if it > happens during `n` you can stop it with C-g. > > Hopefully, we can fix this problem by calling `diff` asynchronously so > it can't block Emacs. I was able to produce such a case where Emacs froze for 30 seconds on opening a 2000-line (junk) diff containing one large hunk. It would indeed be convenient to have "diff" called asynchronously (assuming this is the "diff" that runs in smerge-refine-regions). Is it a matter of using "start-process" instead of "call-process"? > > It could be even better if C-c C-b could interactively toggle the > > refining of the hunk at point (for those times when the refining turns > > out to be an eye-sore). > > Sounds good (but note that diff-refine-hunk can also be useful to > *refresh* the fine highlighting, e.g. after manually editing a hunk). Ok, then switching off the refining might fit better on a prefix argument, or in a new command. > font-lock-maximum-decoration is fundamentally flawed in that it is > unidimensional (you can only have more or less) whereas often some users > may want more of one kind of info and less of another. > > E.g. how would you order the "decoration levels" between: > > basic > basic + refine > basic + prettify > basic + prettify + refine > > The first and last are easy, but there's no natural ordering between the > middle two. Good point. Maybe we could start with an ordering of just "basic"/"basic + refine", since the diff-font-lock-prettify option is brand new and seems to be more about hiding text than decorating it, IIUC. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 13 14:51:14 2018 Received: (at 32991) by debbugs.gnu.org; 13 Oct 2018 18:51:14 +0000 Received: from localhost ([127.0.0.1]:48617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gBP0M-0000g2-Fu for submit@debbugs.gnu.org; Sat, 13 Oct 2018 14:51:14 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:58322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gBP0K-0000fu-6o for 32991@debbugs.gnu.org; Sat, 13 Oct 2018 14:51:13 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w9DIp0DK020807; Sat, 13 Oct 2018 14:51:01 -0400 Received: by pastel.home (Postfix, from userid 20848) id 3E97C69AAE; Sat, 13 Oct 2018 14:51:00 -0400 (EDT) From: Stefan Monnier To: charles@aurox.ch (Charles A. Roelli) Subject: Re: 27.0.50; diff-auto-refine-mode a no-op Message-ID: References: Date: Sat, 13 Oct 2018 14:51:00 -0400 In-Reply-To: (Charles A. Roelli's message of "Sat, 13 Oct 2018 15:42:54 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6394=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6394> : inlines <6930> : streams <1801215> : uri <2729728> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 Cc: 32991@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) >> Good question. Maybe it's just not worth it and we should simply get >> rid of the old navigation-triggered refinement. This said, the new >> font-lock thingy can be problematic if the diff takes too much time >> since it happens within jit-lock with inhibit-quit set to a non-nil >> value, so it completely freezes your Emacs session, whereas if it >> happens during `n` you can stop it with C-g. >> Hopefully, we can fix this problem by calling `diff` asynchronously so >> it can't block Emacs. > I was able to produce such a case where Emacs froze for 30 seconds on > opening a 2000-line (junk) diff containing one large hunk. I bumped into one a week ago where I killed `diff` after several minutes. > Is it a matter of using "start-process" instead of "call-process"? That's the starting point, yes, but it also involves moving the "subsequent" code to the process's sentinel. >> > It could be even better if C-c C-b could interactively toggle the >> > refining of the hunk at point (for those times when the refining turns >> > out to be an eye-sore). >> Sounds good (but note that diff-refine-hunk can also be useful to >> *refresh* the fine highlighting, e.g. after manually editing a hunk). > Ok, then switching off the refining might fit better on a prefix > argument, or in a new command. Could be, tho maybe you can make it DWIM enough (i.e. turn off if there's nothing to refresh). > Good point. Maybe we could start with an ordering of just > "basic"/"basic + refine", since the diff-font-lock-prettify option is > brand new and seems to be more about hiding text than decorating it, > IIUC. Since I find font-lock-maximum-decoration fundamentally flawed, I'm rather in the business of deprecating it than increasing its use. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 13 09:29:58 2019 Received: (at 32991) by debbugs.gnu.org; 13 Jan 2019 14:29:58 +0000 Received: from localhost ([127.0.0.1]:57397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gigly-0006Ou-F0 for submit@debbugs.gnu.org; Sun, 13 Jan 2019 09:29:58 -0500 Received: from sinyavsky.aurox.ch ([37.35.109.145]:44065) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1giglw-0006Oe-JP for 32991@debbugs.gnu.org; Sun, 13 Jan 2019 09:29:57 -0500 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 2920322A15 for <32991@debbugs.gnu.org>; Sun, 13 Jan 2019 14:35:29 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:reply-to:subject:subject:in-reply-to:to:from:from :message-id:date:date; s=dkim; t=1547390128; x=1548254129; bh=4I rLcwha/mJgeiw1FQQk5WLNY7r7JzGdEyaLqWOxcsk=; b=u5BiATi2mzZ/dbAeRL CXHN0M2PmyjguXvnD3zroC2fr7BbdFO7EajZn4O8OCGyaZir7F50KXx1Pl1HNZYe aRPL41K8Nmya8npBe3wrV6GOyVIhK4k6jVb1nqK58EvSCRfNZwNDv9zqMxfQQtu8 0g8p0C3e6kdMwR4HN9UW6zf7k= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2UcGBj2t38sL for <32991@debbugs.gnu.org>; Sun, 13 Jan 2019 14:35:28 +0000 (UTC) Received: from gray (unknown [IPv6:2a02:1206:4519:d090:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id E84AA229E9; Sun, 13 Jan 2019 14:35:19 +0000 (UTC) Date: Sun, 13 Jan 2019 15:36:48 +0100 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Wed, 10 Oct 2018 15:21:27 -0400) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 Cc: 32991@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: charles@aurox.ch Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Date: Wed, 10 Oct 2018 15:21:27 -0400 > > > So diff-font-lock-refine could have 3 possible values, t and nil as it > > has now, and 'auto for doing the refinement as you navigate to hunks > > with "n" or "p". > > I don't see what the navigation-triggered refinement has of > "auto"matism, compared to font-lock, so I wouldn't use `auto` here. > I'd rather go with something like `nil`, `font-lock`, or `navigation` > (and default to `font-lock`). After revisiting this, the values "nil", "font-lock", and "navigation" sound fine, though if we end up using those we might want to change the name of "diff-font-lock-refine" to just "diff-refine" (since "font-lock" may not be involved in the refinement). From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 13 14:56:38 2019 Received: (at 32991) by debbugs.gnu.org; 13 Jan 2019 19:56:38 +0000 Received: from localhost ([127.0.0.1]:58087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gils6-0005kl-7P for submit@debbugs.gnu.org; Sun, 13 Jan 2019 14:56:38 -0500 Received: from sinyavsky.aurox.ch ([37.35.109.145]:44296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gils3-0005kW-DL for 32991@debbugs.gnu.org; Sun, 13 Jan 2019 14:56:36 -0500 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 54B4B22A1D for <32991@debbugs.gnu.org>; Sun, 13 Jan 2019 20:02:08 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:reply-to:subject:subject:in-reply-to:to:from:from :message-id:date:date; s=dkim; t=1547409725; x=1548273726; bh=e5 8PNMKZH+aQr431nRl5ft8e2VgNoRZscV/JZmOidKc=; b=sND/l1Rh8NgfyXSlqU 3w19kS5FDYBr5ah+k2WgGAkkNRO32xXbxq9GvVTPUs1xcLsFmMfe4FLJ9e4DhOLE 0oVxqdpqBOnz/5kb+ACZGy9GztKsxW+AFKRChHarIxb9WJSz9UtnC5eDg9s+Z5Bu 0qpOtsYOBKJD4GrZOv6kXBi5Q= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id xTQd9odw5mYy for <32991@debbugs.gnu.org>; Sun, 13 Jan 2019 20:02:05 +0000 (UTC) Received: from gray (unknown [IPv6:2a02:1206:4519:d090:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id CB597229E9; Sun, 13 Jan 2019 20:02:03 +0000 (UTC) Date: Sun, 13 Jan 2019 21:03:29 +0100 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: monnier@iro.umontreal.ca, 32991@debbugs.gnu.org In-reply-to: (charles@aurox.ch) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: charles@aurox.ch Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 13 Jan 2019 15:36:48 +0100 > From: charles@aurox.ch (Charles A. Roelli) > > After revisiting this, the values "nil", "font-lock", and "navigation" > sound fine, though if we end up using those we might want to change > the name of "diff-font-lock-refine" to just "diff-refine" (since > "font-lock" may not be involved in the refinement). Here is a possible implementation: * etc/NEWS (Diff mode): Explain renamed 'diff-refine' variable, mention removal of 'diff-auto-refine-mode', and explain user-visible changes to 'diff-hunk-next' and 'diff-hunk-prev'. * lisp/vc/diff-mode.el (diff-font-lock-refine): Rename to 'diff-refine' and allow choices nil, 'font-lock' and 'navigation'. (diff-auto-refine-mode): Remove as it has been superseded by the user option 'diff-refine'. (diff-navigate-maybe-refine): New function for use in the new functions 'diff-hunk-next' and 'diff-hunk-prev'. (diff-hunk-next, diff-hunk-prev): Rewrite as defuns instead of using easy-mmode-define-navigation. Add a new optional argument 'interactive', which is needed to prevent other callers from inadvertently causing refinement to happen when 'diff-refine' is set to 'navigation'. Leave out the ability of these commands to change user narrowing and recenter the window, as this does not match the behavior of other general movement commands. (diff--font-lock-refined): Change it to only trigger when the new variable 'diff-refine' has the value 'font-lock'. * lisp/vc/smerge-mode.el (smerge-next, smerge-prev): Check that 'diff-refine' is set to 'navigation' instead of checking 'diff-auto-refine-mode' when deciding whether to refine a conflict. ------ diff --git a/etc/NEWS b/etc/NEWS index bb214f2..3163577 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -428,8 +428,14 @@ values. and compares their entire trees. ** Diff mode -*** Hunks are now automatically refined by default. -To disable it, set the new defcustom 'diff-font-lock-refine' to nil. +*** Hunks are now automatically refined by font-lock. +To disable refinement, set the new defcustom 'diff-refine' to nil. +To get back the old behavior where hunks are refined as you navigate +through a diff, set 'diff-refine' to the symbol 'navigate'. +*** diff-auto-refine-mode has been removed. +*** diff-hunk-next and diff-hunk-prev +These commands no longer recenter the window or change the narrowing +of the buffer. +++ *** Better syntax highlighting of Diff hunks. diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 5d6cc6f..2d77f6a 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -94,10 +94,18 @@ diff-mode-hook :type 'hook :options '(diff-delete-empty-files diff-make-unified)) -(defcustom diff-font-lock-refine t - "If non-nil, font-lock highlighting includes hunk refinement." +(defcustom diff-refine 'font-lock + "If non-nil, enable hunk refinement. + +The value `font-lock' means to refine during font-lock. +The value `navigation' means to refine each hunk as you visit it +with `diff-hunk-next' or `diff-hunk-prev'. + +You can always manually refine a hunk with `diff-refine-hunk'." :version "27.1" - :type 'boolean) + :type '(choice (const :tag "Don't refine hunks" nil) + (const :tag "Refine hunks during font-lock" font-lock) + (const :tag "Refine hunks during navigation" navigation))) (defcustom diff-font-lock-prettify nil "If non-nil, font-lock will try and make the format prettier." @@ -254,18 +262,6 @@ diff-minor-mode-prefix `((,diff-minor-mode-prefix . ,diff-mode-shared-map)) "Keymap for `diff-minor-mode'. See also `diff-mode-shared-map'.") -(define-minor-mode diff-auto-refine-mode - "Toggle automatic diff hunk finer highlighting (Diff Auto Refine mode). - -Diff Auto Refine mode is a buffer-local minor mode used with -`diff-mode'. When enabled, Emacs automatically highlights -changes in detail as the user visits hunks. When transitioning -from disabled to enabled, it tries to refine the current hunk, as -well." - :group 'diff-mode :init-value t :lighter nil ;; " Auto-Refine" - (when diff-auto-refine-mode - (condition-case-unless-debug nil (diff-refine-hunk) (error nil)))) - ;;;; ;;;; font-lock support ;;;; @@ -619,26 +615,59 @@ diff-end-of-file (defvar diff--auto-refine-data nil) -;; Define diff-{hunk,file}-{prev,next} -(easy-mmode-define-navigation - diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view - (when diff-auto-refine-mode - (unless (prog1 diff--auto-refine-data - (setq diff--auto-refine-data - (cons (current-buffer) (point-marker)))) - (run-at-time 0.0 nil - (lambda () - (when diff--auto-refine-data - (let ((buffer (car diff--auto-refine-data)) - (point (cdr diff--auto-refine-data))) - (setq diff--auto-refine-data nil) - (with-local-quit - (when (buffer-live-p buffer) - (with-current-buffer buffer - (save-excursion - (goto-char point) - (diff-refine-hunk)))))))))))) - +(defun diff-navigate-maybe-refine () + (when (eq diff-refine 'navigation) + (unless (prog1 diff--auto-refine-data + (setq diff--auto-refine-data + (cons (current-buffer) (point-marker)))) + (run-at-time 0.0 nil + (lambda () + (when diff--auto-refine-data + (let ((buffer (car diff--auto-refine-data)) + (point (cdr diff--auto-refine-data))) + (setq diff--auto-refine-data nil) + (with-local-quit + (when (buffer-live-p buffer) + (with-current-buffer buffer + (save-excursion + (goto-char point) + (diff-refine-hunk)))))))))))) + +(defun diff-hunk-next (&optional count interactive) + "Go to the next COUNT'th hunk. + +Interactively, COUNT is the prefix numeric argument, and defaults to 1. + +If INTERACTIVE is non-nil and `diff-refine' is set to +`navigation', refine the hunk moved to." + (interactive "p\np") + (unless count (setq count 1)) + (if (< count 0) + (diff-hunk-prev (- count)) + (if (looking-at diff-hunk-header-re) (setq count (1+ count))) + (if (not (re-search-forward diff-hunk-header-re nil t count)) + (if (looking-at diff-hunk-header-re) + (goto-char (diff-end-of-hunk)) + (user-error "No next hunk")) + (goto-char (match-beginning 0)) + (if interactive (diff-navigate-maybe-refine))))) + +(defun diff-hunk-prev (&optional count interactive) + "Go to the previous COUNT'th hunk. + +Interactively, COUNT is the prefix numeric argument, and defaults to 1. + +If INTERACTIVE is non-nil and `diff-refine' is set to +`navigation', refine the hunk moved to." + (interactive "p\np") + (unless count (setq count 1)) + (if (< count 0) + (diff-hunk-next (- count)) + (unless (re-search-backward diff-hunk-header-re nil t count) + (user-error "No previous hunk")) + (if interactive (diff-navigate-maybe-refine)))) + +;; Define diff-file-{prev,next} (easy-mmode-define-navigation diff-file diff-file-header-re "file" diff-end-of-file) @@ -2125,7 +2154,7 @@ diff--refine-hunk (defun diff--font-lock-refined (max) "Apply hunk refinement from font-lock." - (when diff-font-lock-refine + (when (eq diff-refine 'font-lock) (when (get-char-property (point) 'diff--font-lock-refined) ;; Refinement works over a complete hunk, whereas font-lock limits itself ;; to highlighting smallish chunks between point..max, so we may be diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index 569797e..e700e32 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -44,7 +44,7 @@ ;;; Code: (eval-when-compile (require 'cl-lib)) -(require 'diff-mode) ;For diff-auto-refine-mode. +(require 'diff-mode) ;For diff-refine. (require 'newcomment) ;;; The real definition comes later. @@ -264,7 +264,7 @@ font-lock-keywords ;; Define smerge-next and smerge-prev (easy-mmode-define-navigation smerge smerge-begin-re "conflict" nil nil - (if diff-auto-refine-mode + (if (eq diff-refine 'navigation) (condition-case nil (smerge-refine) (error nil)))) (defconst smerge-match-names ["conflict" "upper" "base" "lower"]) From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 13 18:33:33 2019 Received: (at 32991) by debbugs.gnu.org; 13 Jan 2019 23:33:33 +0000 Received: from localhost ([127.0.0.1]:58193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gipG1-0002PE-8m for submit@debbugs.gnu.org; Sun, 13 Jan 2019 18:33:33 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:40347) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gipFy-0002P5-Gd for 32991@debbugs.gnu.org; Sun, 13 Jan 2019 18:33:31 -0500 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x0DNXF1H031445; Sun, 13 Jan 2019 18:33:18 -0500 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 4C661AEA2A; Sun, 13 Jan 2019 18:33:15 -0500 (EST) From: Stefan Monnier To: charles@aurox.ch (Charles A. Roelli) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op Message-ID: References: Date: Sun, 13 Jan 2019 18:33:15 -0500 In-Reply-To: (Charles A. Roelli's message of "Sun, 13 Jan 2019 21:03:29 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6459=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6459> : inlines <6992> : streams <1810003> : uri <2779476> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 Cc: 32991@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > -(defcustom diff-font-lock-refine t > - "If non-nil, font-lock highlighting includes hunk refinement." > +(defcustom diff-refine 'font-lock > + "If non-nil, enable hunk refinement. > + > +The value `font-lock' means to refine during font-lock. > +The value `navigation' means to refine each hunk as you visit it > +with `diff-hunk-next' or `diff-hunk-prev'. > + > +You can always manually refine a hunk with `diff-refine-hunk'." > :version "27.1" > - :type 'boolean) > + :type '(choice (const :tag "Don't refine hunks" nil) > + (const :tag "Refine hunks during font-lock" font-lock) > + (const :tag "Refine hunks during navigation" navigation))) Good. > -(define-minor-mode diff-auto-refine-mode > - "Toggle automatic diff hunk finer highlighting (Diff Auto Refine mode). > - > -Diff Auto Refine mode is a buffer-local minor mode used with > -`diff-mode'. When enabled, Emacs automatically highlights > -changes in detail as the user visits hunks. When transitioning > -from disabled to enabled, it tries to refine the current hunk, as > -well." > - :group 'diff-mode :init-value t :lighter nil ;; " Auto-Refine" > - (when diff-auto-refine-mode > - (condition-case-unless-debug nil (diff-refine-hunk) (error nil)))) I think for backward compatiblity reason, we should keep this minor mode, tho mark it obsolete and change its code to set diff-refine to `navigation`. > -;; Define diff-{hunk,file}-{prev,next} > -(easy-mmode-define-navigation > - diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view [...] > +(defun diff-hunk-next (&optional count interactive) [...] > +(defun diff-hunk-prev (&optional count interactive) This change seems unrelated. I'd rather we stick to the refinement itself. > ;; Define smerge-next and smerge-prev > (easy-mmode-define-navigation smerge smerge-begin-re "conflict" nil nil > - (if diff-auto-refine-mode > + (if (eq diff-refine 'navigation) > (condition-case nil (smerge-refine) (error nil)))) Hmm... I want to set my `diff-refined` to `font-lock` yet I also want my smerge conflicts to be refined when I navigate to them. Maybe the test here should be just whether diff-refine is non-nil? Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 15 15:18:04 2019 Received: (at 32991) by debbugs.gnu.org; 15 Jan 2019 20:18:04 +0000 Received: from localhost ([127.0.0.1]:60403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjV9u-0004cn-PN for submit@debbugs.gnu.org; Tue, 15 Jan 2019 15:18:03 -0500 Received: from sinyavsky.aurox.ch ([37.35.109.145]:45966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjV9r-0004cE-IQ for 32991@debbugs.gnu.org; Tue, 15 Jan 2019 15:18:00 -0500 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 976EE22A22 for <32991@debbugs.gnu.org>; Tue, 15 Jan 2019 20:23:34 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:reply-to:subject:subject:in-reply-to:to:from:from :message-id:date:date; s=dkim; t=1547583811; x=1548447812; bh=OS XkXHRq/YywhRuEEyFyZE2RyCUHVZdQqHGRkxCDDmo=; b=Po8mO286qdJMDwM1X0 GLce+5kDDUkBPosSDXeea6Brw7RyQ59nNH4bqyx+vtFwc6wUvyT6s1f1fXKZy+OF KbX2V3ENAYf9ymcEuR3eOAse/ogEGAlLQtbzXo8GbdxiTZ2DWtOg/FtATSaCQKsr axELmwbeNzAfwkbvNKuzRdSZw= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id V8NcTNDfmePC for <32991@debbugs.gnu.org>; Tue, 15 Jan 2019 20:23:31 +0000 (UTC) Received: from gray (unknown [IPv6:2a02:1206:4519:d090:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id C99A5229E9; Tue, 15 Jan 2019 20:23:30 +0000 (UTC) Date: Tue, 15 Jan 2019 21:25:12 +0100 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Sun, 13 Jan 2019 18:33:15 -0500) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 Cc: 32991@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: charles@aurox.ch Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Date: Sun, 13 Jan 2019 18:33:15 -0500 > > > -(define-minor-mode diff-auto-refine-mode > > -[...] > > I think for backward compatiblity reason, we should keep this minor > mode, tho mark it obsolete and change its code to set diff-refine to > `navigation`. Good point, this is in the amended change below. > > -;; Define diff-{hunk,file}-{prev,next} > > -(easy-mmode-define-navigation > > - diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view > [...] > > +(defun diff-hunk-next (&optional count interactive) > [...] > > +(defun diff-hunk-prev (&optional count interactive) > > This change seems unrelated. I'd rather we stick to the refinement itself. Without this change, other functions in diff-mode (such as diff--font-lock-syntax) calling diff-hunk-next accidentally trigger hunk refinement if 'diff-refine' is 'navigation'. Hence we need a reliable way to tell whether the navigation has been caused by the user (i.e., with argument 'interactive' set to t) or the program ('interactive' set to nil). Incidentally, I left out the auto-recentering and buffer restriction-changing parts of the old diff-hunk-next and diff-hunk-prev, since these behaviors do not match other navigation commands. > > ;; Define smerge-next and smerge-prev > > (easy-mmode-define-navigation smerge smerge-begin-re "conflict" nil nil > > - (if diff-auto-refine-mode > > + (if (eq diff-refine 'navigation) > > (condition-case nil (smerge-refine) (error nil)))) > > Hmm... I want to set my `diff-refined` to `font-lock` yet I also want my > smerge conflicts to be refined when I navigate to them. > Maybe the test here should be just whether diff-refine is non-nil? Yes, I've fixed that below. Thanks for reviewing. * etc/NEWS (Diff mode): Explain renamed 'diff-refine' variable, mention deprecation and disabling of 'diff-auto-refine-mode', and explain user-visible changes to 'diff-hunk-next' and 'diff-hunk-prev'. * lisp/vc/diff-mode.el (diff-font-lock-refine): Rename to 'diff-refine' and allow choices nil, 'font-lock' and 'navigation'. (diff-auto-refine-mode): Disable it by default and make it set 'diff-refine' appropriately to keep backward compatibility. (diff-navigate-maybe-refine): New function for use in the new functions 'diff-hunk-next' and 'diff-hunk-prev'. (diff-hunk-next, diff-hunk-prev): Rewrite as defuns instead of using easy-mmode-define-navigation. Add a new optional argument 'interactive', which is needed to prevent other callers from inadvertently causing refinement to happen when 'diff-refine' is set to 'navigation'. Leave out the ability of these commands to change user narrowing and recenter the window, as this does not match the behavior of other general movement commands. (diff--font-lock-refined): Change it to only trigger when the new variable 'diff-refine' has the value 'font-lock'. * lisp/vc/smerge-mode.el (smerge-next, smerge-prev): Check that 'diff-refine' is set instead of checking 'diff-auto-refine-mode' when deciding whether to refine a conflict. ----- diff --git a/etc/NEWS b/etc/NEWS index bb214f2..86e89fd 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -428,8 +428,15 @@ values. and compares their entire trees. ** Diff mode -*** Hunks are now automatically refined by default. -To disable it, set the new defcustom 'diff-font-lock-refine' to nil. +*** Hunks are now automatically refined by font-lock. +To disable refinement, set the new defcustom 'diff-refine' to nil. +To get back the old behavior where hunks are refined as you navigate +through a diff, set 'diff-refine' to the symbol 'navigate'. +*** 'diff-auto-refine-mode' is deprecated in favor of 'diff-refine'. +It is no longer active by default. +*** 'diff-hunk-next' and 'diff-hunk-prev' +These commands no longer recenter the window or change the narrowing +of the buffer. +++ *** Better syntax highlighting of Diff hunks. diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 5d6cc6f..b5bed98 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -94,10 +94,18 @@ diff-mode-hook :type 'hook :options '(diff-delete-empty-files diff-make-unified)) -(defcustom diff-font-lock-refine t - "If non-nil, font-lock highlighting includes hunk refinement." +(defcustom diff-refine 'font-lock + "If non-nil, enable hunk refinement. + +The value `font-lock' means to refine during font-lock. +The value `navigation' means to refine each hunk as you visit it +with `diff-hunk-next' or `diff-hunk-prev'. + +You can always manually refine a hunk with `diff-refine-hunk'." :version "27.1" - :type 'boolean) + :type '(choice (const :tag "Don't refine hunks" nil) + (const :tag "Refine hunks during font-lock" font-lock) + (const :tag "Refine hunks during navigation" navigation))) (defcustom diff-font-lock-prettify nil "If non-nil, font-lock will try and make the format prettier." @@ -262,9 +270,15 @@ diff-auto-refine-mode changes in detail as the user visits hunks. When transitioning from disabled to enabled, it tries to refine the current hunk, as well." - :group 'diff-mode :init-value t :lighter nil ;; " Auto-Refine" - (when diff-auto-refine-mode - (condition-case-unless-debug nil (diff-refine-hunk) (error nil)))) + :group 'diff-mode :init-value nil :lighter nil ;; " Auto-Refine" + (if diff-auto-refine-mode + (progn + (customize-set-variable 'diff-refine 'navigation) + (condition-case-unless-debug nil (diff-refine-hunk) (error nil))) + (customize-set-variable 'diff-refine nil))) +(make-obsolete 'diff-auto-refine-mode "use `diff-refine' instead." "27.1") +(make-obsolete-variable 'diff-auto-refine-mode + "use `diff-refine' instead." "27.1") ;;;; ;;;; font-lock support @@ -619,26 +633,60 @@ diff-end-of-file (defvar diff--auto-refine-data nil) -;; Define diff-{hunk,file}-{prev,next} -(easy-mmode-define-navigation - diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view - (when diff-auto-refine-mode - (unless (prog1 diff--auto-refine-data - (setq diff--auto-refine-data - (cons (current-buffer) (point-marker)))) - (run-at-time 0.0 nil - (lambda () - (when diff--auto-refine-data - (let ((buffer (car diff--auto-refine-data)) - (point (cdr diff--auto-refine-data))) - (setq diff--auto-refine-data nil) - (with-local-quit - (when (buffer-live-p buffer) - (with-current-buffer buffer - (save-excursion - (goto-char point) - (diff-refine-hunk)))))))))))) - +(defun diff-navigate-maybe-refine () + "If `diff-refine' is set to `navigation', refine current hunk." + (when (eq diff-refine 'navigation) + (unless (prog1 diff--auto-refine-data + (setq diff--auto-refine-data + (cons (current-buffer) (point-marker)))) + (run-at-time 0.0 nil + (lambda () + (when diff--auto-refine-data + (let ((buffer (car diff--auto-refine-data)) + (point (cdr diff--auto-refine-data))) + (setq diff--auto-refine-data nil) + (with-local-quit + (when (buffer-live-p buffer) + (with-current-buffer buffer + (save-excursion + (goto-char point) + (diff-refine-hunk)))))))))))) + +(defun diff-hunk-next (&optional count interactive) + "Go to the next COUNT'th hunk. + +Interactively, COUNT is the prefix numeric argument, and defaults to 1. + +If INTERACTIVE is non-nil and `diff-refine' is set to +`navigation', refine the hunk moved to." + (interactive "p\np") + (unless count (setq count 1)) + (if (< count 0) + (diff-hunk-prev (- count)) + (if (looking-at diff-hunk-header-re) (setq count (1+ count))) + (if (not (re-search-forward diff-hunk-header-re nil t count)) + (if (looking-at diff-hunk-header-re) + (goto-char (diff-end-of-hunk)) + (user-error "No next hunk")) + (goto-char (match-beginning 0)) + (if interactive (diff-navigate-maybe-refine))))) + +(defun diff-hunk-prev (&optional count interactive) + "Go to the previous COUNT'th hunk. + +Interactively, COUNT is the prefix numeric argument, and defaults to 1. + +If INTERACTIVE is non-nil and `diff-refine' is set to +`navigation', refine the hunk moved to." + (interactive "p\np") + (unless count (setq count 1)) + (if (< count 0) + (diff-hunk-next (- count)) + (unless (re-search-backward diff-hunk-header-re nil t count) + (user-error "No previous hunk")) + (if interactive (diff-navigate-maybe-refine)))) + +;; Define diff-file-{prev,next} (easy-mmode-define-navigation diff-file diff-file-header-re "file" diff-end-of-file) @@ -2125,7 +2173,7 @@ diff--refine-hunk (defun diff--font-lock-refined (max) "Apply hunk refinement from font-lock." - (when diff-font-lock-refine + (when (eq diff-refine 'font-lock) (when (get-char-property (point) 'diff--font-lock-refined) ;; Refinement works over a complete hunk, whereas font-lock limits itself ;; to highlighting smallish chunks between point..max, so we may be diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index 569797e..7c1cd4f 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -44,7 +44,7 @@ ;;; Code: (eval-when-compile (require 'cl-lib)) -(require 'diff-mode) ;For diff-auto-refine-mode. +(require 'diff-mode) ;For diff-refine. (require 'newcomment) ;;; The real definition comes later. @@ -264,7 +264,7 @@ font-lock-keywords ;; Define smerge-next and smerge-prev (easy-mmode-define-navigation smerge smerge-begin-re "conflict" nil nil - (if diff-auto-refine-mode + (if diff-refine (condition-case nil (smerge-refine) (error nil)))) (defconst smerge-match-names ["conflict" "upper" "base" "lower"]) From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 30 16:17:51 2019 Received: (at 32991) by debbugs.gnu.org; 30 Jan 2019 21:17:51 +0000 Received: from localhost ([127.0.0.1]:51983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goxF0-0006fI-Sf for submit@debbugs.gnu.org; Wed, 30 Jan 2019 16:17:51 -0500 Received: from goldenrod.birch.relay.mailchannels.net ([23.83.209.74]:10877) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goxEz-0006f8-15 for 32991@debbugs.gnu.org; Wed, 30 Jan 2019 16:17:50 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A7DE4124098; Wed, 30 Jan 2019 21:17:47 +0000 (UTC) Received: from pdx1-sub0-mail-a25.g.dreamhost.com (unknown [100.96.35.77]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4906C1246D7; Wed, 30 Jan 2019 21:17:47 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a25.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Wed, 30 Jan 2019 21:17:47 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Cooperative-Imminent: 22ba7cba1a16054f_1548883067474_18846851 X-MC-Loop-Signature: 1548883067474:2739575982 X-MC-Ingress-Time: 1548883067474 Received: from pdx1-sub0-mail-a25.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a25.g.dreamhost.com (Postfix) with ESMTP id B8B2F80591; Wed, 30 Jan 2019 13:17:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=bsc6I8QIcSRqCaz2xbEf/VQwfTs=; b= pskNtmNai9tjTAttMHLkcR1kykFeaQZW3Pf7XRTCZiI+4Nlmb7WctiFDGmMBZAda evm/tbDmx7BjqAolonqfTkNw8LOVgyuXcz5Cx6Nc39Pa0eO/QEfJksLxWjLvasUE gbLJYxVCyqIgKApPcstRsaKbgYVdBPtBiihOghDyrwg= Received: from mail.jurta.org (m91-129-99-25.cust.tele2.ee [91.129.99.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a25.g.dreamhost.com (Postfix) with ESMTPSA id 59CF780587; Wed, 30 Jan 2019 13:17:40 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a25 From: Juri Linkov To: Stefan Monnier Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op Organization: LINKOV.NET References: Date: Wed, 30 Jan 2019 23:04:22 +0200 In-Reply-To: (Stefan Monnier's message of "Sun, 13 Jan 2019 18:33:15 -0500") Message-ID: <87sgx9n9gp.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledrjeeggddugeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdelledrvdehnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleelrddvhedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehmohhnnhhivghrsefktffqrdgfofhonhhtrhgvrghlrdevteenucevlhhushhtvghrufhiiigvpedu X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32991 Cc: "Charles A. Roelli" , 32991@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) >> ;; Define smerge-next and smerge-prev >> (easy-mmode-define-navigation smerge smerge-begin-re "conflict" nil nil >> - (if diff-auto-refine-mode >> + (if (eq diff-refine 'navigation) >> (condition-case nil (smerge-refine) (error nil)))) > > Hmm... I want to set my `diff-refined` to `font-lock` yet I also want my > smerge conflicts to be refined when I navigate to them. > Maybe the test here should be just whether diff-refine is non-nil? A similar option `font-lock` also makes sense for a new customizable variable with a name like `smerge-refine` that could automatically refine all smerge conflicts. The problem is that it's difficult to remember and type such key sequences `C-c ^ n` (smerge-next) and `C-c ^ R` (smerge-refine) It would be easier if smerge-mode refined all them automatically. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 01 02:39:12 2019 Received: (at 32991) by debbugs.gnu.org; 1 Feb 2019 07:39:12 +0000 Received: from localhost ([127.0.0.1]:53647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gpTPs-00018h-2L for submit@debbugs.gnu.org; Fri, 01 Feb 2019 02:39:12 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]:49110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gpTPo-00018X-6r for 32991@debbugs.gnu.org; Fri, 01 Feb 2019 02:39:10 -0500 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x117cpUo009609; Fri, 1 Feb 2019 02:38:53 -0500 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 4455DAE13D; Fri, 1 Feb 2019 02:38:51 -0500 (EST) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op Message-ID: References: <87sgx9n9gp.fsf@mail.linkov.net> Date: Fri, 01 Feb 2019 02:38:51 -0500 In-Reply-To: <87sgx9n9gp.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 30 Jan 2019 23:04:22 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6473=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6473> : inlines <7008> : streams <1811752> : uri <2788857> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 Cc: "Charles A. Roelli" , 32991@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > A similar option `font-lock` also makes sense for a new > customizable variable with a name like `smerge-refine` > that could automatically refine all smerge conflicts. FWIW, here's the reason why I haven't even looked into doing it automatically for smerge: IMO 2-way conflicts are worthless so I only care about 3-way conflicts, and for those I don't know how to display all 3 different "refinements" at the same time. IOW I too often need to use the cycling behavior of smerge-refine for a "font-lock" version to be sufficient. So if we implement a "font-lock" version of smerge-refine, we'll need to make sure it interacts well with subsequent manual smerge-refine cycling. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 03 06:33:24 2019 Received: (at 32991) by debbugs.gnu.org; 3 Feb 2019 11:33:24 +0000 Received: from localhost ([127.0.0.1]:56761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqG1b-0004s0-Uw for submit@debbugs.gnu.org; Sun, 03 Feb 2019 06:33:24 -0500 Received: from sinyavsky.aurox.ch ([37.35.109.145]:33107) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqG1Z-0004ri-Lc for 32991@debbugs.gnu.org; Sun, 03 Feb 2019 06:33:22 -0500 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 437A822A4B for <32991@debbugs.gnu.org>; Sun, 3 Feb 2019 11:39:15 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:reply-to:subject:subject:in-reply-to:to:from:from :message-id:date:date; s=dkim; t=1549193952; x=1550057953; bh=XW QM6NDrjE+xaZcempm74o6xw5slk3h+h2/AGvSZwNE=; b=aS+gsvttJLw2l4wa/J s3QpGb66zvA7WVzE3ka2eyI4ov6809Sj7xjQKmrsbNG+LG035alKn/gIaJeHbUbA He9WvXxPSocx5Sk+2KFwwvlXvCVg9GMBB+NffIrmluKv5nOlE3XpJAvOW23vP5uh TQbOIAhagtJCiWnCAF3aWtfNA= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 96Xxm2VRxQKp for <32991@debbugs.gnu.org>; Sun, 3 Feb 2019 11:39:12 +0000 (UTC) Received: from gray (unknown [IPv6:2a02:1206:4519:d090:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id EEB7822832; Sun, 3 Feb 2019 11:39:08 +0000 (UTC) Date: Sun, 03 Feb 2019 12:42:24 +0100 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Fri, 01 Feb 2019 02:38:51 -0500) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op References: <87sgx9n9gp.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 Cc: 32991@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: charles@aurox.ch Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Date: Fri, 01 Feb 2019 02:38:51 -0500 > > > A similar option `font-lock` also makes sense for a new > > customizable variable with a name like `smerge-refine` > > that could automatically refine all smerge conflicts. > > FWIW, here's the reason why I haven't even looked into doing it > automatically for smerge: IMO 2-way conflicts are worthless so I only > care about 3-way conflicts, and for those I don't know how to display > all 3 different "refinements" at the same time. IOW I too often need to > use the cycling behavior of smerge-refine for a "font-lock" version to > be sufficient. So if we implement a "font-lock" version of > smerge-refine, we'll need to make sure it interacts well with subsequent > manual smerge-refine cycling. Why are 2-way conflicts worthless? Automatically refining them could be helpful in some situations. By the way, does the updated change I sent in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32991#38 look okay to you? From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 03 07:37:51 2019 Received: (at 32991) by debbugs.gnu.org; 3 Feb 2019 12:37:51 +0000 Received: from localhost ([127.0.0.1]:56787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqH1z-00008z-Br for submit@debbugs.gnu.org; Sun, 03 Feb 2019 07:37:51 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:55509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqH1y-00008s-CV for 32991@debbugs.gnu.org; Sun, 03 Feb 2019 07:37:50 -0500 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x13Cbbg6018726; Sun, 3 Feb 2019 07:37:38 -0500 Received: by pastel.home (Postfix, from userid 20848) id F28386ABCC; Sun, 3 Feb 2019 07:37:36 -0500 (EST) From: Stefan Monnier To: charles@aurox.ch (Charles A. Roelli) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op Message-ID: References: <87sgx9n9gp.fsf@mail.linkov.net> Date: Sun, 03 Feb 2019 07:37:36 -0500 In-Reply-To: (Charles A. Roelli's message of "Sun, 03 Feb 2019 12:42:24 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 3 Rules triggered TRK_NCM1=0.1, EDT_SA_DN_PASS=0, RV6474=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6474> : inlines <7010> : streams <1811963> : uri <2790099> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 Cc: 32991@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > Why are 2-way conflicts worthless? Because they give less info than 3-way conflicts and they're generated from 3 files so you can "always" get the superior 3-way conflicts instead of the inferior 2-way ones. > By the way, does the updated change I sent in > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32991#38 look okay > to you? Haven't had a chance to look at it yet, Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 03 09:10:05 2019 Received: (at 32991) by debbugs.gnu.org; 3 Feb 2019 14:10:06 +0000 Received: from localhost ([127.0.0.1]:56798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqITF-0002Id-Dt for submit@debbugs.gnu.org; Sun, 03 Feb 2019 09:10:05 -0500 Received: from sinyavsky.aurox.ch ([37.35.109.145]:33238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqITA-0002Hz-O7 for 32991@debbugs.gnu.org; Sun, 03 Feb 2019 09:10:02 -0500 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 6C11C22A44 for <32991@debbugs.gnu.org>; Sun, 3 Feb 2019 14:15:52 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:reply-to:subject:subject:in-reply-to:to:from:from :message-id:date:date; s=dkim; t=1549203350; x=1550067351; bh=5Y ydDBr191T2z6OekhtYEPMmcvIXqEa5FGMleiBscgI=; b=ro3hUHqddHTOWtfaAh +6gRTVVthZNm15BJgOnfSsb+RL3bGt7T0wGxBBvgyYIBBgQNgs7LiIi+AvTwzqqs yX9atZ9JNqvCeXo4ckvxRdCfHKf5u9Oa8jKHGcR1Kb4DwbvyDKCMizRl9mKoVzZK +m/4YtzadvH+QcI3I51fPpEDY= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id swju20Dk0Qad for <32991@debbugs.gnu.org>; Sun, 3 Feb 2019 14:15:50 +0000 (UTC) Received: from gray (unknown [IPv6:2a02:1206:4519:d090:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id B6C2222832; Sun, 3 Feb 2019 14:15:49 +0000 (UTC) Date: Sun, 03 Feb 2019 15:19:04 +0100 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Sun, 03 Feb 2019 07:37:36 -0500) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op References: <87sgx9n9gp.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 Cc: 32991@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: charles@aurox.ch Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Date: Sun, 03 Feb 2019 07:37:36 -0500 > > > Why are 2-way conflicts worthless? > > Because they give less info than 3-way conflicts and they're generated > from 3 files so you can "always" get the superior 3-way conflicts > instead of the inferior 2-way ones. Oh, like the ones you can get by setting Git's "merge.conflictStyle" to "diff3". Makes sense. > > By the way, does the updated change I sent in > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32991#38 look okay > > to you? > > Haven't had a chance to look at it yet, > > > Stefan Okay, no rush. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 11 15:14:28 2019 Received: (at 32991) by debbugs.gnu.org; 11 Feb 2019 20:14:28 +0000 Received: from localhost ([127.0.0.1]:44137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtHyG-000456-F1 for submit@debbugs.gnu.org; Mon, 11 Feb 2019 15:14:28 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:44227) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtHyE-00044x-5F for 32991@debbugs.gnu.org; Mon, 11 Feb 2019 15:14:27 -0500 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x1BKECsJ028051; Mon, 11 Feb 2019 15:14:13 -0500 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id BE37CAE145; Mon, 11 Feb 2019 15:14:12 -0500 (EST) From: Stefan Monnier To: charles@aurox.ch (Charles A. Roelli) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op Message-ID: References: Date: Mon, 11 Feb 2019 15:14:12 -0500 In-Reply-To: (Charles A. Roelli's message of "Tue, 15 Jan 2019 21:25:12 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6480=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6480> : inlines <7015> : streams <1812756> : uri <2794757> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 Cc: 32991@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) >> This change seems unrelated. I'd rather we stick to the refinement itself. > Without this change, other functions in diff-mode (such as > diff--font-lock-syntax) calling diff-hunk-next accidentally trigger > hunk refinement if 'diff-refine' is 'navigation'. Ah, right, makes sense. Could we fix this more directly by using `called-interactively` instead? > Incidentally, I left out the auto-recentering and buffer > restriction-changing parts of the old diff-hunk-next and > diff-hunk-prev, since these behaviors do not match other navigation > commands. Indeed, I see several changes in there, which is why I'd rather we separate them into another patch. [ FWIW I never used the restriction (I coded it up only to mach the featureset of some earlier diff-mode I'd found somewhere), but I would miss the recentering. More to the point, rather than removing the recentering, I'd like to improve it (so it tries harder to make the whole hunk visible when possible). ] Other than that, LGTM. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 11 15:15:39 2019 Received: (at 32991) by debbugs.gnu.org; 11 Feb 2019 20:15:39 +0000 Received: from localhost ([127.0.0.1]:44141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtHzO-00047J-Sp for submit@debbugs.gnu.org; Mon, 11 Feb 2019 15:15:39 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]:47271) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtHzN-00047B-NY for 32991@debbugs.gnu.org; Mon, 11 Feb 2019 15:15:38 -0500 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x1BKFRUg021736; Mon, 11 Feb 2019 15:15:27 -0500 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 6ED87AE145; Mon, 11 Feb 2019 15:15:27 -0500 (EST) From: Stefan Monnier To: charles@aurox.ch (Charles A. Roelli) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op Message-ID: References: <87sgx9n9gp.fsf@mail.linkov.net> Date: Mon, 11 Feb 2019 15:15:27 -0500 In-Reply-To: (Charles A. Roelli's message of "Sun, 03 Feb 2019 15:19:04 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 3 Rules triggered GEN_SPAM_FEATRE=0.1, EDT_SA_DN_PASS=0, RV6480=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6480> : inlines <7015> : streams <1812756> : uri <2794758> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 Cc: 32991@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > Oh, like the ones you can get by setting Git's "merge.conflictStyle" > to "diff3". Makes sense. Is this setting still necessary? The mind boggles! Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 18 13:56:14 2019 Received: (at 32991) by debbugs.gnu.org; 18 Feb 2019 18:56:14 +0000 Received: from localhost ([127.0.0.1]:53202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvo5O-0001tA-8V for submit@debbugs.gnu.org; Mon, 18 Feb 2019 13:56:14 -0500 Received: from nestroy.aurox.ch ([82.195.237.20]:43454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvo5L-0001sv-NJ for 32991@debbugs.gnu.org; Mon, 18 Feb 2019 13:56:13 -0500 Received: from nestroy.aurox.ch (nestroy.aurox.ch [127.0.0.1]) by nestroy.aurox.ch (Postfix) with ESMTP id 443CkW1KDRzb11 for <32991@debbugs.gnu.org>; Mon, 18 Feb 2019 18:56:03 +0000 (UTC) Authentication-Results: nestroy.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:reply-to:subject:subject:in-reply-to:to:from:from :message-id:date:date; s=dkim2; t=1550516162; x=1553108163; bh=z S1+olox+q8ORIm/vOxpU1wH2NUffzLrSz0/DGbQBZE=; b=ZQZ/aJVb1cRXLbqCK LlEN4Bufk3H/MMKQyFJhl7cIF05AtyBXvoBKrpkmNSYBI+ywyxPV484CBBBF6/rJ 4odN1EVaZ8Qs+kgT9jcRuk2qkcIpWGMciIur4NIC+DV8JBO6rY2BL5QSdp5KHmeZ WjfHfSNZ8bnl4N9FwXddAr/gL8= X-Virus-Scanned: Debian amavisd-new at nestroy.aurox.ch Received: from nestroy.aurox.ch ([127.0.0.1]) by nestroy.aurox.ch (nestroy.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BgHhTE4WVmK2 for <32991@debbugs.gnu.org>; Mon, 18 Feb 2019 18:56:02 +0000 (UTC) Received: from gray (unknown [IPv6:2a02:1206:4512:5f50:c62c:3ff:fe30:b864]) by nestroy.aurox.ch (Postfix) with ESMTPSA id 443CkT5sx1zb0l; Mon, 18 Feb 2019 18:56:01 +0000 (UTC) Date: Mon, 18 Feb 2019 20:06:35 +0100 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Mon, 11 Feb 2019 15:14:12 -0500) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op References: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32991 Cc: 32991@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: charles@aurox.ch Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > From: Stefan Monnier > Date: Mon, 11 Feb 2019 15:14:12 -0500 > > >> This change seems unrelated. I'd rather we stick to the refinement itself. > > Without this change, other functions in diff-mode (such as > > diff--font-lock-syntax) calling diff-hunk-next accidentally trigger > > hunk refinement if 'diff-refine' is 'navigation'. > > Ah, right, makes sense. Could we fix this more directly by using > `called-interactively` instead? I think so, though I avoided that function because of the warnings in its documentation. Future callers of diff-hunk-prev/diff-hunk-next also have more flexibility if they can choose whether the call should be considered interactive or not. > Indeed, I see several changes in there, which is why I'd rather we > separate them into another patch. > > [ FWIW I never used the restriction (I coded it up only to mach the > featureset of some earlier diff-mode I'd found somewhere), but I would > miss the recentering. More to the point, rather than removing the > recentering, I'd like to improve it (so it tries harder to make the > whole hunk visible when possible). ] For a bit of background: I sometimes enable a minor mode in the ChangeLog buffer which narrows *vc-diff* (if displayed) to the changes of the file at point, like an rmail summary buffer with its corresponding message buffer. I'd like to eventually add this feature to add-log.el. The current diff-hunk-prev/diff-hunk-next change the narrowing of the buffer and thus cause some friction with this minor mode. That said, I could still add this new feature if I could disable the re-narrowing by, say, setting a buffer-local variable. I will update the patch to bring back the re-narrowing by default, and then add a defcustom for it in a second patch (ditto for the re-centering). > Other than that, LGTM. Thanks for the review. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 18 15:45:00 2019 Received: (at 32991) by debbugs.gnu.org; 18 Feb 2019 20:45:01 +0000 Received: from localhost ([127.0.0.1]:53247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvpme-00069C-Ko for submit@debbugs.gnu.org; Mon, 18 Feb 2019 15:45:00 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]:51801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvpmb-00068y-FH for 32991@debbugs.gnu.org; Mon, 18 Feb 2019 15:44:59 -0500 Received: from milanesa.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x1IKiARa014016; Mon, 18 Feb 2019 15:44:11 -0500 Received: by milanesa.home (Postfix, from userid 20848) id 06EBF66112; Mon, 18 Feb 2019 15:44:10 -0500 (EST) From: Stefan Monnier To: charles@aurox.ch (Charles A. Roelli) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op Message-ID: References: Date: Mon, 18 Feb 2019 15:44:09 -0500 In-Reply-To: (Charles A. Roelli's message of "Mon, 18 Feb 2019 20:06:35 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6485=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6485> : inlines <7018> : streams <1813425> : uri <2798427> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 Cc: 32991@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) >> Ah, right, makes sense. Could we fix this more directly by using >> `called-interactively` instead? > I think so, though I avoided that function because of the warnings in > its documentation. Yes, it's better to avoid it. But in this case, it's just a temporary situation in order to cut the patch into two chunks, so it's perfectly fine. > For a bit of background: I sometimes enable a minor mode in the > ChangeLog buffer which narrows *vc-diff* (if displayed) to the changes > of the file at point, like an rmail summary buffer with its > corresponding message buffer. I'd like to eventually add this feature > to add-log.el. The current diff-hunk-prev/diff-hunk-next change the > narrowing of the buffer and thus cause some friction with this minor > mode. As I said, I don't care much about this restriction "feature" of diff-hunk-prev/diff-hunk-next, so I think it's OK to just drop it. If some users then complain, we can see how to re-add it. > defcustom for it in a second patch (ditto for the re-centering). But the recentering is more important, IMO. And I don't quite see why you'd need a defcustom for it (I can see why you might only do the recentering when the function is called interactively, tho). Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 24 11:01:07 2019 Received: (at 32991) by debbugs.gnu.org; 24 Feb 2019 16:01:07 +0000 Received: from localhost ([127.0.0.1]:50345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gxwDD-0002m9-2I for submit@debbugs.gnu.org; Sun, 24 Feb 2019 11:01:07 -0500 Received: from nestroy.aurox.ch ([82.195.237.20]:33616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gxwDA-0002lX-WC for 32991@debbugs.gnu.org; Sun, 24 Feb 2019 11:01:06 -0500 Received: from nestroy.aurox.ch (nestroy.aurox.ch [127.0.0.1]) by nestroy.aurox.ch (Postfix) with ESMTP id 446qYj3BL2zgK3 for <32991@debbugs.gnu.org>; Sun, 24 Feb 2019 16:00:57 +0000 (UTC) Authentication-Results: nestroy.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:reply-to:subject:subject:in-reply-to:to:from:from :message-id:date:date; s=dkim2; t=1551024055; x=1553616056; bh=8 /CS5xDDWGEA3DCWcjUPPDIP6GXVkOkR9wu0osw0y28=; b=Z5TxlnlX2Ighux28g XL0olWJ3spkcYLBGIrrROHr9uB7fTbo4ktgxoLgl0jTPMoUUqQgRmw+sHH8gyEwK pfsQiPZ775/BcAxr/kGlzvZO432zQpVh96yqeQO8GpUP0nhW4s8NHnLWUuQEqpH2 4UWpdndEFXPLT/3TVtJZSL+9DI= X-Virus-Scanned: Debian amavisd-new at nestroy.aurox.ch Received: from nestroy.aurox.ch ([127.0.0.1]) by nestroy.aurox.ch (nestroy.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id W0__NS5PGVXI for <32991@debbugs.gnu.org>; Sun, 24 Feb 2019 16:00:55 +0000 (UTC) Received: from gray (unknown [IPv6:2a02:1206:4512:5f50:c62c:3ff:fe30:b864]) by nestroy.aurox.ch (Postfix) with ESMTPSA id 446qYg4ZcNzgJq; Sun, 24 Feb 2019 16:00:55 +0000 (UTC) Date: Sun, 24 Feb 2019 17:12:13 +0100 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Mon, 18 Feb 2019 15:44:09 -0500) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 Cc: 32991@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: charles@aurox.ch Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Date: Mon, 18 Feb 2019 15:44:09 -0500 > > Yes, it's better to avoid it. But in this case, it's just a temporary > situation in order to cut the patch into two chunks, so it's perfectly fine. Right, here is the first part. I noticed another use of diff-auto-refine-mode (in admin/gitmerge.el) and its info documentation, so I've updated those too. >From 2f393b95ad8912dc1f7908365766b200fc59cfe9 Mon Sep 17 00:00:00 2001 From: "Charles A. Roelli" Date: Sun, 24 Feb 2019 16:13:13 +0100 Subject: [PATCH] Merge diff-font-lock-refine and diff-auto-refine-mode into diff-refine This change was discussed in Bug#32991. * admin/gitmerge.el (gitmerge-resolve): Bind 'diff-refine' instead of 'diff-auto-refine-mode' to nil. * doc/emacs/files.texi (Diff Mode): Explain 'diff-refine' instead of 'diff-auto-refine-mode' in the documentation of 'diff-hunk-next' and 'diff-hunk-prev'. Mention in the documentation of 'diff-refine-hunk' that refining is already done by default. * etc/NEWS (Diff mode): Explain renamed 'diff-refine' variable and mention deprecation and disabling of 'diff-auto-refine-mode'. * lisp/vc/diff-mode.el (diff-font-lock-refine): Rename to 'diff-refine' and allow choices nil, 'font-lock' and 'navigation'. (diff-auto-refine-mode): Disable it by default, make it obsolete and make it set 'diff-refine' appropriately to keep backward compatibility. (diff-hunk-next, diff-hunk-prev): Adapt to rename of diff-auto-refine-mode and ensure that refining only happens when calling these commands interactively. (diff--font-lock-refined): Adapt to rename of diff-font-lock-refine. * lisp/vc/smerge-mode.el (smerge-next, smerge-prev): Check that 'diff-refine' is set instead of checking 'diff-auto-refine-mode' when deciding whether to refine a conflict. --- admin/gitmerge.el | 2 +- doc/emacs/files.texi | 28 +++++++++++++--------------- etc/NEWS | 11 +++++++++-- lisp/vc/diff-mode.el | 30 ++++++++++++++++++++++-------- lisp/vc/smerge-mode.el | 4 ++-- 5 files changed, 47 insertions(+), 28 deletions(-) diff --git a/admin/gitmerge.el b/admin/gitmerge.el index 4854862..edf4379 100644 --- a/admin/gitmerge.el +++ b/admin/gitmerge.el @@ -294,7 +294,7 @@ gitmerge-resolve ((derived-mode-p 'change-log-mode) ;; Fix up dates before resolving the conflicts. (goto-char (point-min)) - (let ((diff-auto-refine-mode nil)) + (let ((diff-refine nil)) (while (re-search-forward smerge-begin-re nil t) (smerge-match-conflict) (smerge-ensure-match 3) diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index d12d1ed..a574282 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -1461,26 +1461,19 @@ Diff Mode Move to the next hunk-start (@code{diff-hunk-next}). With prefix argument @var{n}, move forward to the @var{n}th next hunk. -@findex diff-auto-refine-mode -@cindex mode, Diff Auto-Refine -@cindex Diff Auto-Refine mode -This command has a side effect: it @dfn{refines} the hunk you move to, -highlighting its changes with better granularity. To disable this -feature, type @kbd{M-x diff-auto-refine-mode} to toggle off the minor -mode Diff Auto-Refine mode. To disable Diff Auto-Refine mode by -default, add this to your init file (@pxref{Hooks}): - -@example -(add-hook 'diff-mode-hook - (lambda () (diff-auto-refine-mode -1))) -@end example +@vindex diff-refine +By default, Diff mode @dfn{refines} hunks as Emacs displays them, +highlighting their changes with better granularity. Alternatively, if +you set @code{diff-refine} to the symbol @code{navigation}, Diff mode +only refines the hunk you move to with this command or with +@code{diff-hunk-prev}. @item M-p @findex diff-hunk-prev Move to the previous hunk-start (@code{diff-hunk-prev}). With prefix argument @var{n}, move back to the @var{n}th previous hunk. Like -@kbd{M-n}, this has the side-effect of refining the hunk you move to, -unless you disable Diff Auto-Refine mode. +@kbd{M-n}, this command refines the hunk you move to if you set +@code{diff-refine} to the symbol @code{navigation}. @item M-@} @findex diff-file-next @@ -1518,6 +1511,11 @@ Diff Mode (@code{diff-refine-hunk}). This allows you to see exactly which parts of each changed line were actually changed. +@vindex diff-refine +By default, Diff mode refines hunks as Emacs displays them, so you may +find this command useful if you customize @code{diff-refine} to a +non-default value. + @item C-c C-c @findex diff-goto-source @vindex diff-jump-to-old-file diff --git a/etc/NEWS b/etc/NEWS index 253da49..653ea43 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -458,8 +458,15 @@ and compares their entire trees. to hg revert. ** Diff mode -*** Hunks are now automatically refined by default. -To disable it, set the new defcustom 'diff-font-lock-refine' to nil. ++++ +*** Hunks are now automatically refined by font-lock. +To disable refinement, set the new defcustom 'diff-refine' to nil. +To get back the old behavior where hunks are refined as you navigate +through a diff, set 'diff-refine' to the symbol 'navigate'. ++++ +*** 'diff-auto-refine-mode' is deprecated in favor of 'diff-refine'. +It is no longer enabled by default and binding it no longer has any +effect. +++ *** Better syntax highlighting of Diff hunks. diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index bad5639..b5ef209 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -94,10 +94,18 @@ diff-mode-hook :type 'hook :options '(diff-delete-empty-files diff-make-unified)) -(defcustom diff-font-lock-refine t - "If non-nil, font-lock highlighting includes hunk refinement." +(defcustom diff-refine 'font-lock + "If non-nil, enable hunk refinement. + +The value `font-lock' means to refine during font-lock. +The value `navigation' means to refine each hunk as you visit it +with `diff-hunk-next' or `diff-hunk-prev'. + +You can always manually refine a hunk with `diff-refine-hunk'." :version "27.1" - :type 'boolean) + :type '(choice (const :tag "Don't refine hunks" nil) + (const :tag "Refine hunks during font-lock" font-lock) + (const :tag "Refine hunks during navigation" navigation))) (defcustom diff-font-lock-prettify nil "If non-nil, font-lock will try and make the format prettier." @@ -262,9 +270,15 @@ diff-auto-refine-mode changes in detail as the user visits hunks. When transitioning from disabled to enabled, it tries to refine the current hunk, as well." - :group 'diff-mode :init-value t :lighter nil ;; " Auto-Refine" - (when diff-auto-refine-mode - (condition-case-unless-debug nil (diff-refine-hunk) (error nil)))) + :group 'diff-mode :init-value nil :lighter nil ;; " Auto-Refine" + (if diff-auto-refine-mode + (progn + (customize-set-variable 'diff-refine 'navigation) + (condition-case-unless-debug nil (diff-refine-hunk) (error nil))) + (customize-set-variable 'diff-refine nil))) +(make-obsolete 'diff-auto-refine-mode "set `diff-refine' instead." "27.1") +(make-obsolete-variable 'diff-auto-refine-mode + "set `diff-refine' instead." "27.1") ;;;; ;;;; font-lock support @@ -622,7 +636,7 @@ diff--auto-refine-data ;; Define diff-{hunk,file}-{prev,next} (easy-mmode-define-navigation diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view - (when diff-auto-refine-mode + (when (and (eq diff-refine 'navigation) (called-interactively-p 'interactive)) (unless (prog1 diff--auto-refine-data (setq diff--auto-refine-data (cons (current-buffer) (point-marker)))) @@ -2145,7 +2159,7 @@ diff--iterate-hunks (defun diff--font-lock-refined (max) "Apply hunk refinement from font-lock." - (when diff-font-lock-refine + (when (eq diff-refine 'font-lock) (when (get-char-property (point) 'diff--font-lock-refined) ;; Refinement works over a complete hunk, whereas font-lock limits itself ;; to highlighting smallish chunks between point..max, so we may be diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index 02cee44..6b1df66 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -44,7 +44,7 @@ ;;; Code: (eval-when-compile (require 'cl-lib)) -(require 'diff-mode) ;For diff-auto-refine-mode. +(require 'diff-mode) ;For diff-refine. (require 'newcomment) ;;; The real definition comes later. @@ -264,7 +264,7 @@ font-lock-keywords ;; Define smerge-next and smerge-prev (easy-mmode-define-navigation smerge smerge-begin-re "conflict" nil nil - (if diff-auto-refine-mode + (if diff-refine (condition-case nil (smerge-refine) (error nil)))) (defconst smerge-match-names ["conflict" "upper" "base" "lower"]) -- 2.9.4 > As I said, I don't care much about this restriction "feature" of > diff-hunk-prev/diff-hunk-next, so I think it's OK to just drop it. > If some users then complain, we can see how to re-add it. > > > defcustom for it in a second patch (ditto for the re-centering). > > But the recentering is more important, IMO. And I don't quite see why > you'd need a defcustom for it (I can see why you might only do the > recentering when the function is called interactively, tho). Okay, I'm fine with removing the re-narrowing too if there are no objections. I'd still like to add a defcustom for the recentering, to allow navigation in Diff mode buffers that respects scroll-related variables. But I think I will open a different bug for these issues, since this one is nearly fixed. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 27 10:05:24 2019 Received: (at 32991) by debbugs.gnu.org; 27 Feb 2019 15:05:24 +0000 Received: from localhost ([127.0.0.1]:54146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gz0lw-00009E-FC for submit@debbugs.gnu.org; Wed, 27 Feb 2019 10:05:24 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]:48990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gz0lp-000092-M7 for 32991@debbugs.gnu.org; Wed, 27 Feb 2019 10:05:19 -0500 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x1RF4Zh4006245; Wed, 27 Feb 2019 10:04:36 -0500 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 25CC8AE0E9; Wed, 27 Feb 2019 10:04:35 -0500 (EST) From: Stefan Monnier To: charles@aurox.ch (Charles A. Roelli) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op Message-ID: References: Date: Wed, 27 Feb 2019 10:04:35 -0500 In-Reply-To: (Charles A. Roelli's message of "Sun, 24 Feb 2019 17:12:13 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6492=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6492> : inlines <7024> : streams <1814260> : uri <2803117> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 Cc: 32991@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > Right, here is the first part. I noticed another use of > diff-auto-refine-mode (in admin/gitmerge.el) and its info > documentation, so I've updated those too. LGTM. > Okay, I'm fine with removing the re-narrowing too if there are no > objections. No objection from me. > I'd still like to add a defcustom for the recentering, to allow > navigation in Diff mode buffers that respects scroll-related > variables. But I think I will open a different bug for these issues, > since this one is nearly fixed. Yes, let's please first treat it as a bug. Maybe we won't be able to fix it without disabling recentering here, in which case we'll add a defcustom for it, but maybe we can make it recenter *and* obey your scroll settings at the same time. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 03 15:40:04 2019 Received: (at 32991) by debbugs.gnu.org; 3 Mar 2019 20:40:04 +0000 Received: from localhost ([127.0.0.1]:58726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0Xtz-0002Cr-Oj for submit@debbugs.gnu.org; Sun, 03 Mar 2019 15:40:04 -0500 Received: from nestroy.aurox.ch ([82.195.237.20]:56010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0Xtw-0002CF-Sd for 32991@debbugs.gnu.org; Sun, 03 Mar 2019 15:40:01 -0500 Received: from nestroy.aurox.ch (nestroy.aurox.ch [127.0.0.1]) by nestroy.aurox.ch (Postfix) with ESMTP id 44CFQK0zQCzkg4 for <32991@debbugs.gnu.org>; Sun, 3 Mar 2019 20:39:53 +0000 (UTC) Authentication-Results: nestroy.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:reply-to:subject:subject:in-reply-to:to:from:from :message-id:date:date; s=dkim2; t=1551645591; x=1554237592; bh=T MS5oWQTC0vnQQaGUU8dt0Fyfv5//Cslg5s3C0vsPxs=; b=PrWdwBylJQdlk9290 /+r90MsXhknATLf1BcT26Y5+rpDn7XFac+kMM3DIltrJ+y/aOPRk3+TIHN48hH9o 9FSKe0q4kzEIEsRosD73fFSAv5jbdGcJS1SxWUs7spJ30n1hLt151rqF4EXD35XK 2Thh7PTc2Q5vCRuMm8cmTbeDVs= X-Virus-Scanned: Debian amavisd-new at nestroy.aurox.ch Received: from nestroy.aurox.ch ([127.0.0.1]) by nestroy.aurox.ch (nestroy.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id eiC2rgunoMR4 for <32991@debbugs.gnu.org>; Sun, 3 Mar 2019 20:39:51 +0000 (UTC) Received: from gray (unknown [IPv6:2a02:1206:4512:5f50:c62c:3ff:fe30:b864]) by nestroy.aurox.ch (Postfix) with ESMTPSA id 44CFQH3pL3zkfq; Sun, 3 Mar 2019 20:39:51 +0000 (UTC) Date: Sun, 03 Mar 2019 21:51:55 +0100 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Wed, 27 Feb 2019 10:04:35 -0500) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 Cc: 32991@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: charles@aurox.ch Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Date: Wed, 27 Feb 2019 10:04:35 -0500 > > > Right, here is the first part. I noticed another use of > > diff-auto-refine-mode (in admin/gitmerge.el) and its info > > documentation, so I've updated those too. > > LGTM. Thanks, I've pushed it to master. > > I'd still like to add a defcustom for the recentering, to allow > > navigation in Diff mode buffers that respects scroll-related > > variables. But I think I will open a different bug for these issues, > > since this one is nearly fixed. > > Yes, let's please first treat it as a bug. Maybe we won't be able to > fix it without disabling recentering here, in which case we'll add > a defcustom for it, but maybe we can make it recenter *and* obey your > scroll settings at the same time. Ok, I've sent a bug for the recentering. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 03 16:23:53 2019 Received: (at control) by debbugs.gnu.org; 3 Mar 2019 21:23:53 +0000 Received: from localhost ([127.0.0.1]:58734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0YaP-0003BS-FB for submit@debbugs.gnu.org; Sun, 03 Mar 2019 16:23:53 -0500 Received: from nestroy.aurox.ch ([82.195.237.20]:56240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0YaN-0003BD-Gw for control@debbugs.gnu.org; Sun, 03 Mar 2019 16:23:52 -0500 Received: from nestroy.aurox.ch (nestroy.aurox.ch [127.0.0.1]) by nestroy.aurox.ch (Postfix) with ESMTP id 44CGNw5R5Czkgk for ; Sun, 3 Mar 2019 21:23:44 +0000 (UTC) Authentication-Results: nestroy.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= reply-to:subject:subject:to:from:from:message-id:date:date; s= dkim2; t=1551648224; x=1554240225; bh=vmE0ogNrQFyitzVrhdjKqup0qE oVZflR8lnQN3m1Gkc=; b=ASR1LH3Ee3hLsJdSss8VY9tp3XOJzOzKpmxJWt6F5z aTeuRgjlx2CovxQc56FyNa7g1rH7/i324ben4BNqC0iNfR8g+ku2udRIFr4wlP8K aXygDJMESApM+zeESujZfkWLCI0IqkcsGJ8SMKQ/w1J8+ZsCISiOs8V2NrbYqvEu w= X-Virus-Scanned: Debian amavisd-new at nestroy.aurox.ch Received: from nestroy.aurox.ch ([127.0.0.1]) by nestroy.aurox.ch (nestroy.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id xHvaEkU2kycp for ; Sun, 3 Mar 2019 21:23:44 +0000 (UTC) Received: from gray (unknown [IPv6:2a02:1206:4512:5f50:c62c:3ff:fe30:b864]) by nestroy.aurox.ch (Postfix) with ESMTPSA id 44CGNv65dxzkgc for ; Sun, 3 Mar 2019 21:23:43 +0000 (UTC) Date: Sun, 03 Mar 2019 22:35:49 +0100 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: control@debbugs.gnu.org Subject: 32991 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: charles@aurox.ch Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 32991 fixed close 32991 27.1 quit From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 05 17:15:04 2019 Received: (at 32991) by debbugs.gnu.org; 5 Mar 2019 22:15:04 +0000 Received: from localhost ([127.0.0.1]:33557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1IL2-0003OC-AF for submit@debbugs.gnu.org; Tue, 05 Mar 2019 17:15:04 -0500 Received: from bisque.maple.relay.mailchannels.net ([23.83.214.18]:12752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1IL0-0003Ne-DY for 32991@debbugs.gnu.org; Tue, 05 Mar 2019 17:15:03 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 49959684B3A; Tue, 5 Mar 2019 22:15:01 +0000 (UTC) Received: from pdx1-sub0-mail-a46.g.dreamhost.com (unknown [100.96.20.153]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 0FBB2684B16; Tue, 5 Mar 2019 22:15:01 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a46.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.3); Tue, 05 Mar 2019 22:15:01 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Versed-Eight: 6e18559d7c3e77d7_1551824101157_300984570 X-MC-Loop-Signature: 1551824101157:2110737339 X-MC-Ingress-Time: 1551824101156 Received: from pdx1-sub0-mail-a46.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a46.g.dreamhost.com (Postfix) with ESMTP id BFC1580273; Tue, 5 Mar 2019 14:15:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=/RSWgJAIKThEbkQYTX9d9j5QxWE=; b= LFmKnTEN1Hb3YoDG2uEpwJtxfnKgLMeDDNXqJIz+4KxuIXoA6ADSVPGr5CvO8SMX lHj/RXNJ+e51zFJ7zucxlRHYgOqxULIOcgjeTU+t6C8lH6/HdqS42Nrpihx58WvB jwBeAQ7P4NlNcK8GhKz45M2ize629TXev3fdK+o4SL0= Received: from mail.jurta.org (m91-129-98-103.cust.tele2.ee [91.129.98.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a46.g.dreamhost.com (Postfix) with ESMTPSA id 6E06E80268; Tue, 5 Mar 2019 14:14:54 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a46 From: Juri Linkov To: charles@aurox.ch (Charles A. Roelli) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op Organization: LINKOV.NET References: Date: Tue, 05 Mar 2019 23:38:01 +0200 In-Reply-To: (Charles A. Roelli's message of "Sun, 03 Mar 2019 21:51:55 +0100") Message-ID: <87k1hd5a6u.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedutddrfeefgdduiedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdelkedruddtfeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdelkedruddtfedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegthhgrrhhlvghssegruhhrohigrdgthhenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32991 Cc: Stefan Monnier , 32991@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) > Thanks, I've pushed it to master. Do you think bug#32460 is also fixed by your change? From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 07 14:11:06 2019 Received: (at 32991) by debbugs.gnu.org; 7 Mar 2019 19:11:06 +0000 Received: from localhost ([127.0.0.1]:35614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1yQ6-00070b-GP for submit@debbugs.gnu.org; Thu, 07 Mar 2019 14:11:06 -0500 Received: from nestroy.aurox.ch ([82.195.237.20]:41754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1yQ4-000705-Ev for 32991@debbugs.gnu.org; Thu, 07 Mar 2019 14:11:04 -0500 Received: from nestroy.aurox.ch (nestroy.aurox.ch [127.0.0.1]) by nestroy.aurox.ch (Postfix) with ESMTP id 44FgFt1P0qznCS for <32991@debbugs.gnu.org>; Thu, 7 Mar 2019 19:10:58 +0000 (UTC) Authentication-Results: nestroy.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:reply-to:subject:subject:in-reply-to:to:from:from :message-id:date:date; s=dkim2; t=1551985857; x=1554577858; bh=2 Vj08VNuYI4DHL+eCW3foa1GOXxQp22uRVOqcMZ+d1g=; b=k9iJWgerlV5da+FqL nmceCou3l1m0anC+JtrURea3AFYF7pkDfsyY5RaQiHm84hfZI8adDKm4hPvUNSgz YpsiJWkw+gthPqEgb3yf2HPJLZ0edh+dzAwc+P7rJKK3yPv0ORtb4umY26UnK2JZ reRztQ8HK3oGAypDli+cUwuuPc= X-Virus-Scanned: Debian amavisd-new at nestroy.aurox.ch Received: from nestroy.aurox.ch ([127.0.0.1]) by nestroy.aurox.ch (nestroy.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id h_bH93CNGhdq for <32991@debbugs.gnu.org>; Thu, 7 Mar 2019 19:10:57 +0000 (UTC) Received: from gray (unknown [IPv6:2a02:1206:4512:5f50:c62c:3ff:fe30:b864]) by nestroy.aurox.ch (Postfix) with ESMTPSA id 44FgFs0SdvznC8; Thu, 7 Mar 2019 19:10:56 +0000 (UTC) Date: Thu, 07 Mar 2019 20:23:24 +0100 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: Juri Linkov In-reply-to: <87k1hd5a6u.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 05 Mar 2019 23:38:01 +0200) Subject: Re: bug#32991: 27.0.50; diff-auto-refine-mode a no-op References: <87k1hd5a6u.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32991 Cc: monnier@IRO.UMontreal.CA, 32991@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: charles@aurox.ch Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Date: Tue, 05 Mar 2019 23:38:01 +0200 > > Do you think bug#32460 is also fixed by your change? I think so. It looks like that bug was caused by an unfortunate interaction of diff-font-lock-refine and diff-auto-refine-mode. I'll close it for now, and thank you for pointing this out. From unknown Thu Jun 19 14:06:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 05 Apr 2019 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator