[Top][All Lists]

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

Re: New commands for browsing diffs easily

From: Ted Zlatanov
Subject: Re: New commands for browsing diffs easily
Date: Tue, 11 Apr 2006 14:24:02 -0400
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

On 11 Apr 2006, address@hidden wrote:

> I use `C-x v =' a lot, and one thing I've missed for ages is the
> ability to just walk through the diff history.  That is, after seeing
> that the diff in question wasn't really the one I was looking for, I
> just want to see the diffs that comes before or after.
> So this diff adds that.  I'm not quite sure that this is the best
> implementation -- calling vc functions from diff mode might be a bit
> naughty.  Or perhaps not.
> I bound the commands to `M-C-n' and `M-C-p' as all the more likely key
> strokes were already taken.

I think next-error and previous-error (used in occur-mode, compilation
modes, grep, and others right now) would be perfect.  Look at the
definition of next-error in simple.el, you just need to bind

The nice thing is that you don't need new bindings, next-error and
previous-error will just DTRT in whatever mode you are.

I tried to suggest alternate names for the scary-sounding *-error
functions a while ago; right now you have goto-next-locus and
next-match.  previous-error is just next-error with a negative
argument, so there are no aliases for it as of now.  There's also
first-error to jump to the first item in the buffer.

Let me know if this is useful :)  It may not map directly to the way
you were thinking of diff navigation.


reply via email to

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