From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#16909: 24.3; scrolling *Completions* window with tab sometimes chooses a wrong window Date: Wed, 05 Mar 2014 08:26:52 +0100 Message-ID: <5316D1BC.3000804@gmx.at> References: <5310D459.8040504@gmx.at> <6F4BAAB3-A0AD-4AE5-BD18-BE9CE1A97B77@gmail.com> <5311CA73.2030709@gmx.at> <53123279.6070203@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1394004495 4132 80.91.229.3 (5 Mar 2014 07:28:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Mar 2014 07:28:15 +0000 (UTC) Cc: "16909@debbugs.gnu.org" <16909@debbugs.gnu.org> To: Lukasz Pawelczyk Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 05 08:28:23 2014 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 1WL6FZ-00013j-Bs for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Mar 2014 08:28:21 +0100 Original-Received: from localhost ([::1]:50506 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WL6FY-0007Bj-W3 for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Mar 2014 02:28:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WL6FP-0007BW-0a for bug-gnu-emacs@gnu.org; Wed, 05 Mar 2014 02:28:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WL6FH-0000S9-MC for bug-gnu-emacs@gnu.org; Wed, 05 Mar 2014 02:28:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WL6FH-0000Ry-Io for bug-gnu-emacs@gnu.org; Wed, 05 Mar 2014 02:28:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WL6FG-0002Qj-JG for bug-gnu-emacs@gnu.org; Wed, 05 Mar 2014 02:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Mar 2014 07:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16909 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16909-submit@debbugs.gnu.org id=B16909.13940044249245 (code B ref 16909); Wed, 05 Mar 2014 07:28:02 +0000 Original-Received: (at 16909) by debbugs.gnu.org; 5 Mar 2014 07:27:04 +0000 Original-Received: from localhost ([127.0.0.1]:51028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WL6EJ-0002P2-Kd for submit@debbugs.gnu.org; Wed, 05 Mar 2014 02:27:04 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:59083) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WL6EG-0002OT-Va for 16909@debbugs.gnu.org; Wed, 05 Mar 2014 02:27:01 -0500 Original-Received: from [178.190.22.148] ([178.190.22.148]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LnkiR-1Wqa6N0Jkl-00hybR; Wed, 05 Mar 2014 08:27:00 +0100 In-Reply-To: X-Provags-ID: V03:K0:O0RzsBqchgZUXaIyr4ipbSo5r4UrTHEd8dyi5DgAmY1pRxjG4Eb 65AM5oQJGCCYjeCJRjvQ+axDsycwlb0CKqKHJwaFonh68QZ8ACOhFZwXKz5kCtab3zyoHGF fHeHnDt9tZfqIoyDWQqUznmj8aaBq4X3XTu/2QR9HKjyBVbgqLtQcuZ1IbKgyPYs5NLsUcq LStPaSwEWzsNgAWD+7wSw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.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:86567 Archived-At: >> We have to detect the moment when the window is closed automatically >> anyway. At that time we can either kill the buffer or reset >> `other-window-scroll-buffer=92. > > I=92m still not sure that even using this variable is a wise idea. It = might be used > by a user to configure his things. By design it's a plain variable and not a user option. > A simple custom function that will always scroll > *Completions* window seems like a better choice. You can always scroll= > by buffer name. No need to force the usage of scroll-other-window func= tion. IIRC the initial intention was to make the *Completions* window the `next-window' so it would get scrolled automatically by C-M-v. When that failed, `other-window-scroll-buffer' was invented to handle the case where the *Completions* window was not the next window. I doubt that a custom function would gain anything in this regard - it would still have to find the window to scroll and detect when it's no more needed. Which obviously does not preclude the use of a function as value of `other-window-scroll-buffer'. Sooner or later we should move `other-window-for-scrolling' and `scroll-other-window' to Elisp anyway, so this should be easily doable. > I meant that if you only kill the buffer (after we used autocomplete) = and > then user will scroll-other-window (for whatever reason) it won=92t be= have as > if its value is nil. We=92d have to make it nil as well (as you mentio= ned now). Why? If `other-window-scroll-buffer' denotes a dead buffer, it now should be tantamount to nil. Or am I missing something? > If I had an idea where to start I would have sent a patch instead of r= eporting a bug :-/ I thought you had because you earlier said that All of this happens because a window that's chosen for displaying a w= indow for completion is created with 'display-buffer', while the window tha= t is scrolled with TAB during completion is choosen with a 'other-window' ('scroll-other-window') function. And as shown here those windows are= not always the same. which gave me the impression that you already did some preliminary investigative work. martin