From: Alan Mackenzie <acm@muc.de>
To: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel@gnu.org
Subject: Re: What is restore_window_configuration in read_minibuf (minibuf.c) for?
Date: Mon, 19 Apr 2021 14:56:29 +0000 [thread overview]
Message-ID: <YH2aHaREpwg2nujn@ACM> (raw)
In-Reply-To: <c7b772fe-d5d8-c33e-fe09-2c4b7edd9812@gmx.at>
Hello, Martin.
On Mon, Apr 19, 2021 at 14:08:38 +0200, martin rudalics wrote:
> > In src/minibuf.c, function read_minibuf, there's a
> > restore_window_configuration set up to be called on minibuffer
> > termination.
> [...]
> > What is the purpose of this restore_window_configuration in
> > read_minibuf? Does anybody know? Removing it appears to fix the above
> > bug, but what problems might this cause? I would like to remove it.
> See
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45072
Whew! That's a long thread.
The impression I get is that the restore_window_configuration is a user
facility, and we can't just remove it, much though I'd like to.
> the option I proposed in that thread and Juri's remarks at its end.
Juri's remarks from the end of that thread. Thanks for drawing my
attention to them:
>> It seems that problem is that read_minibuf messes up the windows so
>> much, that at the end currently the only way to fix this mess is by
>> restoring the previous window configuration.
So we can't just remove it.
>> This means that there is a need to fix read_minibuf to restore all
>> previous window states without using restore_window_configuration.
>> Only then it will be possible to add a user option to disable using
>> restore_window_configuration.
I don't think it is read_minibuf itself that is causing the problems;
rather it is the commands used in read_minibuf's recursive edit. That
will mean fixing a large part of lisp/minibuffer.el and possibly the
latter part of src/minibuf.c. That will be quite a lot of work.
Anyhow, back to my bug: It is not restore_window_configuration as a
whole which is bugging the mini-windows, it is specifically restoring
the mini-window itself to an out of date state.
So what seems needed is an extra &optional parameter to
set-window-configuration, DONT-SET-MINIWINDOW which would inhibit the
restoration of the mini-window. The call from unwinding a minibuffer
would pass a non-nil value for this argument. Messy, but I haven't got
any better ideas.
What do you think?
> martin
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2021-04-19 14:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-19 10:46 What is restore_window_configuration in read_minibuf (minibuf.c) for? Alan Mackenzie
2021-04-19 12:08 ` martin rudalics
2021-04-19 14:56 ` Alan Mackenzie [this message]
2021-04-19 15:20 ` Daniel Mendler
2021-04-19 16:03 ` martin rudalics
2021-04-19 15:31 ` Stefan Monnier
2021-04-19 16:02 ` martin rudalics
2021-04-20 13:38 ` Alan Mackenzie
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YH2aHaREpwg2nujn@ACM \
--to=acm@muc.de \
--cc=emacs-devel@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 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).