tumashu / ivy-posframe

ivy-posframe is a ivy extension, which let ivy use posframe to show its candidate menu, ivy-posframe is a **GNU ELPA** package.
415 stars 26 forks source link

Combination of swiper, doom-modeline, a mode like dired or magit and a second tty frame seems to break the swiper posframe keymap #88

Open Alexander-Miller opened 4 years ago

Alexander-Miller commented 4 years ago

FYI @seagle0128 @abo-abo

The combination sounds crazy, but I discovered it with implementing what I think is a perfectly legitimate use-case: a small shell script that uses emacsclient to open a tty frame and run magit for the current repository.

As long as that tty frame remains open and keeps showing the magit window the keymap of the ivy-posframe appears to be inactive or broken, some keys like "n" no longer add text to swiper's search, but do something else instead.

It looks like the keys may be passed down to the underlying keymap since with my full setup keys like "n" and "o" would call evil-ex-search-next and evil-open-below, but I'm not sure how to debug that exactly.

Magit is not required for this, dired has the same problem, but things do work correctly if the tty frame is showing an elisp-mode file like the scratch buffer.

You can reproduce things from emacs -q with this recipe:

(server-start)
(dolist (path (directory-files "/home/a/.emacs.d/elpa/26.3/develop" :full))
  (when (file-directory-p path)
    (add-to-list 'load-path path)))
(require 'posframe)
(require 'swiper)
(require 'ivy-posframe)
(require 'doom-modeline)
(push '(swiper . ivy-posframe-display-at-frame-bottom-window-center) ivy-posframe-display-functions-alist)
(ivy-posframe-mode t)

Then run the following in a terminal:

emacsclient -nw -e "(dired \".\")"

The result should look like this: https://imgur.com/a/RKznvWC

If you now run swiper in the gui frame you'll be able to observe the problem.

weitongdao commented 4 years ago

呆神,请问下,pyim五笔候选框在 ivy-posframe中无法显示,只能通过盲猜输入汉字候选词条。 @tumashu

ztlevi commented 4 years ago

I have similar issue in doom. Typing in ivy-posframe no longer working instead the keybinding is evil based. I can input i and then edit the entire search bar instead of just the search box

glenn-m commented 4 years ago

I'm also seeing the behavior @ztlevi describes.

tumashu commented 4 years ago

Does "emacs -Q" and enable evil has this problem? @ztlevi

ztlevi commented 4 years ago

@tumashu It's hard to reproduce because it doesn't fail in the beginning. It will fail after a while and I have no idea what causes it.

But I feel like this happens after I switch to emacs 27.

glenn-m commented 4 years ago

Yes, this only started for me after emacs 27.