all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Setting arbitrary windows as frame's minibuffer
@ 2018-10-09 21:04 Akio Burns
  2018-10-10  6:20 ` martin rudalics
  0 siblings, 1 reply; 2+ messages in thread
From: Akio Burns @ 2018-10-09 21:04 UTC (permalink / raw)
  To: emacs-devel

I would like to set an arbitrary window as the frame's minibuffer so that I may position the minibuffer adjacent to the focused window when it is invoked rather that at the bottom of the frame.

After removing the validation in frame.c

    	  if (!MINI_WINDOW_P (XWINDOW (val)))
    	    error ("The `minibuffer' parameter does not specify a valid minibuffer window");

I tried setting the frame's minibuffer with

    (set-frame-parameter (selected-frame) 'minibuffer (selected-window))

This works for the first minibuffer invocation. Unfortunately, once the minibuffer quits/closes Emacs becomes stuck trying to resize the window and the minibuffer visually migrates back to the bottom of the frame.

Given that minibuffer window can be placed in a separate frame, it seems to me this should not be difficult. Am I missing something simple that would permit arbitrary minibuffer positioning?

—Akio


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

* Re: Setting arbitrary windows as frame's minibuffer
  2018-10-09 21:04 Setting arbitrary windows as frame's minibuffer Akio Burns
@ 2018-10-10  6:20 ` martin rudalics
  0 siblings, 0 replies; 2+ messages in thread
From: martin rudalics @ 2018-10-10  6:20 UTC (permalink / raw)
  To: Akio Burns, emacs-devel

 > I would like to set an arbitrary window as the frame's minibuffer so
 > that I may position the minibuffer adjacent to the focused window
 > when it is invoked rather that at the bottom of the frame.

Here I'm doing that for a couple of months already.

 > After removing the validation in frame.c
 >
 >      	  if (!MINI_WINDOW_P (XWINDOW (val)))
 >      	    error ("The `minibuffer' parameter does not specify a valid minibuffer window");
 >
 > I tried setting the frame's minibuffer with
 >
 >      (set-frame-parameter (selected-frame) 'minibuffer (selected-window))
 >
 > This works for the first minibuffer invocation. Unfortunately, once
 > the minibuffer quits/closes Emacs becomes stuck trying to resize the
 > window and the minibuffer visually migrates back to the bottom of
 > the frame.

The behavior of non-separate minibuffer windows is hard-coded
in many places so this is no surprise.

 > Given that minibuffer window can be placed in a separate frame, it
 > seems to me this should not be difficult. Am I missing something
 > simple that would permit arbitrary minibuffer positioning?

Have a look at the patch attached to

http://lists.gnu.org/archive/html/bug-gnu-emacs/2018-08/msg00012.html

and you should have an overview of what you are missing.

martin



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

end of thread, other threads:[~2018-10-10  6:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-09 21:04 Setting arbitrary windows as frame's minibuffer Akio Burns
2018-10-10  6:20 ` martin rudalics

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.