help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Narrowing same buffer to different regions in two windows


From: Roy Smith
Subject: Re: Narrowing same buffer to different regions in two windows
Date: 20 Oct 2004 13:54:34 -0400

Compare-windows is neat, but it's not quite the same as narrowing.
I'm in one window and see a variable "foo".  I want to see if the
function in the other window also has "foo", so I go to the other
window and do "C-S foo".  Only with narrowing will I be sure that the
foo I found is in the function of interest.

In article <mailman.4238.1098288305.2017.help-gnu-emacs@gnu.org>,
Drew Adams <drew.adams@oracle.com> wrote:
>Another tool to try: `M-x compare-windows':
>
>"Compare text in current window with text in next window.
>Compares the text starting at point in each window,
>moving over text in each one as far as they match.
>
>This command pushes the mark in each window
>at the prior location of point in that window.
>If both windows display the same buffer,
>the mark is pushed twice in that buffer:
>first in the other window, then in the selected window.
>
>A prefix arg means ignore changes in whitespace.
>The variable `compare-windows-whitespace' controls how whitespace is
>skipped.
>If `compare-ignore-case' is non-nil, changes in case are also ignored."
>
>-----Original Message-----From: Roy Smith
>I've got a file with two large sections of very similar text that I
>want to examine and compare (it's C++, and a previous author did a
>"cut, paste, and modify" job instead of refactoring).  What I'd like
>to do is split the screen into two windows, and do narrow-to-region in
>each window, ending up with each window looking at a distinct section
>of the file.
>
>The problem is, narrowing works per-buffer, not per-window.  Is there
>anyway to do what I want?
>
>
>




reply via email to

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