From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#12747: 23.4; diff-auto-refine-mode process only last hunk in diff (must ALL). Date: Sun, 28 Oct 2012 16:29:31 -0400 Message-ID: References: <87y5iqbxqn.fsf@gavenkoa.example.com> <87a9v6bd5s.fsf@gavenkoa.example.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1351456186 24351 80.91.229.3 (28 Oct 2012 20:29:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Oct 2012 20:29:46 +0000 (UTC) Cc: 12747@debbugs.gnu.org To: Oleksandr Gavenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 28 21:29:52 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TSZUW-0003uq-Eq for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Oct 2012 21:29:52 +0100 Original-Received: from localhost ([::1]:39255 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSZUO-0008DQ-CR for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Oct 2012 16:29:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSZUL-0008D1-UZ for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 16:29:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSZUK-000503-Vd for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 16:29:41 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSZUK-0004zx-SQ for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 16:29:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TSZWc-00081B-CK for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 16:32:02 -0400 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 12747-submit@debbugs.gnu.org id=B12747.135145631830805 (code B ref 12747); Sun, 28 Oct 2012 20:32:02 +0000 Original-Received: (at 12747) by debbugs.gnu.org; 28 Oct 2012 20:31:58 +0000 Original-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 Original-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" Original-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 Original-Received: by pastel.home (Postfix, from userid 20848) id F309C59415; Sun, 28 Oct 2012 16:29:31 -0400 (EDT) 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) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:66158 Archived-At: 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