emacs-devel
[Top][All Lists]
Advanced

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

Re: GNU Emacs raison d'etre


From: Dmitry Gutov
Subject: Re: GNU Emacs raison d'etre
Date: Thu, 21 May 2020 03:15:14 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 20.05.2020 12:06, martin rudalics wrote:
>> Right.  In a "normal" session you have to create a minibuffer-only frame
 >> first and then delete the normal frame to get uniform behavior.  Emacs
 >> does not offer a function to remove the minibuffer window from a normal
 >> frame so this is the best you can get.
 >
 > Any chance to change the latter in Emacs 28? Is that difficult?

It's hairy and that's why people never tried to change the ritual of
setting up an initial frame with a minibuffer window.  Likely to make
sure that if things go wrong anywhere, there's always at least one
minibuffer window you can act upon or that displays vital information
about what went wrong during setup.

I get the idea, but Emacs is not a whole computer, to try to keep running at all costs. The config can be fixed, and Emacs can usually be restarted. So whatever the original reasons are, a user option could still be doable.

Note that producing the minibuffer-less + minibuffer-only setup is
accomplished by 'frame-notice-user-settings' which deletes the initial
minibuffer-equipped frame in a hair-raising fashion in order to make
sure that at least one minibuffer window is available at any time.

I've also noticed that initial blink during startup, but didn't know what to attribute it to. Would be great to be able to avoid it.

 > It would improve the starting experience quite a bit.

The startup experience of general minibuffer-only frame setups or that
of the setup with a minibuffer-only child frame?  I think these are today
also affected by other parameters like, for example, whether you put
these specifications into an early init file or the normal one.

The startup experience of pop-up-mini-mode. I can imagine two main scenarios:

- The user installs the package and turns the mode one. If we can't disable the minibuffer, maybe just enable the rest of the functionality, and describe minibuffer-disabling-on-init functionality separately? It could even just be a line we'd tell the users to put in their init script.

Alternatively, since you described what happens currently, pop-up-mini-mode could try to remember the current window configuration, create a new frame on the same position without a minibuffer, restore the window configuration there, and delete the original frame. Or is that something that could only happen during startup?

- pop-up-mini-mode is enabled in the user's init script. Is that worse than early init? We could try to document the early init as the best option.

> The main remaining annoyance is the blink when the child frame is resized/repositioned.

You would have to tell me more about that blink.  If it's due to the
setting of 'x-gtk-resize-child-frames', there's nothing I can do about
it.  If it's due to the delay implied by 'pop-up-mini-hide-if-empty',
try to experiment with that.

My x-gtk-resize-child-frames value is 'resize-mode.

Blinking happens when it's resized. But not every single time.

Here's what I do:

1. src/emacs -Q --eval "(setq x-gtk-resize-child-frames 'resize-mode)" -l ~/.emacs.d/site-lisp/pop-up-mini.el

2. M-x ido-mode.

3. C-x C-f, type 'e'. If you're inside Emacs source directory, the completions should span 2-3 lines. When the child frame is resized, it will blink. Sometimes it looks like the mode-line quickly moves up and back (or at least _something_ grey moves like that).

Instead of ido-mode, fido-mode can be used with similar effect. Though blinking seems less frequent with it.

Another issue: when the child frame covers the scroll bar, it renders some junk on it.

 > So how do you feel about a package in GNU ELPA?

Not really enthusiastic.  The historical constraints of how to set up
and use the minibuffer window are too restrictive IMHO so what you see
here is just a workaround.  Maybe things will change in a couple of
years.

Do you mean the child frame problems?

A package could declare that it only works on Emacs 28+, BTW.

 > If we can move the settings into the definition of pop-up-mini-mode,
 > it should be quite usable. And also do something with the scenario
 > where someone installs it, turns on the mode, and simply stares at the
 > error.

What's so bad about that error?  It simply tells what is missing.  If
you provide such a frame, things should work, even in parallel with the
already existing minibuffer window.

I didn't understand what I needed to do from it, and I'm a fairly experienced user. When doing a package, we usually try to cater to even less experienced users. Not always succeed, but try to.

BTW, here's a today's thread on Reddit with similar complaints by users: https://www.reddit.com/r/emacs/comments/gmsnoy/minibufferecho_area_ergonomics/

One suggestion option is this package: https://github.com/muffinmad/emacs-mini-frame.

There are a few others with this goal as well. But none of them try to hide the minibuffer (or know that it's possible, looks like). They only create a child frame with an "effective" minibuffer, and position it to their liking. Whereas the minibuffer line is left untouched, and is only used as echo area.



reply via email to

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