From: Eli Zaretskii <eliz@gnu.org>
To: "Herring\, Davis" <herring@lanl.gov>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Showing the relevant part of a diff
Date: Sat, 20 Feb 2016 22:39:53 +0200 [thread overview]
Message-ID: <83h9h3nmjq.fsf@gnu.org> (raw)
In-Reply-To: <B393F5AD12955C48A84FFB08032CD04F6C433731@ECS-EXG-P-MB01.win.lanl.gov> (herring@lanl.gov)
> From: "Herring, Davis" <herring@lanl.gov>
> CC: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
> Date: Sat, 20 Feb 2016 20:20:06 +0000
>
> > > +(defun diff-goto-line (file line column)
> > > + "Go to the place in this diff producing LINE in FILE.
> >
> > This first line should mention COLUMN as well.
>
> So, to keep to the length limit, I guess we want
>
> Go to the place in this diff producing LINE:COLUMN in FILE.
"LINE and COLUMN" sounds better.
> even though that (still) doesn't name the arguments in order.
That's not a catastrophe.
> > > +If LINE (in the new version of FILE) is included, move to it and then
> > ^^^^^^^^^^^
> > Included where?
>
> In the diff, as a +/! line or a context line.
That was a hint that the doc string should explain this.
> > > +COLUMN characters forward. If it is absent, go to the first hunk
> > > +starting after LINE, or to the end if none does.
> >
> > Why this fallback? Would it make sense to just stay at the beginning?
>
> First, it handles the case where point is just outside a hunk's context, by putting it "just off the edge" of the context. It can also be useful to see the nearest changes before and after point even if they are far away: they might be additions/removals of "#ifdef...#endif", for example.
I think it's confusingly different from what you do when FILE is not
give. IMO the beginning is better.
> > > + (unless rev2 ; remember the position in the or a current buffer
> >
> > Typo in the comment.
>
> Not a typo -- I meant "in the [current buffer] or a current buffer". I could write "in the, or a, current buffer", but now that I think of it we shouldn't call another existing buffer "a current buffer". Maybe
Sorry, I don't understand: "_a_ current buffer"? why?
next prev parent reply other threads:[~2016-02-20 20:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-19 5:43 [PATCH] Showing the relevant part of a diff Herring, Davis
2016-02-19 5:49 ` Lars Ingebrigtsen
2016-02-19 8:47 ` Eli Zaretskii
2016-02-20 20:20 ` Herring, Davis
2016-02-20 20:39 ` Eli Zaretskii [this message]
2016-02-20 22:49 ` Herring, Davis
2016-07-15 21:19 ` Davis Herring
2016-07-16 2:14 ` Herring, Davis
2016-07-16 9:28 ` Dmitry Gutov
2016-07-18 14:15 ` Ted Zlatanov
2016-07-18 23:20 ` Dmitry Gutov
2016-07-19 14:12 ` 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=83h9h3nmjq.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=herring@lanl.gov \
/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).