unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Herring, Davis" <herring@lanl.gov>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [PATCH] Showing the relevant part of a diff
Date: Sat, 20 Feb 2016 22:49:01 +0000	[thread overview]
Message-ID: <B393F5AD12955C48A84FFB08032CD04F6C433787@ECS-EXG-P-MB01.win.lanl.gov> (raw)
In-Reply-To: <83h9h3nmjq.fsf@gnu.org>

>> 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.

I find the "where LINE would go" behavior natural and useful.  Files are different in that they have no natural sequencing: no place where any particular FILE "would go".

The "no FILE" case doesn't arise for single files, of course, unless there are no changes and the whole question is moot.  For changeset diffs, I (soon will) handle an absent FILE by trying another buffer's file.  It is already the case that the FILE-not-found case is a no-op in that point _remains_ at the beginning; this will make it truly ignorable, so there shouldn't be any confusion.

>> 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".
> 
> Sorry, I don't understand: "_a_ current buffer"? why?

Do you mean "Why record the location in a non-current buffer?"?  If so, the answer is that the diff might be run from Dired or via C-x v D, and so the buffer whose point indicates what is interesting need not be current.

That feature strikes me as less important than the between-hunks feature, because the user might be more confused about and less interested in point's value in a non-current buffer.  Still, it probably finds "your most recent changes", which could be useful.

If you meant "Why call a buffer 'a current buffer'?", then I can only agree with you, since "current buffer" is a uniquely defined concept -- that's why I was talking about rephrasing it (before talking about changing it to try positions in several buffers).

Davis



  reply	other threads:[~2016-02-20 22:49 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
2016-02-20 22:49       ` Herring, Davis [this message]
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=B393F5AD12955C48A84FFB08032CD04F6C433787@ECS-EXG-P-MB01.win.lanl.gov \
    --to=herring@lanl.gov \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).