muffinmad / emacs-mini-frame

Show minibuffer in child frame on read-from-minibuffer
GNU General Public License v3.0
314 stars 20 forks source link

doom-emacs: evil mode search exits without showing mini-frame #79

Open cvanelteren opened 9 months ago

cvanelteren commented 9 months ago

I was giving this mode a spin and it works great with swiper. Unfortunately using evil mode, the default search (/) is not shown. It briefly shows the mini frame but then exits.

muffinmad commented 9 months ago

I'm not really familiar with the evil mode, but looks like it is using isearch-mode to perform search by default. And isearch-mode is handled by mini-frame-mode here. So I don't know why it shows the mini-frame even briefly.

For the test purposes:

emacs -Q
M-x package-initialize
M-x mini-frame-mode
M-x evil-mode
/

The search prompt is "displayed" in the echo area and there is no mini-frame shown.

Then customize the evil-search-module to use evil-search instead of isearch:

M-: (evil-select-search-module 'evil-search-module 'evil-search)

Now pressing / shows the search prompt in the mini-frame.

cvanelteren commented 9 months ago

Interestingly, if package-initialize is not run beforehand enabling mini-frame returns null.

It seems like the cursor is not focused on the search prompt or mini-frame as it does without mini-frame mode enabled. That is, when invoking swiper or evil search the cursors is not put in the prompt as it is without mini-frame mode enabled. Is see quickly that emacs mentions something about not finding "" when searching. This seems to imply that the search is ended without inputting anything (if this makes sense).

(i am using doom emacs btw).

On Sun, 24 Sept 2023 at 17:01, Andrii Kolomoiets @.***> wrote:

I'm not really familiar with the evil mode, but looks like it is using isearch-mode to perform search by default. And isearch-mode is handled by mini-frame-mode here https://github.com/muffinmad/emacs-mini-frame/blob/f420020aa33a1b00407000addd995170a36e026e/mini-frame.el#L395. So I don't know why it shows the mini-frame even briefly.

For the test purposes:

emacs -Q M-x package-initialize M-x mini-frame-mode M-x evil-mode /

The search prompt is "displayed" in the echo area and there is no mini-frame shown.

Then customize the evil-search-module to use evil-search instead of isearch:

M-: (evil-select-search-module 'evil-search-module 'evil-search)

Now pressing / shows the search prompt in the mini-frame.

— Reply to this email directly, view it on GitHub https://github.com/muffinmad/emacs-mini-frame/issues/79#issuecomment-1732592039, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEUVDV3BK5YDMWMUZR4PUYDX4BDNJANCNFSM6AAAAAA5EWC4HY . You are receiving this because you authored the thread.Message ID: @.***>

--

muffinmad commented 9 months ago

But with only evil-mode enabled the cursor is not moved to the search prompt:

emacs -Q
M-x package-initialise
M-x evil-mode

Can you please provide steps to reproduce the issue starting from emacs -Q?

cvanelteren commented 9 months ago

With emacs -Q , evil-mode becomes unavailable (also I believe you mean -q). I attached the bug in a webm vide below. You see me first working without mini-frame mode, performing an evil search and a swiper search. Then I activate mini-frame (which yields a nill) then after package initialize, swiper works but does not focus the buffer, evil search just exists. Hope this helps! bug_mini-frame.webm

JoshTRN commented 6 months ago

I have the same issue running spacemacs with evil-mode. I'm also using helm which is seemingly unsupported. This is a really cool project and I'd like to use it, but I'm not good enough at elisp to try to implement it myself.

Ideally, it would be cool if I could get mini-frame working with evil-mode commands, but for now, I think I'm going to stick to helm-posframe and just deal with my tiny little minibuffer.