[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to highlight fine differences in Diff mode?
From: |
David Combs |
Subject: |
Re: how to highlight fine differences in Diff mode? |
Date: |
Sat, 7 Jan 2006 01:38:36 +0000 (UTC) |
In article <mailman.18320.1133972403.20277.help-gnu-emacs@gnu.org>,
Drew Adams <drew.adams@oracle.com> wrote:
> But sometimes I have to compare extremely large files, larger than Emacs
> maximum buffer size. So I simply run diff and redirect its output to a
> .diff file, which is easily small enought to visit and navigate in Diff
> mode. What I'd like at that point is a command to highlight the changed
> text within the current hunk, just like "*" does in Ediff:
>
> ,----[ C-h k * ]
> | * runs the command ediff-make-or-kill-fine-diffs
> | which is an interactive compiled Lisp function in `ediff-util'.
> | (ediff-make-or-kill-fine-diffs ARG)
> |
> | Compute fine diffs. With negative prefix arg, kill fine diffs.
> | In both cases, operates on the current difference region.
> `----
>
> Is there any way to take advantage of the Ediff machinery inside
> Diff mode?
>
>I don't have an answer for you, unfortunately. I do have some code that
>improves the highlighting of regular `diff' output slightly:
>http://www.emacswiki.org/cgi-bin/wiki/diff-mode-.el, but it doesn't do what
>you're asking.
>
>
>
1: "diff-mode": never heard of it. Yes, there is one in the lisp
subdirectory, at least of 22.0.50.1 (old) cvs.
2: So, I suppose the diff-mode.el in the wiki, vs the one that
comes "in the box", have no relation to each other. (Well,
at least the on in the lisp dir says nothing about "drew adams".)
3: not seeing much doc in the built-in one (or in info, either),
what does diff-mode enable me to do (easily) that ediff-mode
doesn't?
4: In fact, are the two packages (for lack of better word)
based on different concepts of what a "diff in emacs"
should do?
5: Here's the tail end of the info-node "comparing files":
Differences between versions of files are often distributed as
"patches", which are the output from `diff' or a version control system
that uses `diff'. `M-x diff-mode' turns on Diff mode, a major mode for
viewing and editing patches, either as "unified diffs" or "context
diffs."
You can use `M-x smerge-mode' to turn on Smerge mode, a minor mode
for editing output from the `diff3' program. This is typically the
result of a failed merge from a version control system "update" outside
VC, due to conflicting changes to a file. Smerge mode provides
commands to resolve conflicts by selecting specific changes.
See also *Note Emerge::, and *Note Top: (ediff)Top, for convenient
facilities for merging two similar files.
Sure doesn't say much about diff-mode -- and suggests looking
at ediff ONLY IF YOU NEED TO *MERGE* FILES.
Methinks ediff has more uses than that????
David
- Re: how to highlight fine differences in Diff mode?,
David Combs <=