GNU bug report logs - #13898
24.3.50; Non-cycle completion can use the wrong window

Previous Next

Package: emacs;

Reported by: Jorgen Schaefer <forcer <at> forcix.cx>

Date: Thu, 7 Mar 2013 20:14:02 UTC

Severity: normal

Found in version 24.3.50

Done: Ivan Shmakov <ivan <at> siamics.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jorgen Schaefer <forcer <at> forcix.cx>
Subject: bug#13898: closed (Re: 24.3.50; Non-cycle completion can use the
 wrong window)
Date: Sun, 24 Nov 2013 15:39:06 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#13898: 24.3.50; Non-cycle completion can use the wrong window

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 13898 <at> debbugs.gnu.org.

-- 
13898: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13898
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jorgen Schaefer <contact <at> jorgenschaefer.de>
To: 13898-done <at> debbugs.gnu.org
Subject: Re: 24.3.50; Non-cycle completion can use the wrong window
Date: Sun, 24 Nov 2013 15:39:26 +0100
Patch applied in revno 115210.

Regards,
Jorgen

[Message part 3 (message/rfc822, inline)]
From: Jorgen Schaefer <forcer <at> forcix.cx>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; Non-cycle completion can use the wrong window
Date: Thu, 07 Mar 2013 21:12:46 +0100
Hello!

When using `completion-at-point' (or any minibuffer completion), the
completion can scroll a window different from the completions.


Reproduction:

1) Create three windows using C-x 2, let's call them A, B and C from top
to bottom.

2) Make sure all three of them are at the top of the buffer and have
more text in them than fits in them (i.e. can be scrolled up; down; er;
text can scroll up).

3) Start ielm (M-x ielm) in the bottommost. This is just to get a buffer
in which tab completion happens, as opposed to the minibuffer.

4) Go to the topmost window, A. Then switch directly to the bottommost,
i.e. switch to C so that A is still the "other" window. E.g. using M-:
(select-window (nth 2 (window-list)))

5) Start a completion, e.g. using f TAB. A completion buffer shows up in
window *B*. Hit TAB again. Notice that window *A* is cycling.


The problem is that `minibuffer-complete' calls `scroll-other-window'
even though that's not the correct window in this case.

Trivial fix:

--- lisp/minibuffer.el	2013-02-09 05:52:20 +0000
+++ lisp/minibuffer.el	2013-03-07 19:58:39 +0000
@@ -1050,7 +1050,8 @@
             ;; If end is in view, scroll up to the beginning.
             (set-window-start window (point-min) nil)
           ;; Else scroll down one screen.
-          (scroll-other-window))
+          (with-selected-window window
+            (scroll-up)))
         nil)))
    ;; If we're cycling, keep on cycling.
    ((and completion-cycling completion-all-sorted-completions)


Regards,
        -- Jorgen

PS. Not a regression, 24.2 already had this bug.


In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu)
 of 2013-03-02 on orion.kollektiv-hamburg.de
Bzr revision: 111915 rgm <at> gnu.org-20130302111734-5qg3o3o84z1dxzdy
Configured using:
 `configure --without-x --with-x-toolkit=no'




This bug report was last modified 11 years and 225 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.