unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13898: 24.3.50; Non-cycle completion can use the wrong window
@ 2013-03-07 20:12 Jorgen Schaefer
  2013-03-17 22:21 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jorgen Schaefer @ 2013-03-07 20:12 UTC (permalink / raw)
  To: 13898

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'






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#13898: 24.3.50; Non-cycle completion can use the wrong window
  2013-03-07 20:12 bug#13898: 24.3.50; Non-cycle completion can use the wrong window Jorgen Schaefer
@ 2013-03-17 22:21 ` Stefan Monnier
  2013-11-24 14:39 ` Jorgen Schaefer
  2013-12-02 19:15 ` bug#13898: [babc40c4] minibuffer-complete does not cycle anymore Ivan Shmakov
  2 siblings, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2013-03-17 22:21 UTC (permalink / raw)
  To: Jorgen Schaefer; +Cc: 13898

>              ;; 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)))

Looks good, please install,


        Stefan





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#13898: 24.3.50; Non-cycle completion can use the wrong window
  2013-03-07 20:12 bug#13898: 24.3.50; Non-cycle completion can use the wrong window Jorgen Schaefer
  2013-03-17 22:21 ` Stefan Monnier
@ 2013-11-24 14:39 ` Jorgen Schaefer
  2013-12-02 19:15 ` bug#13898: [babc40c4] minibuffer-complete does not cycle anymore Ivan Shmakov
  2 siblings, 0 replies; 7+ messages in thread
From: Jorgen Schaefer @ 2013-11-24 14:39 UTC (permalink / raw)
  To: 13898-done

Patch applied in revno 115210.

Regards,
Jorgen





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#13898: [babc40c4] minibuffer-complete does not cycle anymore
  2013-03-07 20:12 bug#13898: 24.3.50; Non-cycle completion can use the wrong window Jorgen Schaefer
  2013-03-17 22:21 ` Stefan Monnier
  2013-11-24 14:39 ` Jorgen Schaefer
@ 2013-12-02 19:15 ` Ivan Shmakov
  2013-12-05 19:21   ` Ivan Shmakov
  2 siblings, 1 reply; 7+ messages in thread
From: Ivan Shmakov @ 2013-12-02 19:15 UTC (permalink / raw)
  To: 13898, control

reopen 13898
thanks

	… It may be due to a different bug, but as of babc40c41c5c,
	minibuffer-complete does not cycle anymore.

	Example: C-h f TAB TAB TAB… – the TABs after the first seem to
	have no visible effect whatsoever.

	Since reverting the change made in 35b3f07859c4 restores the
	proper minibuffer-complete behavior, I took the liberty to
	reopen #13898.  (Feel free to clone and close it if necessary.)

-- 
FSF associate member #7257





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#13898: [babc40c4] minibuffer-complete does not cycle anymore
  2013-12-02 19:15 ` bug#13898: [babc40c4] minibuffer-complete does not cycle anymore Ivan Shmakov
@ 2013-12-05 19:21   ` Ivan Shmakov
  2013-12-05 20:12     ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Ivan Shmakov @ 2013-12-05 19:21 UTC (permalink / raw)
  To: 13898-done

>>>>> Ivan Shmakov <ivan@siamics.net> writes:

 > reopen 13898 thanks

 > … It may be due to a different bug, but as of babc40c41c5c,
 > minibuffer-complete does not cycle anymore.

	And even quite likely so, as as of 0dd4ebbcf94d, it all seem to
	work correctly.

	Sorry for the noise, closing this one back.

 > Example: C-h f TAB TAB TAB… – the TABs after the first seem to have
 > no visible effect whatsoever.

 > Since reverting the change made in 35b3f07859c4 restores the proper
 > minibuffer-complete behavior, I took the liberty to reopen #13898.
 > (Feel free to clone and close it if necessary.)

-- 
FSF associate member #7257





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#13898: [babc40c4] minibuffer-complete does not cycle anymore
  2013-12-05 19:21   ` Ivan Shmakov
@ 2013-12-05 20:12     ` Stefan Monnier
  2013-12-06 18:19       ` Ivan Shmakov
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2013-12-05 20:12 UTC (permalink / raw)
  To: 13898; +Cc: ivan, forcer

>> … It may be due to a different bug, but as of babc40c41c5c,
>> minibuffer-complete does not cycle anymore.
> 	And even quite likely so, as as of 0dd4ebbcf94d, it all seem to
> 	work correctly.

I don't know what those rev-ids correspond to, but... I'm glad it all
works out ;-)


        Stefan





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#13898: [babc40c4] minibuffer-complete does not cycle anymore
  2013-12-05 20:12     ` Stefan Monnier
@ 2013-12-06 18:19       ` Ivan Shmakov
  0 siblings, 0 replies; 7+ messages in thread
From: Ivan Shmakov @ 2013-12-06 18:19 UTC (permalink / raw)
  To: 13898

>>>>> Stefan Monnier <monnier@iro.umontreal.ca> writes:

 >>> … It may be due to a different bug, but as of babc40c41c5c,
 >>> minibuffer-complete does not cycle anymore.

 >> And even quite likely so, as as of 0dd4ebbcf94d, it all seem to work
 >> correctly.

 > I don't know what those rev-ids correspond to, but...  I'm glad it
 > all works out ;-)

	JFTR:

http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=babc40c41c5c
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0dd4ebbcf94d

-- 
FSF associate member #7257





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-12-06 18:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-07 20:12 bug#13898: 24.3.50; Non-cycle completion can use the wrong window Jorgen Schaefer
2013-03-17 22:21 ` Stefan Monnier
2013-11-24 14:39 ` Jorgen Schaefer
2013-12-02 19:15 ` bug#13898: [babc40c4] minibuffer-complete does not cycle anymore Ivan Shmakov
2013-12-05 19:21   ` Ivan Shmakov
2013-12-05 20:12     ` Stefan Monnier
2013-12-06 18:19       ` Ivan Shmakov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).