emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Diff faces


From: Stefan Monnier
Subject: Re: Diff faces
Date: Mon, 15 Oct 2007 10:36:27 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

> I like the current shadows-of-gray color scheme used in diff-mode.
> And even ediff uses similar gray colors to highlight inactive hunks.
> The only complaint I currently have is that the yellow color of the new
> face `diff-fine-change' doesn't fit into this scheme.  What do you think
> about changing it to a shadow of gray?

Sounds fine to me, that's basically what I use.

> Alternatively, you could use fruit-salad colors only for the refined hunk
> in diff-mode (similar to the colors of the active hunk in ediff).

diff-mode doesn't have a notion of active hunk right now and I'm not
convinced I want to add such a notion.

> BTW, I think the current character-wise refinement in diff-mode and in
> smerge-mode is not very useful.  More useful would be to refine it on the
> word or symbol basis.  I have an experimental patch that produces good
> results.  It splits original hunks symbol-by-symbol (though word-by-word
> works as well) and compares them ignoring whitespace differences.

I like it to be finer than that.  I agree that chars are a bit too fine, but
it's rarely a problem.  Basically, I was thinking of refining enough so as
to treat "FooBar64" as 3 entities.

Also I often like the fact that it does not ignore whitespace differences
but I often would like it to ignore them, so I'd like to be able to choose.

> +      (while (search-forward "\n" nil t)
> +     (replace-match "" nil nil))
> +      (goto-char (point-min))

That should be " " rather than "", right?  If so, subst-char-in-region might
be a better choice.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]