unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Invisible changes in ediff
@ 2011-06-03 20:21 Samuel Wales
  2011-06-03 20:33 ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Samuel Wales @ 2011-06-03 20:21 UTC (permalink / raw)
  To: help-gnu-emacs

I shy away from the otherwise excellent ediff package
because there are sometimes changed regions outside the
windows.

Problem:

  1) sometimes changes exist past window boundaries
  2) they do not show up in the next hunk
  3) you can't tell when that obtains


Consequence:

  1) you miss changes
  2) you have to manually scroll the windows to look for
     them
  3) you might not know how far to scroll to make sure you
     are not missing any changes (not tested)


Possible solution:

  1) Space and del can scroll both windows whenever there is
     changed text in the same hunk outside the visible part.
     Analogy is space and del in info.  Ediff can indicate
     that there is such text.
  2) Maybe ediff can make sure that nothing ever extends or
     exists past the window boundary.  Instead of having
     diff hunks as diff(1) sees them, ediff will have any
     number of smaller hunks to keep changes in windows.


Seems like 1 might be possible.  2 might or might not work
well.

What do people here do?

Please CC: me.

Thanks.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
I support the Whittemore-Peterson Institute (WPI)
===
Extreme bigotry against people with deadly serious diseases is still
extreme bigotry.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Invisible changes in ediff
  2011-06-03 20:21 Invisible changes in ediff Samuel Wales
@ 2011-06-03 20:33 ` Drew Adams
  2011-06-03 20:41   ` Samuel Wales
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2011-06-03 20:33 UTC (permalink / raw)
  To: 'Samuel Wales', help-gnu-emacs

> What do people here do?

Not sure I follow you correctly, but I use C-v and M-v to scroll both windows at
the same time.  In Ediff, these keys scroll each window an amount based on the
relative sizes of the two (current) diffs, which is handy.

Typically, I do this:

1. Narrow each buffer to the part I want to compare (unless it's the whole
buffers).

2. `ediff-buffers' (which I bind to `C-= b').

3. `n'... to check successive diffs.

4. If the current diff is too large for the windows then I use `C-v' or `M-v',
possibly repeatedly.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Invisible changes in ediff
  2011-06-03 20:33 ` Drew Adams
@ 2011-06-03 20:41   ` Samuel Wales
  2011-06-03 20:54     ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Samuel Wales @ 2011-06-03 20:41 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs

On 2011-06-03, Drew Adams <drew.adams@oracle.com> wrote:
> 4. If the current diff is too large for the windows then I use `C-v' or
> `M-v',
> possibly repeatedly.

How do you know for certain whether or not it is too large for the
window?  How do you know for certain how many times to use them?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Invisible changes in ediff
  2011-06-03 20:41   ` Samuel Wales
@ 2011-06-03 20:54     ` Drew Adams
  2011-06-03 21:02       ` Samuel Wales
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2011-06-03 20:54 UTC (permalink / raw)
  To: 'Samuel Wales'; +Cc: help-gnu-emacs

> > 4. If the current diff is too large for the windows then I 
> > use `C-v' or `M-v', possibly repeatedly.
> 
> How do you know for certain whether or not it is too large for the
> window?  How do you know for certain how many times to use them?

Again, I might not be understanding you correctly.

I can see the current diff (highlighted in both windows).  If it extends to the
end (beginning) of one or both windows then I use `C-v' (`M-v') to scroll the
windows a bit.

I do it again if the highlight still extends to the window end (beginning).

Perhaps try what I described to see if it is in fact related to what you are
asking about.  I might completely misunderstand what you're asking.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Invisible changes in ediff
  2011-06-03 20:54     ` Drew Adams
@ 2011-06-03 21:02       ` Samuel Wales
  2011-06-03 21:39         ` Perry Smith
  2011-06-03 21:46         ` Drew Adams
  0 siblings, 2 replies; 7+ messages in thread
From: Samuel Wales @ 2011-06-03 21:02 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs

On 2011-06-03, Drew Adams <drew.adams@oracle.com> wrote:
> I can see the current diff (highlighted in both windows).  If it extends to
> the
> end (beginning) of one or both windows then I use `C-v' (`M-v') to scroll
> the
> windows a bit.

You have to do the commands manually.  There is no indicator.

You also have to notice that it hits the boundary to know to run the
commands.  You have to look every time and wonder if there are more
changes.

Also, do we know for certain that if you hit an unhighlighted line
that there are no further changes?  I don't think so, but I am not
certain.  If not, you have no way to know how far to scroll, in
principle.

> Perhaps try what I described to see if it is in fact related to what you are
> asking about.  I might completely misunderstand what you're asking.

I have of course tried that.

Perhaps you do understand, but have not found it to be a significant
problem for yourself personally in your own use cases in your
experience.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Invisible changes in ediff
  2011-06-03 21:02       ` Samuel Wales
@ 2011-06-03 21:39         ` Perry Smith
  2011-06-03 21:46         ` Drew Adams
  1 sibling, 0 replies; 7+ messages in thread
From: Perry Smith @ 2011-06-03 21:39 UTC (permalink / raw)
  To: Samuel Wales; +Cc: help-gnu-emacs


On Jun 3, 2011, at 4:02 PM, Samuel Wales wrote:

> Also, do we know for certain that if you hit an unhighlighted line
> that there are no further changes?  I don't think so, but I am not
> certain.  If not, you have no way to know how far to scroll, in
> principle.

This particular item is "yes".  diffs are in "hunks".  If there is an unhighlighted line then you have gone from one hunk to the next.  The ediff UI where you hit space is to go from one hunk to the next.

Not sure if that helps or not.

Perry




^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Invisible changes in ediff
  2011-06-03 21:02       ` Samuel Wales
  2011-06-03 21:39         ` Perry Smith
@ 2011-06-03 21:46         ` Drew Adams
  1 sibling, 0 replies; 7+ messages in thread
From: Drew Adams @ 2011-06-03 21:46 UTC (permalink / raw)
  To: 'Samuel Wales'; +Cc: help-gnu-emacs

> > I can see the current diff (highlighted in both windows).  
> > If it extends to the end (beginning) of one or both windows
> > then I use `C-v' (`M-v') to scroll the windows a bit.
> 
> You have to do the commands manually.  There is no indicator.
> 
> You also have to notice that it hits the boundary to know to run the
> commands.  You have to look every time and wonder if there are more
> changes.
> 
> Also, do we know for certain that if you hit an unhighlighted line
> that there are no further changes?  I don't think so, but I am not
> certain.  If not, you have no way to know how far to scroll, in
> principle.

I fear that we are not talking about the same thing, and that someone else will
need to help you.

This is what I see:

Each diff highlights, in each buffer, a contiguous set of text - there are no
gaps of unhighlighted text for a given diff.

Each diff uses at most two highlighting faces, one for text that is the same,
another for the text that differs.  Text that is outside all diffs is not
highlighted at all.

If the current (highlighted) diff is larger than some threshold (dunno what that
is, but you could look it up) then you might need to hit `*' to get it to break
out the text that is the same from the text that is different.

When I move to a diff (using `n' or `p' or `g' or `j' etc.), I see the
highlighting in both windows.  If the highlighting in one or both extends to the
window edge, then I scroll (to see whether it extends beyond the edge).

Ediff automatically puts the current diff in the window center, so for a small
diff it typically does not extend past the window.  (In my case, I use
side-by-side frames; YMMV.)  It's pretty easy to see when it does, however
("notice that it hits the boundary").  And it's pretty easy to scroll the
highlighted text up/down.

I can only guess that I'm not seeing what you're seeing or we are talking about
different things altogether.

I would add that `ediff' is occasionally not as smart as I would like, and seems
to get thrown off wrt what a human might think is appropriate.  If that happens
then I use `C-x n n' to narrow the buffers to smaller chunks and use `ediff' on
just those chunks.  Dunno whether this is pertinent to what you're experiencing.

> Perhaps you do understand, but have not found it to be a significant
> problem for yourself personally in your own use cases in your
> experience.

Perhaps.  Maybe someone else can help more.  Sorry.

Again, maybe using one-window frames side by side helps.  Dunno.




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-03 21:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-03 20:21 Invisible changes in ediff Samuel Wales
2011-06-03 20:33 ` Drew Adams
2011-06-03 20:41   ` Samuel Wales
2011-06-03 20:54     ` Drew Adams
2011-06-03 21:02       ` Samuel Wales
2011-06-03 21:39         ` Perry Smith
2011-06-03 21:46         ` Drew Adams

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