From unknown Fri Aug 15 14:16:53 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#16798 <16798@debbugs.gnu.org> To: bug#16798 <16798@debbugs.gnu.org> Subject: Status: Diff could also show the changes within lines Reply-To: bug#16798 <16798@debbugs.gnu.org> Date: Fri, 15 Aug 2025 21:16:53 +0000 retitle 16798 Diff could also show the changes within lines reassign 16798 emacs submitter 16798 "Sebastien Vauban" severity 16798 wishlist tag 16798 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 18 14:23:35 2014 Received: (at submit) by debbugs.gnu.org; 18 Feb 2014 19:23:35 +0000 Received: from localhost ([127.0.0.1]:58904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WFqGU-0003p3-T5 for submit@debbugs.gnu.org; Tue, 18 Feb 2014 14:23:35 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50620) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WFqGT-0003oo-1Q for submit@debbugs.gnu.org; Tue, 18 Feb 2014 14:23:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFqGF-0003Il-Fp for submit@debbugs.gnu.org; Tue, 18 Feb 2014 14:23:27 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFqGF-0003Ih-D1 for submit@debbugs.gnu.org; Tue, 18 Feb 2014 14:23:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFqG9-0005mF-Ci for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 14:23:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFqG3-0003HN-E7 for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 14:23:13 -0500 Received: from dd5e0353a.access.telenet.be ([213.224.53.58]:53962 helo=mail.missioncriticalit.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFqG3-0003HE-7S for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 14:23:07 -0500 Received: from MUNDANEUM.i-did-not-set--mail-host-address--so-tickle-me (unknown [10.10.4.62]) by mail.missioncriticalit.com (Postfix) with ESMTPS id DE959500014 for ; Tue, 18 Feb 2014 20:23:05 +0100 (CET) From: "Sebastien Vauban" To: bug-gnu-emacs@gnu.org Subject: Diff could also show the changes within lines Organization: Sebastien Vauban X-Url: Under construction... X-Archive: encrypt Date: Tue, 18 Feb 2014 20:22:54 +0100 Message-ID: <86mwhorzsh.fsf@somewhere.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) Hello, As suggested by Michael Heerdegen and Stefan, here's a request for a patch which would make `diff-mode' always perform refined highlighting. That means that it should be called from `font-lock-keywords'. Best regards, Seb -- Sebastien Vauban From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 11 20:28:56 2018 Received: (at control) by debbugs.gnu.org; 12 Jul 2018 00:28:56 +0000 Received: from localhost ([127.0.0.1]:56085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdPTc-0002J5-Cj for submit@debbugs.gnu.org; Wed, 11 Jul 2018 20:28:56 -0400 Received: from mail-it0-f48.google.com ([209.85.214.48]:55633) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdPTb-0002Iq-AL; Wed, 11 Jul 2018 20:28:55 -0400 Received: by mail-it0-f48.google.com with SMTP id 16-v6so4882089itl.5; Wed, 11 Jul 2018 17:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=E7/kTgHKTXCfupfijdBofeXLt2Si55/QfWQafReTof4=; b=NHaZ/D/e1/1rmEnP2Vl+S2YCYS1J9RAosq415olUX5NLc3aGMd1rY9goXZfPgHwWnT 3AkywWtNmAtMTVKrQdUtM9OGVRk1xTSdu1DNk6U5WcTOCU4R19rKFsw5B9jXX4JKLm5r 826Ykn1nDrLNlX5Ofr9qNt1AUrGYJn4z2+khxFfQnGYEvabZLiFuu5DIKw5YSK6R+Sjv fsCc1XELygPJXzkp8QPDdPpOeNlMZUI3zmdBRm4LANA1bSBqWTJNyED+NrhQhWCN6qzA 6CP591+RhDvGlXulJQq/mL1cA84tdOUJE6slSF2ZDmNX+TtDDlrFmedule9/N6ANkWDG UKCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=E7/kTgHKTXCfupfijdBofeXLt2Si55/QfWQafReTof4=; b=KYUFz3UUiCaTqdQGsnj4s/2GvG3kcffD2yz0uQDjBWYfkMQ0GMGtoreW8pg+3jYhHR ITvJux2O6OnPiVws1u+J8IVq9OT6zr7CziSOHGVmvirh1W0BQOLE/TDCkezK9mIdIPgX YZYgnIhlcRWOaJdnxOJ+1dstNuilzB2AOaTH1dtqPsnDUmMiRdY1yMewZDGjlUqWnv1T 2HsDGDSLPaTABN/tTci8QWJLRVd7HbOQiyOi3FXSGqVz0314SiL1QVZIo0RmXCN20Ewi ndVHWbP6AtdkPg67hGKxGPNAZEtWW843+u9MMOLCmjR662Nr1hilF+zmo29led5XhsIJ OeVQ== X-Gm-Message-State: AOUpUlGSoZAn4OL0LyhMUE4bVY/9Bt/M5D+cSCEZ+zzVsOjirTifpY9A DYoqqfOslonJkoYq7EacZ9brBA== X-Google-Smtp-Source: AAOMgpd7o2eJXFdZr7zNeULw5y8EgrryKDdgv8BBzmJFM20LY8VFtDEOdl4Fx/hu6R6sannCmHKKeQ== X-Received: by 2002:a02:45cd:: with SMTP id o74-v6mr23206jad.43.1531355329728; Wed, 11 Jul 2018 17:28:49 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id m7-v6sm6350409iog.30.2018.07.11.17.28.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Jul 2018 17:28:48 -0700 (PDT) From: Noam Postavsky To: Stefan Monnier Subject: Re: bug#12747: 23.4; diff-auto-refine-mode process only last hunk in diff (must ALL). References: <87y5iqbxqn.fsf@gavenkoa.example.com> Date: Wed, 11 Jul 2018 20:28:47 -0400 In-Reply-To: (Stefan Monnier's message of "Sun, 28 Oct 2012 09:54:22 -0400") Message-ID: <87601lb8lc.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control Cc: 12747@debbugs.gnu.org, Oleksandr Gavenko 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 (-) --=-=-= Content-Type: text/plain merge 12747 16798 18128 21744 tags 12747 fixed close 12747 27.1 quit Stefan Monnier writes: > This is not a bug. IIUC you'd like the refinement to be done in any > hunk that is ever displayed, right? > If so, that is a valid request for enhancement, and I fully agree. > If someone is interested in implementing it, here's how I think it would > have to work: > - add a font-lock-keywords rule in diff-mode which simply registers the > region displayed in a buffer-local var `diff--regions-displayed'. > - have an idle timer that checks `diff--regions-displayed' and refines > all the hunks in those regions (and it should also font-lock those > hunks at the same time, so that if some of the hunk is not yet > displayed and not yet font-locked, displaying it later on won't cause > re-refining the hunk). I think you've implemented this now [1: f8b1e40fb6], though not quite in the way you describe (I don't see any timers). [1: f8b1e40fb6]: 2018-07-10 22:52:21 -0400 * lisp/vc/diff-mode.el: Perform hunk refinement from font-lock https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=f8b1e40fb63b0a6bc6692cc0bc84e5f5e65c2644 This reminds that magit users found binding write-region-inhibit-fsync around smerge-refine-regions made a noticable performance difference. So should we add something like this? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Speed-up-smerge-refine-regions-by-avoiding-fsync.patch Content-Description: patch >From e5f3cf973c37ddaca92cc819d95d896ca0d869c7 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 11 Jul 2018 20:13:25 -0400 Subject: [PATCH] Speed up smerge-refine-regions by avoiding fsync * lisp/vc/smerge-mode.el (smerge-refine-regions): Bind write-region-inhibit-fsync to t. --- lisp/vc/smerge-mode.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index cb51fbab8e..cb9880c80d 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -1075,9 +1075,10 @@ smerge-refine-regions (if smerge-refine-weight-hack (make-hash-table :test #'equal)))) (unless (markerp beg1) (setq beg1 (copy-marker beg1))) (unless (markerp beg2) (setq beg2 (copy-marker beg2))) - ;; Chop up regions into smaller elements and save into files. - (smerge--refine-chopup-region beg1 end1 file1 preproc) - (smerge--refine-chopup-region beg2 end2 file2 preproc) + (let ((write-region-inhibit-fsync t)) ; Don't fsync temp files. + ;; Chop up regions into smaller elements and save into files. + (smerge--refine-chopup-region beg1 end1 file1 preproc) + (smerge--refine-chopup-region beg2 end2 file2 preproc)) ;; Call diff on those files. (unwind-protect -- 2.11.0 --=-=-=-- From unknown Fri Aug 15 14:16:53 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, 10 Aug 2018 11:24:05 +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