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

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

Re: Strange behaviour of the undo function


From: Juri Linkov
Subject: Re: Strange behaviour of the undo function
Date: Tue, 27 Dec 2005 03:16:59 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

There is another bug with similar behavior.

In the *scratch* buffer type part of a symbol and type M-TAB.
In the *Completions* buffer click <mouse-1> on a completion string.

First bug: point remains in the same window where the *Completions*
buffer was before clicking <mouse-1> (the *Completions* buffer gets
buried and replaced with another buffer).  But the correct behavior
is switching the window back to the original window with the *scratch*
buffer.

So now switch manually to the window with the *scratch* buffer (`C-x o'),
and call `undo' (`C-x u').  Second bug: it incorrectly puts point at the
beginning of the initial string instead of the position where M-TAB was typed
before inserting a completion string.

OTOH, <mouse-2> works correctly in all respects.

Comparing `buffer-undo-list' after typing "def" in the minibuffer
and clicking different mouse buttons shows the difference:

When <mouse-1> is clicked for completion, `buffer-undo-list'
in the *scratch* buffer has the value:

  (nil (1 . 18) ("def" . 1) (#<marker at 18 in *scratch*> . -3)
   (#<marker at 1 in *scratch*> . -3) nil (1 . 4) (t 0 . 0))

When <mouse-2> is clicked for completion, `buffer-undo-list'
in the *scratch* buffer is:

(nil (1 . 18) ("def" . 1) 4 (#<marker at 18 in *scratch*> . -3)
 (#<marker at 1 in *scratch*> . -3) nil (1 . 4) (t 0 . 0))

The difference is only in the undo element with the position 4.
It is missing when <mouse-1> is clicked.

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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