all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Politz <politza@hochschule-trier.de>
To: martin rudalics <rudalics@gmx.at>
Cc: 33498@debbugs.gnu.org
Subject: bug#33498: 26.1; Unable to delete minibuffer-only+child frames
Date: Mon, 26 Nov 2018 19:59:37 +0100	[thread overview]
Message-ID: <871s77hdgm.fsf@hochschule-trier.de> (raw)
In-Reply-To: <5BFBBD5A.4060002@gmx.at> (martin rudalics's message of "Mon, 26 Nov 2018 10:31:06 +0100")

Thanks for the detailed explanation.  I was looking for a way to have
the minibuffer at the top of the frame, which you'd probably already
guessed.

martin rudalics <rudalics@gmx.at> writes:

> These operations would have to be automatized and improved as follows:
>
> Process a (minibuffer . child-frame) frame parameter to
>
> (1) make an _invisible_ top-level minibuffer-only frame similar to
>     what we are doing in the (minibuffer . nil) case,
>
> (2) create the minibuffer-less parent frame with the minibuffer window
>     set to the window made in (1),
>
> (3) reparent the minibuffer frame created in (1) and make it visible.

Should this be a dedicated function,
e.g. make-frame-with-minibuffer-child.  Or a behavior triggered by an
additional frame-parameter passed to the parent ?

> Then deleting the parent frame would
>
> (4) make the minibuffer frame invisible and top-level,
>
> (5) delete the parent frame,
>
> (6) delete the minibuffer frame if possible or make it visible if it
>     still serves as minibuffer frame for another frame.
>
> (4)-(5) would have to handle the cases correctly where delete_frame
> (the C function) is called from Elisp (via C-x 5 0, for example) and
> from the window manager (by clicking the "x" on the title bar).  The
> Elisp call would not shut down Emacs, the window manager call could.
>
It seems to me that this code should go into Fdelete_frame ?

> To process (6) we would maybe also want an 'auto-delete-minibuffer'
> frame parameter (which could then be also used for non-child-frame
> minibuffer-only frames).
>
> Finally, any such code will have to process the 'delete-before' frame
> parameter appropriately to avoid running into an infinite loop of
> failed deletion attempts.

What if we allow the deletion of a minibuffer frame, if it will not
violate the invariant that all frames have a minibuffer, i.e. because
the frame in question will be deleted some time later (because this
operation is already on the call-stack.).  I don't know if this
temporary violation (i.e. between deleting the child-minibuffer and
deleting the parent) is a problem.  Anyway, this would enable the user
to delete these kinds of frames normally, even if it looks jerky.

And then implement the special minibuffer-as-child-frame behavior and
logic via dedicated functions, which display and undsiplay these frames
nicely.  (Still, delete-frame would have to be redirected to some proxy
handling this case.)

Andreas





  reply	other threads:[~2018-11-26 18:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-25 11:43 bug#33498: 26.1; Unable to delete minibuffer-only+child frames Andreas Politz
2018-11-25 17:40 ` martin rudalics
2018-11-25 18:28   ` Andreas Politz
2018-11-25 18:57     ` martin rudalics
2018-11-25 19:33       ` Andreas Politz
2018-11-26  9:31         ` martin rudalics
2018-11-26 18:59           ` Andreas Politz [this message]
2018-11-27 10:14             ` martin rudalics
2019-03-05 10:12 ` martin rudalics
2019-03-13 20:24   ` Andreas Politz
2019-04-23  8:46     ` martin rudalics
2019-03-06 19:07 ` Paul Eggert
2019-03-07  8:28   ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871s77hdgm.fsf@hochschule-trier.de \
    --to=politza@hochschule-trier.de \
    --cc=33498@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.