Hi Tim,

I'm trying to clean up the long list of old Emacs bugs in Debian.

On 2003-10-30 21:11 +0100, Tim Freeman wrote:

> Package: emacs21
> Version: 21.3+1-3
> Followup-For: Bug #150422
>
> I'm still seeing this bug in emacs21 version 21.3+1-3.  Here's how I
> can reproduce it:
>
> Put this text in /tmp/foo.el:
>
>    (setq default-frame-alist (append '((cursor-color . "red") (height . 59)
>                                   (top . 0) (left . 512))
>                                 default-frame-alist))
>    (let* ((font "6x12"))
>      (setq default-frame-alist (cons (cons 'font font)
>                                         default-frame-alist)))
>
> The idea here is to make a new frame start up without overlapping the
> old frame.  The font size is small enough so this works on a 1024x768
> screen; it will probably work on larger screens too.  I don't know
> about smaller screens but you probably don't have a smaller screen.
>
> Start emacs with "emacs -q -l /tmp/foo.el".
>
> The "-q" means to ignore the startup file.  The "-l /tmp/foo.el" means
> to load /tmp/foo.el.
>
> The new emacs frame will be on the right half of the screen.  Drag it
> so it's as far left as possible.  It's probably important that the
> mouse is in the presently-existing frame on the left, so leave it the
> mouse near the center of the left frame after you do the dragging.
>
> Type "C-x 5 2" to make a second frame.
>
> Type "C-x f /tmp/foo Enter" so the two frames are doing different things and
> the focus therefore has practical consequence.
>
> Type "C-x 5 o" to try to change frames.  The left frame raises but
> doesn't get the focus.  It should have got the focus.
>
> Type "asdf".  This should have inserted into the scratch buffer in the
> left frame, but instead it inserts into the /tmp/foo buffer in the
> right frame.  Using just the keyboard it appears to be impossible to
> use the left frame.  This is the bug.
>
> To work around the bug, move the mouse to the right frame.  After
> this, things work normally.

Thanks a lot for this detailed recipe.

> I don't know if this depends on my window manager.  I use
> WindowMaker.  Let me know if there are problems reproducing this; I'll
> try to match configurations with you and see if it still happens.

I can reproduce this bug in my current IceWM configuration, but only if
the variable focus-follows-mouse is set to t (the default).  The
docstring in emacs21 for the other-frame command fails to mention this
important variable, but in emacs22 it does:

,----
| To make this command work properly, you must tell Emacs
| how the system (or the window manager) generally handles
| focus-switching between windows.  If moving the mouse onto a window
| selects it (gives it focus), set `focus-follows-mouse' to t.
| Otherwise, that variable should be nil.
`----

So, if your window manager uses a click-to-focus policy, you have to set
focus-follows-mouse to nil.  Does this help to avoid the bug?

Regards,
        Sven



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to