git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH] make diff --color-words customizable

From
Jeff King <peff@peff.net>
Date
Jan 9, 2009, 11:22 UTC
Message-ID
<20090109112239.GA11466@coredump.intra.peff.net>
In-Reply-To
<alpine.DEB.1.00.0901091215590.30769@pacific.mpi-cbg.de>
On Fri, Jan 09, 2009 at 12:18:37PM +0100, Johannes Schindelin wrote:
Show 12 quoted lines
> > It's a per-file thing, so probably in the diff driver that is triggered 
> > via attributes. See userdiff.[ch]; you'll need to add an entry to the 
> > userdiff_driver struct. You can look at the funcname pattern stuff as a 
> > template, as this is very similar.
> 
> I am not sure I would want that in the config or the attributes.  For me, 
> it always has been a question of "oh, that LaTeX diff looks ugly, let's 
> see what words actually changed".
> 
> Only rarely did I wish for a different word boundary detection algorithm.
> 
> So I'd rather have an alias than a config/attribute setting.
I am not sure what you are saying.

If it is "I do not want color-words on by default for LaTeX", then I agree. I meant merely that _if_ color-words is enabled, the word boundaries would be taken from the diff driver config (just like we do for matching the funcname header).

If it is "I want to specify the color-words boundary on a per-run basis rather than a per-file basis", then I want the opposite. However, there is no reason that both cannot be supported (with command line or environment taking precedence over what's in the config).

-Peff
Previous: Johannes Schindelin
Message 34 of 34 in “make diff --color-words customizable”
  1. make diff --color-words customizableThomas Rast, Jan 9, 2009
  2. Johannes SchindelinJan 9, 2009
  3. Thomas RastJan 9, 2009
  4. Johannes SchindelinJan 9, 2009
  5. color-words: take an optional regular expression describing wordsJohannes Schindelin, Jan 9, 2009
  6. Thomas RastJan 9, 2009
  7. Teemu LikonenJan 9, 2009
  8. make diff --color-words customizableThomas Rast, Jan 10, 2009
  9. Jakub NarebskiJan 10, 2009
  10. Johannes SchindelinJan 10, 2009
  11. Jakub NarebskiJan 10, 2009
  12. Johannes SchindelinJan 10, 2009
  13. Jakub NarebskiJan 12, 2009
  14. Johannes SchindelinJan 13, 2009
  15. Davide LibenziJan 10, 2009
  16. Jakub NarebskiJan 13, 2009
  17. Davide LibenziJan 13, 2009
  18. Johannes SchindelinJan 10, 2009
  19. Thomas RastJan 10, 2009
  20. Johannes SchindelinJan 10, 2009
  21. Junio C HamanoJan 11, 2009
  22. 0/4 customizable --color-wordsThomas Rast, Jan 11, 2009
  23. 1/4 word diff: comments, preparations for regex customizationThomas Rast, Jan 11, 2009
  24. 2/4 word diff: customizable word splitsThomas Rast, Jan 11, 2009
  25. 3/4 word diff: make regex configurable via attributesThomas Rast, Jan 11, 2009
  26. 4/4 word diff: test customizable word splitsThomas Rast, Jan 11, 2009
  27. Junio C HamanoJan 11, 2009
  28. Junio C HamanoJan 11, 2009
  29. Johannes SchindelinJan 11, 2009
  30. Johannes SchindelinJan 11, 2009
  31. Junio C HamanoJan 11, 2009
  32. Jeff KingJan 9, 2009
  33. Johannes SchindelinJan 9, 2009
  34. Jeff KingJan 9, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.