all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#8358: 24.0.50; `minibuffer-scroll-window' with active minibuffer: always *Completions*?
@ 2011-03-27 22:03 Drew Adams
  2011-03-28  6:34 ` martin rudalics
  0 siblings, 1 reply; 13+ messages in thread
From: Drew Adams @ 2011-03-27 22:03 UTC (permalink / raw)
  To: 8358

`minibuffer-scroll-window' is the window to be scrolled by
`scroll-other-window' from the minibuffer.
 
The doc suggests that setting `minibuffer-scroll-window' to some window
when the minibuffer is active would make other-window scrolling use that
window.  E.g. the doc for `scroll-other-window' includes this:
 
"If in the minibuffer, `minibuffer-scroll-window' if non-nil specifies
the window to scroll.  This takes precedence over
`other-window-scroll-buffer'."
 
It doesn't say that the *Completions* window is always the other window
scrolled.  But `minibuffer-scroll-window' always seems to be reset to
the *Completions* window, AFAICT.
 
Help me understand how to make some other window than the *Completions*
window the target to be scrolled by `scroll-other-window' from the
minibuffer.
 
emacs -Q
 
C-x d RET
C-x 4 b *scratch* RET
 
(defun foo ()
 (setq minibuffer-scroll-window 
       (get-buffer-window (get-buffer "*scratch*") 0))
 (message "fffff, MSW: %S" minibuffer-scroll-window) (sleep-for 2))
 
(add-hook 'completion-setup-hook 'foo 'append)
 
(defun bar (arg)
  (interactive "P")
  (message "BBBBB, MSW: %S" minibuffer-scroll-window) (sleep-for 2)
  (scroll-other-window arg))
 
(define-key minibuffer-local-completion-map "\C-\M-v" 'bar)
 
Return focus to the Dired window.
 
M-x for TAB C-M-v
 
That shows that `minibuffer-scroll-window' is the *Completions* window
when `C-M-v' is pressed, even though `minibuffer-scroll-window' was the
*scratch* window just after *Completions* was shown.
 
I looked at the code in minibuffer.el and window.c to try to understand
where `minibuffer-scroll-window' is getting reset (to *Completions*),
but I haven't understood, so far.
 
(`minibuffer-complete' does set `minibuffer-scroll-window' (e.g. to
nil), but debugging that function shows that it doesn't seem to make a
difference here.  And my own code, where I also see the problem, doesn't
even call `minibuffer-complete'.)
 
Help appreciated.  Is this a bug?  Shouldn't you be able to set the
window to be scrolled (using `scroll-other-window') during minibuffer
input to be some window other than *Completions*?  How can I do that?
Just where is `minibuffer-scroll-window' getting set and reset?  Thx.
 
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-03-21 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt --cflags
-Ic:/imagesupport/include'
 






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

end of thread, other threads:[~2022-02-13  9:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-27 22:03 bug#8358: 24.0.50; `minibuffer-scroll-window' with active minibuffer: always *Completions*? Drew Adams
2011-03-28  6:34 ` martin rudalics
2011-03-28 13:44   ` Drew Adams
2011-03-28 15:01     ` martin rudalics
2011-03-28 16:22       ` Drew Adams
2011-03-28 18:51         ` martin rudalics
2011-03-28 20:00           ` Drew Adams
2011-03-29  1:05             ` Stefan Monnier
2022-02-13  9:58       ` Lars Ingebrigtsen
2011-03-28 15:07     ` Stefan Monnier
2011-03-29  4:13       ` Drew Adams
2011-03-29  8:54         ` martin rudalics
2011-03-29 14:22           ` Drew Adams

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.