[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ediff maximum line length?
From: |
Stefan Monnier |
Subject: |
Re: ediff maximum line length? |
Date: |
Fri, 11 Feb 2011 09:27:26 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> I am looking for something that can compare two files, so that I can
> launch Emacs as my diff tool, e.g. from Perforce, Subversion, etc. I
> don't know if diff-mode can compare two files instead of a buffer and
> its file.
diff-mode is not a replacement for ediff in that it only helps you read
contextual diffs (i.e. the output of `diff' or other tools that output
in the same format).
So, if you do
exec emacs --eval "(diff \"$1\" \"$2\")"
the resulting *diff* buffer will be in diff-mode.
> That's why I used ediff. (Another reason is that I know its
> key bindings from vc, but that's not something I can't live without.)
>From VC, C-x v = will give you a diff that's displayed in diff-mode.
For some uses, this is much better than ediff, but for others ediff is
more appropriate. I've gotten so used to reading diffs that I don't use
ediff nearly as much as diff-mode, tho.
> Is it possible to use diff-mode for the same sort of comparison?
Yes, see above.
Stefan
PS: For 3-way "diffs", smerge-mode provides a similar alternative to
ediff3, and also supports highlighting of fine diffs.
And there's probably a way to get diff3-style output from `diff', so as
to use smerge-mode for 2-way comparisons.