emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is restore_window_configuration in read_minibuf (minibuf.c) for


From: Alan Mackenzie
Subject: Re: What is restore_window_configuration in read_minibuf (minibuf.c) for?
Date: Mon, 19 Apr 2021 14:56:29 +0000

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]