From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jorgen Schaefer Newsgroups: gmane.emacs.bugs Subject: bug#13898: 24.3.50; Non-cycle completion can use the wrong window Date: Thu, 07 Mar 2013 21:12:46 +0100 Message-ID: <87haknt1dt.fsf@orion.kollektiv-hamburg.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1362687216 11880 80.91.229.3 (7 Mar 2013 20:13:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Mar 2013 20:13:36 +0000 (UTC) To: 13898@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 07 21:14:00 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UDhCP-00031u-Sf for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Mar 2013 21:13:58 +0100 Original-Received: from localhost ([::1]:49424 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDhC3-0005to-U1 for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Mar 2013 15:13:35 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDhBz-0005ti-DA for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2013 15:13:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDhBx-0005sZ-Tn for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2013 15:13:31 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:32963) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDhBx-0005sS-Qv for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2013 15:13:29 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UDhCU-0001bW-OT for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2013 15:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jorgen Schaefer Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Mar 2013 20:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13898 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13626872226131 (code B ref -1); Thu, 07 Mar 2013 20:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Mar 2013 20:13:42 +0000 Original-Received: from localhost ([127.0.0.1]:37072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UDhC6-0001am-Mg for submit@debbugs.gnu.org; Thu, 07 Mar 2013 15:13:40 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53232) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UDhC3-0001aZ-SK for submit@debbugs.gnu.org; Thu, 07 Mar 2013 15:13:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDhBP-0005nv-2X for submit@debbugs.gnu.org; Thu, 07 Mar 2013 15:12:57 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:58980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDhBO-0005nr-VT for submit@debbugs.gnu.org; Thu, 07 Mar 2013 15:12:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDhBM-0005mI-64 for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2013 15:12:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDhBK-0005mM-I8 for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2013 15:12:52 -0500 Original-Received: from istinn.electusmatari.com ([83.169.37.145]:47268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDhBK-0005m8-Bb for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2013 15:12:50 -0500 Original-Received: from orion.kollektiv-hamburg.de (hmbg-4d06ea2d.pool.mediaWays.net [77.6.234.45]) by istinn.electusmatari.com (Postfix) with ESMTPSA id 0B9C4D10001E for ; Thu, 7 Mar 2013 21:12:48 +0100 (CET) Original-Received: by orion.kollektiv-hamburg.de (Postfix, from userid 1000) id 747F132CAD6; Thu, 7 Mar 2013 21:12:46 +0100 (CET) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72208 Archived-At: 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@gnu.org-20130302111734-5qg3o3o84z1dxzdy Configured using: `configure --without-x --with-x-toolkit=no'