emacs-pretest-bug
[Top][All Lists]
Advanced

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

compare-windows trouble


From: Devon
Subject: compare-windows trouble
Date: Wed, 24 Nov 2004 20:03:03 -0500 (EST)

The new nicer compare-windows wins comparing separate files
but loses comparing similar sections of the same buffer.

$ cat cw-bug.el
;;; Bug in Emacs 21.3.50.1 compare-windows on two parts of same buffer.
;;; Not sure how to programmatically check highlights.
;;; Does anyone collect regression tests like this?

(defun compare-windows-bug-demo ()
  (interactive)
  (switch-to-buffer "*Compare Windows Bug Demo*")
  (delete-other-windows)
  (erase-buffer)
  (insert "
foo bar and grille
highlights
should
differ

moo goo gai pan
highlights
should
differ
")
  (goto-char (point-min))
  (split-window-vertically)
  (search-forward "foo") (beginning-of-line 0)
  (other-window 1)
  (search-forward "moo") (beginning-of-line 0)
  (compare-windows nil) (sit-for 1) (other-window 1) (sit-for 1) (other-window 
1) (sit-for 1)
  (compare-windows nil) (sit-for 1) (other-window 1) (sit-for 1) (other-window 
1) (sit-for 1)
  (compare-windows nil) (sit-for 1) (other-window 1) (sit-for 1) (other-window 
1) (sit-for 1)
  (beep t))

$ emacs -nw -q --no-site-file --no-splash -l cw-bug.el -f 
compare-windows-bug-demo

The movie ends with para 1 and following blank line highlighted
in *both* windows -- clearly wrong and gives the impression that
it actually moved the bottom cursor backwards by a whole paragraph.

                Peace
                        --Devon
         /~\
         \ /    Health Care
          X     not warfare
         / \

        Kerry won the popular vote
        Dubya won the digital vote

PS: Run it a couple of times and watch where the cursors go.




reply via email to

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