all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Oleksandr Gavenko <gavenkoa@gmail.com>
Cc: 12747@debbugs.gnu.org
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	[thread overview]
Message-ID: <jwvzk36pcub.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87a9v6bd5s.fsf@gavenkoa.example.com> (Oleksandr Gavenko's message of "Sun, 28 Oct 2012 21:38:07 +0200")

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





  reply	other threads:[~2012-10-28 20:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-28 12:13 bug#12747: 23.4; diff-auto-refine-mode process only last hunk in diff (must ALL) Oleksandr Gavenko
2012-10-28 13:54 ` Stefan Monnier
2012-10-28 19:38   ` Oleksandr Gavenko
2012-10-28 20:29     ` Stefan Monnier [this message]
2018-07-12  0:28   ` Noam Postavsky
2018-07-12 13:28     ` Stefan Monnier
2018-07-12 19:54       ` Noam Postavsky
2018-07-12 20:17         ` Stefan Monnier
2018-07-13  1:47       ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvzk36pcub.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=12747@debbugs.gnu.org \
    --cc=gavenkoa@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.