From unknown Sat Aug 16 16:54:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12747: 23.4; diff-auto-refine-mode process only last hunk in diff (must ALL). Resent-From: Oleksandr Gavenko Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Oct 2012 12:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 12747@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.135142656714053 (code B ref -1); Sun, 28 Oct 2012 12:17:01 +0000 Received: (at submit) by debbugs.gnu.org; 28 Oct 2012 12:16:07 +0000 Received: from localhost ([127.0.0.1]:36362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSRmh-0003ec-Ga for submit@debbugs.gnu.org; Sun, 28 Oct 2012 08:16:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55849) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSRme-0003eU-RV for submit@debbugs.gnu.org; Sun, 28 Oct 2012 08:16:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSRkN-0000KM-P7 for submit@debbugs.gnu.org; Sun, 28 Oct 2012 08:13:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:56038) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSRkN-0000KI-M6 for submit@debbugs.gnu.org; Sun, 28 Oct 2012 08:13:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSRkM-0000M9-T4 for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 08:13:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSRkL-0000Jq-QS for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 08:13:42 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:39051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSRkL-0000Je-IT for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 08:13:41 -0400 Received: by mail-lb0-f169.google.com with SMTP id k6so2865718lbo.0 for ; Sun, 28 Oct 2012 05:13:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=jj0d1scWhQx2Ic1oDc5UpSw1mfTGeCZXtlclAefvBTk=; b=It+uCC83X7u9Ksh6D61dfsSdVK/O9/842MWHzRTFzN4fkD74tNqTFjup9DRSWZ/wYH O/eL51nIHBICk0/Lep/9XFZlmA3D/hDWStulMdKB0MqcrD3zI7dGFhCZjJVk9zEpCzhs iRnhc9dajE1WYVLLxDHzFDntd0cRPSulPnivWM7+1+zYElcH4hhAiEw4k7G9FvY/vZ3M 0Tpqfz4xdVbqbtkGwRRFRfVf6vcEHkSP/iuZ9ktfJrHZqEc4vHaWEbvrcd1a8GAgfZ8P YNdI74GPydMMwGHXzcBLx6vHS36JA5PE4vbC5xED0+5JxGLUrCNRujQcyAgJ5crqoAtD MfAw== Received: by 10.152.162.97 with SMTP id xz1mr24751454lab.38.1351426419992; Sun, 28 Oct 2012 05:13:39 -0700 (PDT) Received: from localhost ([37.229.16.202]) by mx.google.com with ESMTPS id sy1sm2033252lab.16.2012.10.28.05.13.37 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 28 Oct 2012 05:13:39 -0700 (PDT) Received: by localhost (sSMTP sendmail emulation); Sun, 28 Oct 2012 14:13:36 +0200 From: Oleksandr Gavenko Date: Sun, 28 Oct 2012 14:13:36 +0200 Message-ID: <87y5iqbxqn.fsf@gavenkoa.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -3.4 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) In GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10) but seems that current truck have same problem as related part of 'diff-mode.el' unchanged. If I enable diff-auto-refine-mode in all diff-mode buffers: (defun my-diff-auto-refine-mode-on () (diff-auto-refine-mode 1)) (add-hook 'diff-mode-hook 'my-diff-auto-refine-mode-on) I see actions only on last hunk in diff. Look to definition: (define-minor-mode diff-auto-refine-mode (when diff-auto-refine-mode (condition-case-unless-debug nil (diff-refine-hunk) (error nil)))) and to doc string: diff-refine-hunk is an interactive compiled Lisp function in `diff-mode.el'. Highlight changes of hunk at point at a finer granularity. So I think 'diff-auto-refine-mode' must iterate over all hunks and apply 'diff-refine-hunk' function on each of them. -- Best regards! From unknown Sat Aug 16 16:54:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12747: 23.4; diff-auto-refine-mode process only last hunk in diff (must ALL). Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Oct 2012 13:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Oleksandr Gavenko Cc: 12747@debbugs.gnu.org Received: via spool by 12747-submit@debbugs.gnu.org id=B12747.135143260722612 (code B ref 12747); Sun, 28 Oct 2012 13:57:01 +0000 Received: (at 12747) by debbugs.gnu.org; 28 Oct 2012 13:56:47 +0000 Received: from localhost ([127.0.0.1]:36674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSTM6-0005sf-Li for submit@debbugs.gnu.org; Sun, 28 Oct 2012 09:56:46 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:12465) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSTM4-0005sY-Nn for 12747@debbugs.gnu.org; Sun, 28 Oct 2012 09:56:45 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu0/O+LET/2dsb2JhbAA8CLQRgQiCFQEBBAFWIwULCzQSFBgNJIgcBboJhWWFOIUnA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="203016954" Received: from 206-248-177-19.dsl.teksavvy.com (HELO pastel.home) ([206.248.177.19]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 28 Oct 2012 09:54:23 -0400 Received: by pastel.home (Postfix, from userid 20848) id 842A659415; Sun, 28 Oct 2012 09:54:22 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87y5iqbxqn.fsf@gavenkoa.example.com> Date: Sun, 28 Oct 2012 09:54:22 -0400 In-Reply-To: <87y5iqbxqn.fsf@gavenkoa.example.com> (Oleksandr Gavenko's message of "Sun, 28 Oct 2012 14:13:36 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) > If I enable diff-auto-refine-mode in all diff-mode buffers: > (defun my-diff-auto-refine-mode-on () (diff-auto-refine-mode 1)) > (add-hook 'diff-mode-hook 'my-diff-auto-refine-mode-on) > I see actions only on last hunk in diff. I'm not sure I understand what you mean. `diff-auto-refine-mode' does not refine-highlight all the hunks at once (quoting the docstring): When enabled, Emacs automatically highlights changes in detail as the user visits hunks. "as the user visits the hunks" means that it's only highlighted in response to "n" and "p" (and a few related operations). 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). Stefan From unknown Sat Aug 16 16:54:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12747: 23.4; diff-auto-refine-mode process only last hunk in diff (must ALL). Resent-From: Oleksandr Gavenko Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Oct 2012 19:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 12747@debbugs.gnu.org Received: via spool by 12747-submit@debbugs.gnu.org id=B12747.135145323826357 (code B ref 12747); Sun, 28 Oct 2012 19:41:02 +0000 Received: (at 12747) by debbugs.gnu.org; 28 Oct 2012 19:40:38 +0000 Received: from localhost ([127.0.0.1]:36945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSYis-0006r4-5e for submit@debbugs.gnu.org; Sun, 28 Oct 2012 15:40:38 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:41357) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSYio-0006qs-3R for 12747@debbugs.gnu.org; Sun, 28 Oct 2012 15:40:36 -0400 Received: by mail-lb0-f172.google.com with SMTP id k13so2898500lbo.3 for <12747@debbugs.gnu.org>; Sun, 28 Oct 2012 12:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=axlfwv9bMXCcD8TlKIxtgQ/G5aqDG2GI0nT5b0kaVfo=; b=k4TKv6YM7VW+CeiUYErkBKMyg+sYCE2nvtXH0dm+q0N+tJveoUMKlKzNMBJOdJjUuP mOn1oFRTHta1hD2hECfDsDeScmvtYwfurWpKQ5/6ojdbosPBwsHYo9XQTBCvdrbVTvTu vdAUeMcaq3+RnOGXAsUtitCnTSl8cGg/qfYn4D7ogEwNucQo5zc3xRZ3VgvTwx8SzCL/ Sq0cjiGWGpV1mCVEO9PQwiPyzGXlORpap1mEmw1LKEwlMDBPPK815vzRwrKXkQyy08OO oN+ZBvwiCV3g6EAHuz2FO7Vg8Iehp9/xX1AMVV0MTsNaDY/O6DC2AJ4eElRldJF0Xq95 1Uwg== Received: by 10.152.135.41 with SMTP id pp9mr25627182lab.7.1351453091344; Sun, 28 Oct 2012 12:38:11 -0700 (PDT) Received: from localhost ([37.229.16.202]) by mx.google.com with ESMTPS id so7sm2373228lab.0.2012.10.28.12.38.09 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 28 Oct 2012 12:38:10 -0700 (PDT) Received: by localhost (sSMTP sendmail emulation); Sun, 28 Oct 2012 21:38:07 +0200 From: Oleksandr Gavenko Organization: Oleksandr Gavenko , http://gavenkoa.users.sf.net References: <87y5iqbxqn.fsf@gavenkoa.example.com> Date: Sun, 28 Oct 2012 21:38:07 +0200 In-Reply-To: (Stefan Monnier's message of "Sun, 28 Oct 2012 09:54:22 -0400") Message-ID: <87a9v6bd5s.fsf@gavenkoa.example.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) On 2012-10-28, Stefan Monnier wrote: >> If I enable diff-auto-refine-mode in all diff-mode buffers: >> (defun my-diff-auto-refine-mode-on () (diff-auto-refine-mode 1)) >> (add-hook 'diff-mode-hook 'my-diff-auto-refine-mode-on) >> I see actions only on last hunk in diff. > > I'm not sure I understand what you mean. `diff-auto-refine-mode' does > not refine-highlight all the hunks at once (quoting the docstring): > > When enabled, Emacs automatically highlights > changes in detail as the user visits hunks. > > "as the user visits the hunks" means that it's only highlighted in > response to "n" and "p" (and a few related operations). > Ok. But it's difficult to understand. For example manual section "22.10 Diff Mode" doesn't say anything about concepts of visiting hunks... I forget add another essential details. I use this functionality with 'C-x v =' (runs the command vc-diff). And got highlighting in detail only for last hunk. Next I save *vc-diff* buffer to file and reopen it. Now I got highlighting in detail only in first hunk. This behaviour frustrate me, until I got understanding of working model from you. > This is not a bug. IIUC you'd like the refinement to be done in any > hunk that is ever displayed, right? Yes. I never use "n" or "p" for moving around *diff* buffer. Just "arrows" and "pages". So in my work-flow 'diff-auto-refine-mode' do nothing... > If so, that is a valid request for enhancement, and I fully agree. That is! Also I would be glad to see alias for: (diff-auto-refine-mode 1) in form: (defun diff-auto-refine-mode-on () (diff-auto-refine-mode 1)) to simplify usage in hooks... > 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). > Sound very good. FYI I heard about refining in emacs-help: http://thread.gmane.org/gmane.emacs.help/87082/focus=87093 Diff could also show the changes within lines Tom suggest add to 'diff-mode-hook' such code: (save-excursion (goto-char (point-min)) (while (not (eobp)) (diff-hunk-next)))) As exercise I try make some code myself: (defvar diff-auto+-refine-idle-time 2 "Time before highlighting take place XXX") (defvar diff-auto+-refine-idle-timer nil "Timer for highlighting XXX") (defun diff-auto+-refine-action () "TODO how about preventing to process already processed regions??" (when (eq major-mode 'diff-mode) (message "%s: diff-auto+-refine-action" (format-time-string "%M:%S" (current-time))) (diff-refine-hunk))) (defun diff-auto+-refine-mode (&optional arg) "Auto refine current hunk in diff mode." (interactive "P") (if (not arg) (if diff-auto+-refine-idle-timer (diff-auto+-refine-mode -1) (diff-auto+-refine-mode 1)) (if (and (number-or-marker-p arg) (< 0 (prefix-numeric-value arg))) (unless diff-auto+-refine-idle-timer (setq diff-auto+-refine-idle-timer (run-with-idle-timer 2 t 'diff-auto+-refine-action))) (when diff-auto+-refine-idle-timer (cancel-timer diff-auto+-refine-idle-timer) (setq diff-auto+-refine-idle-timer nil))))) which does not use 'font-lock-keywords'. I am inexperience Elisp hacker and don't understand how can >>font-lock-keywords rule registers the region displayed<<. Does this mean register MATCHER with always fail but perform side effect by updating suggested 'diff--regions-displayed' variable? Also I can't found function that return visible to user region to proper highlight all visible hunks instead current... As I have many question which involve teaching of me I ask them in emacs-help: http://permalink.gmane.org/gmane.emacs.help/87474 Function that return visible to user region and performing action on demand. http://permalink.gmane.org/gmane.emacs.help/87472 idle-timer for processing all buffers with selected minor-mode. -- Best regards! From unknown Sat Aug 16 16:54:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12747: 23.4; diff-auto-refine-mode process only last hunk in diff (must ALL). Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Oct 2012 20:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Oleksandr Gavenko Cc: 12747@debbugs.gnu.org Received: via spool by 12747-submit@debbugs.gnu.org id=B12747.135145631830805 (code B ref 12747); Sun, 28 Oct 2012 20:32:02 +0000 Received: (at 12747) by debbugs.gnu.org; 28 Oct 2012 20:31:58 +0000 Received: from localhost ([127.0.0.1]:36982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSZWX-00080n-IF for submit@debbugs.gnu.org; Sun, 28 Oct 2012 16:31:57 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:5133) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSZWW-00080d-5n; Sun, 28 Oct 2012 16:31:56 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu0/O+LET/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA0kiBwFugmQRAOjM4FYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="203032412" Received: from 206-248-177-19.dsl.teksavvy.com (HELO pastel.home) ([206.248.177.19]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 28 Oct 2012 16:29:32 -0400 Received: by pastel.home (Postfix, from userid 20848) id F309C59415; Sun, 28 Oct 2012 16:29:31 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87y5iqbxqn.fsf@gavenkoa.example.com> <87a9v6bd5s.fsf@gavenkoa.example.com> Date: Sun, 28 Oct 2012 16:29:31 -0400 In-Reply-To: <87a9v6bd5s.fsf@gavenkoa.example.com> (Oleksandr Gavenko's message of "Sun, 28 Oct 2012 21:38:07 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) retitle 12747 Make diff-auto-refine-mode refine from jit/font-lock severity 12747 wishlist thanks >> If so, that is a valid request for enhancement, and I fully agree. > That is! OK, title adjusted. I also would like to see this, FWIW. > Also I would be glad to see alias for: > (diff-auto-refine-mode 1) > in form: > (defun diff-auto-refine-mode-on () (diff-auto-refine-mode 1)) > to simplify usage in hooks... This is not needed any more. Nowadays minor modes always enable the mode if called without argument. IOW you can just use diff-auto-refine-mode in your hooks without risk of it toggling the minor mode off. > (save-excursion > (goto-char (point-min)) > (while (not (eobp)) > (diff-hunk-next)))) Problem with this, is that it can be slow when visiting large patch files, and it may fail to refine all hunks in *vc-diff* buffers because that might be run before the process has finished returning the diff. > Does this mean register MATCHER with always fail but perform side > effect by updating suggested 'diff--regions-displayed' variable? Yes. > Also I can't found function that return visible to user region to proper > highlight all visible hunks instead current... The font-lock-keywords rule suggested before does more or less. Otherwise, you can go through all windows, check if they're displaying your buffer and then use window-start and window-end to figure out what is displayed, but that approach generally leads to madness (compare jit-lock to lazy-lock, or linum.el to nlinum.el). Stefan From unknown Sat Aug 16 16:54:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12747: 23.4; diff-auto-refine-mode process only last hunk in diff (must ALL). Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Jul 2018 00:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 12747@debbugs.gnu.org, Oleksandr Gavenko Received: via spool by 12747-submit@debbugs.gnu.org id=B12747.15313553398885 (code B ref 12747); Thu, 12 Jul 2018 00:29:01 +0000 Received: (at 12747) by debbugs.gnu.org; 12 Jul 2018 00:28:59 +0000 Received: from localhost ([127.0.0.1]:56087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdPTe-0002JE-M6 for submit@debbugs.gnu.org; Wed, 11 Jul 2018 20:28:58 -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 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-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 Sat Aug 16 16:54:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12747: 23.4; diff-auto-refine-mode process only last hunk in diff (must ALL). Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Jul 2018 15:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Noam Postavsky Cc: 12747@debbugs.gnu.org, Oleksandr Gavenko Received: via spool by 12747-submit@debbugs.gnu.org id=B12747.153141037719124 (code B ref 12747); Thu, 12 Jul 2018 15:47:01 +0000 Received: (at 12747) by debbugs.gnu.org; 12 Jul 2018 15:46:17 +0000 Received: from localhost ([127.0.0.1]:57264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fddnN-0004yO-BP for submit@debbugs.gnu.org; Thu, 12 Jul 2018 11:46:17 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:59789) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fddnJ-0004yB-Jl for 12747@debbugs.gnu.org; Thu, 12 Jul 2018 11:46:14 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w6CFkqqx019142; Thu, 12 Jul 2018 11:46:52 -0400 Received: by ceviche.home (Postfix, from userid 20848) id A1ED166223; Thu, 12 Jul 2018 09:28:57 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87y5iqbxqn.fsf@gavenkoa.example.com> <87601lb8lc.fsf@gmail.com> Date: Thu, 12 Jul 2018 09:28:57 -0400 In-Reply-To: <87601lb8lc.fsf@gmail.com> (Noam Postavsky's message of "Wed, 11 Jul 2018 20:28:47 -0400") 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.2 X-NAI-Spam-Rules: 3 Rules triggered NOFROM_SGMAIL=0.2, EDT_SA_DN_PASS=0, RV6328=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6328> : inlines <6747> : streams <1792342> : uri <2672566> X-Spam-Score: -2.3 (--) 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 (---) > I think you've implemented this now [1: f8b1e40fb6], though not quite in > the way you describe (I don't see any timers). Indeed, thanks. > 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? Sounds good, yes (tho I'm surprised it'd make much of a difference, when your /tmp is on some kind of tmpfs). If you can add a URL pointing to the discussion where they found the noticable performance difference, that'd be even better. Stefan > 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 From unknown Sat Aug 16 16:54:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12747: 23.4; diff-auto-refine-mode process only last hunk in diff (must ALL). Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Jul 2018 19:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Stefan Monnier Cc: 12747@debbugs.gnu.org, Oleksandr Gavenko Received: via spool by 12747-submit@debbugs.gnu.org id=B12747.153142529016949 (code B ref 12747); Thu, 12 Jul 2018 19:55:02 +0000 Received: (at 12747) by debbugs.gnu.org; 12 Jul 2018 19:54:50 +0000 Received: from localhost ([127.0.0.1]:57362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdhfu-0004PJ-3A for submit@debbugs.gnu.org; Thu, 12 Jul 2018 15:54:50 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:45329) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdhfs-0004P7-Nr for 12747@debbugs.gnu.org; Thu, 12 Jul 2018 15:54:49 -0400 Received: by mail-oi0-f45.google.com with SMTP id q11-v6so32474220oic.12 for <12747@debbugs.gnu.org>; Thu, 12 Jul 2018 12:54:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YOcs7g8RkxSjbT4XPjOXV4AaL5qmL37oIn+nrneDLdE=; b=Fw5k+McVYxWEa0TNwhZ7Fmvi6b5Eg1IOwH8/aCU5TSc9vmMmNPJ7GYkC6kkJc8fdgB dIbm8tjptpgc4ypfJgjOR7E+ERvohg8dQK7v7KtG+w7lifpqGNKihXJGuRZCWYUwswim JtCcZCmtpySKJxjrsiSUmEUU5mE0tBkvtzBB+3AmBenH5dXxCkRCdKNsYVrend5XmWsV Cg9ILkrRosR1C0e/uGtJ9uAvPlJXrfXY8SreDSW/r594Og/DopayeYCKK7O7eNJ7omye uH480k6pm5fUSHz78BRg6U18+9Vm1wtgyPQUDijBmDajqwW6S+V0BpZzSKR0IGBeojZ9 pH5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YOcs7g8RkxSjbT4XPjOXV4AaL5qmL37oIn+nrneDLdE=; b=KCVLEbtYc8v0DOLinwhHLs394ZclH+ludRZww/D1zuCDNZwcfxtUhWwEl6gNYVC4XQ 1FD55Sfz+AdxIPcayLvXsugMj1fR/zLR75imWk1tG5iVBIeeyY+Ft6Dif4FgnpW1BYq6 3R175O7LdvUKG4YRZAAH74p3WiWu2D9FarYKk5tBBTbVpHK9W6i+iNA+Vtg0H472x2Gv dpUuUODjJGIQ/szg7OVXEQ8H5Sudya5AXN3OQdVvbIQ2+Qj01ojv2NMMmaG4qIGcV82b 7trVDt9hfSYmdDMFZhTL9k2uA9/TRvNQhmsXxvih6GR0cLkx49qp7KfGGHD3ISz+08OS HB0A== X-Gm-Message-State: AOUpUlHhqKWBJGdYXfafHJTpF2CFBGU3ow2elQ2esFYmvXi9s5fHm9/t 6nvavpUv+B4Z2o3T1MLhYMdQ45wtkKn3pxst9gE= X-Google-Smtp-Source: AAOMgpfbnv6xiX0SWR2p5a0DIjWyPYU5oAqab4X5vm8tb9grAfxltOq7SAiVbKEyWOAch5EYEQFfUdBJ7Y3pXMKBUtA= X-Received: by 2002:aca:bec2:: with SMTP id o185-v6mr1626861oif.22.1531425283032; Thu, 12 Jul 2018 12:54:43 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:3b8d:0:0:0:0:0 with HTTP; Thu, 12 Jul 2018 12:54:42 -0700 (PDT) In-Reply-To: References: <87y5iqbxqn.fsf@gavenkoa.example.com> <87601lb8lc.fsf@gmail.com> From: Noam Postavsky Date: Thu, 12 Jul 2018 15:54:42 -0400 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) 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 (-) On 12 July 2018 at 09:28, Stefan Monnier wrote: >> 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? > > Sounds good, yes (tho I'm surprised it'd make much of a difference, > when your /tmp is on some kind of tmpfs). If you can add a URL > pointing to the discussion where they found the noticable performance > difference, that'd be even better. Hmm, actually there wasn't that much discussion about it, one person reported it made a big difference: https://github.com/magit/magit/pull/2834 There was previous discussion about smerge refinement being slow, but nobody narrowed it down to fsync in particular, and the conclusion there was just "call smerge-refine-subst less". https://github.com/magit/magit/issues/1581 From unknown Sat Aug 16 16:54:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12747: 23.4; diff-auto-refine-mode process only last hunk in diff (must ALL). Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Jul 2018 20:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Noam Postavsky Cc: 12747@debbugs.gnu.org, Oleksandr Gavenko Received: via spool by 12747-submit@debbugs.gnu.org id=B12747.153142664219084 (code B ref 12747); Thu, 12 Jul 2018 20:18:01 +0000 Received: (at 12747) by debbugs.gnu.org; 12 Jul 2018 20:17:22 +0000 Received: from localhost ([127.0.0.1]:57385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdi1i-0004xk-71 for submit@debbugs.gnu.org; Thu, 12 Jul 2018 16:17:22 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:49613) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdi1g-0004xc-5y for 12747@debbugs.gnu.org; Thu, 12 Jul 2018 16:17:21 -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 w6CKHIBn030922; Thu, 12 Jul 2018 16:17:18 -0400 Received: by pastel.home (Postfix, from userid 20848) id 88BDA652D1; Thu, 12 Jul 2018 16:17:18 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87y5iqbxqn.fsf@gavenkoa.example.com> <87601lb8lc.fsf@gmail.com> Date: Thu, 12 Jul 2018 16:17:18 -0400 In-Reply-To: (Noam Postavsky's message of "Thu, 12 Jul 2018 15:54:42 -0400") 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, RV6328=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6328> : inlines <6747> : streams <1792360> : uri <2672655> X-Spam-Score: -2.3 (--) 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 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? >> Sounds good, yes (tho I'm surprised it'd make much of a difference, >> when your /tmp is on some kind of tmpfs). If you can add a URL >> pointing to the discussion where they found the noticable performance >> difference, that'd be even better. > Hmm, actually there wasn't that much discussion about it, one person > reported it made a big difference: > https://github.com/magit/magit/pull/2834 Seems like a good enough URL top put there. IIUC magit's code uses a different approach from the one I installed in diff-mode (i.e. it eagerly calls smerge-refine on all hunks), which is likely to suffer much more severely from performance issues on large diffs, so I think write-region-inhibit-fsync won't make a big difference for diff-mode, but it's still a good change in any case. Note that both approaches suffer identically when bumping into a large hunk, OTOH. > There was previous discussion about smerge refinement being slow, but > nobody narrowed it down to fsync in particular, and the conclusion > there was just "call smerge-refine-subst less". Yes, I think this one is really case of Magit's approach being simply too eager. Stefan From unknown Sat Aug 16 16:54:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12747: 23.4; diff-auto-refine-mode process only last hunk in diff (must ALL). Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Jul 2018 01:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Stefan Monnier Cc: 12747@debbugs.gnu.org, Oleksandr Gavenko Received: via spool by 12747-submit@debbugs.gnu.org id=B12747.153144648324649 (code B ref 12747); Fri, 13 Jul 2018 01:49:02 +0000 Received: (at 12747) by debbugs.gnu.org; 13 Jul 2018 01:48:03 +0000 Received: from localhost ([127.0.0.1]:57560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdnBi-0006PV-SY for submit@debbugs.gnu.org; Thu, 12 Jul 2018 21:48:03 -0400 Received: from mail-io0-f175.google.com ([209.85.223.175]:43219) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdnBg-0006P1-IT for 12747@debbugs.gnu.org; Thu, 12 Jul 2018 21:48:01 -0400 Received: by mail-io0-f175.google.com with SMTP id y10-v6so15145323ioa.10 for <12747@debbugs.gnu.org>; Thu, 12 Jul 2018 18:48:00 -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=W+5Tgq3nSzL8Be0MoH3x0yECNQPDPQyZnO3HRN5apV8=; b=PfDB5gK9eehHDgFewTrnfFBzq24ZKfL7plgozTmp+7lOioVRFSPiRpXrjkX1pRbhAn 552+UXtcl+yEZnSvPz/Nfrzu7g1E45OOLiZVPB9KSuJzRYd2hOJzUVSOK/aNk44xWCZI fzKylt5KqYWtKrpc0E+++h+vZzxz7F8snniua0hLtfN4wWIHQF/UcPP8qX8j2fOQlC9s VqME4oVPanCmhLXL8dPgJxeR8qqMaSilA7rv2IrMgQUSzfEjs9ZVKVSVsc+YaRIcA8FD xwSbiWvfzUtmxl7yAVesfwdMPLCrx0+c84ZJ9Ao6curUNVrg05RGelrvML96bLVpNFWp pYmQ== 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=W+5Tgq3nSzL8Be0MoH3x0yECNQPDPQyZnO3HRN5apV8=; b=pwKg5TUBlCxXrPecvA5M6ZHY3J42CoZ7YPSqEGo/50hAkYeKEU7yowX+QY89DzQhj/ REPhrBRiO2JMpfZXLi1pBnWwigP0/yV/LhtkWxJC4tNhBsREtuh4MBbLOuq4cnFSCSMB /cJyR7R0nCQKmxIoyJoNbSgTf3GUKKmnaIG9I0SwYtrYaJG2yj9imDARqLeSG1mBGATw OIkve3u+Iz13iSW/14dYq75O/3rGUyVyvqj3z2R74grQ5WC0VwSkB/XapiWYIiGiImOB MjkFPzoGG36NNiF3Z+CSCWsZ2U3lAUGkOmSM1N3TYT98k6Jox/E/qzloAagAaGpTFoil nBwg== X-Gm-Message-State: APt69E2N46MIfQ6wA04g0JPSQeoL32MTI5MV6fJpCuimF2/MCpdJlC4V WK5UW28pAZOzwF1IPLZ8iE4= X-Google-Smtp-Source: AAOMgpfZcRcL3WAiZqb0SR4q5OKMag+bk3thDW5lGBYhCkpRLAUYVLPNN/zgzsmb5nFADucqLeNpKg== X-Received: by 2002:a6b:33ce:: with SMTP id z197-v6mr31398856ioz.112.1531446474898; Thu, 12 Jul 2018 18:47:54 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id w20-v6sm8364004iob.24.2018.07.12.18.47.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Jul 2018 18:47:53 -0700 (PDT) From: Noam Postavsky References: <87y5iqbxqn.fsf@gavenkoa.example.com> <87601lb8lc.fsf@gmail.com> Date: Thu, 12 Jul 2018 21:47:51 -0400 In-Reply-To: (Stefan Monnier's message of "Thu, 12 Jul 2018 09:28:57 -0400") Message-ID: <87zhyvaou0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.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 (-) Stefan Monnier writes: > Sounds good, yes (tho I'm surprised it'd make much of a difference, > when your /tmp is on some kind of tmpfs). If you can add a URL > pointing to the discussion where they found the noticable performance > difference, that'd be even better. Pushed to master. [1: 01dbf2a347]: 2018-07-12 21:45:31 -0400 Speed up smerge-refine-regions by avoiding fsync https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=01dbf2a347944497fdcf2ec156f4605020d7ba2a