unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: New commands for browsing diffs easily
Date: Tue, 11 Apr 2006 14:24:02 -0400	[thread overview]
Message-ID: <4n1ww4ug1p.fsf@asimov.bwh.harvard.edu> (raw)
In-Reply-To: m3lkucil2i.fsf@quimbies.gnus.org

On 11 Apr 2006, larsi@gnus.org 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
next-error-function.

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.

Ted

  parent reply	other threads:[~2006-04-11 18:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-11  8:16 New commands for browsing diffs easily Lars Magne Ingebrigtsen
2006-04-11  8:43 ` Nick Roberts
2006-04-11  8:47   ` Lars Magne Ingebrigtsen
2006-04-11  8:58     ` Miles Bader
2006-04-11  9:06       ` Lars Magne Ingebrigtsen
2006-04-11  9:17         ` David Kastrup
2006-04-11  9:21           ` Lars Magne Ingebrigtsen
2006-04-11 14:33       ` Stefan Monnier
2006-04-11 14:45         ` Romain Francoise
2006-04-11 14:51           ` Lars Magne Ingebrigtsen
2006-04-11 15:39             ` Stefan Monnier
2006-04-11 15:44               ` Lars Magne Ingebrigtsen
2006-04-11 15:43             ` Romain Francoise
2006-04-11 18:24 ` Ted Zlatanov [this message]
2006-04-11 18:56   ` Stefan Monnier
2006-04-11 20:07     ` Ted Zlatanov
2006-04-11 20:20       ` Stefan Monnier
2006-04-12 14:54         ` meta-{next, previous}-error (was: New commands for browsing diffs easily) Ted Zlatanov
2006-04-12 16:25           ` meta-{next, previous}-error Lars Magne Ingebrigtsen
2006-04-13 18:53             ` Ted Zlatanov
2006-04-13 19:27               ` Romain Francoise
2006-04-14 16:15                 ` Richard Stallman
2006-04-18 15:04                   ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4n1ww4ug1p.fsf@asimov.bwh.harvard.edu \
    --to=tzz@lifelogs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).