Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make vc-diff output more compact

Tags:

emacs

vcdiff

rcs

I am doing C-x v = to inspect the current differences of a file under RCS control (that is, it has an associated file with ,v suffix). However, the output is barely readable because I changed every, say, 12th line. So I get these giant chunks of diffs, where I cannot easily deduce which line was changed to what other.

Is there a way to make this diff-output more readable and still usable (so that I can jump to the source rapidly)?

(I could

  1. C-x v l to see the old versions, then
  2. do f on the last one to check it out.
  3. M-x ediff the files

but that is not very handy)

like image 486
false Avatar asked Mar 05 '26 23:03

false


1 Answers

You might like to try and set

(setq diff-switches '("-u"))

so that your diffs come out in unified format, which is a bit more compact. If that's not sufficient, you can try and pass additional flags to reduce the size of the "context" (by default 3 lines before and 3 lines after).

like image 138
Stefan Avatar answered Mar 07 '26 21:03

Stefan