ivy-posframe icon indicating copy to clipboard operation
ivy-posframe copied to clipboard

swiper-avy and ivy-posframe are having trouble

Open SreenivasVRao opened this issue 5 years ago • 10 comments

hi, thank you so much for this very nice package!

I've found a weird bug -

with the following settings, swiper-avy doesn't work... I have a keybinding C-s for swiper and C-' for swiper-avy.

But when I try: C-s (launch swiper), and C-h k to describe C-', it says it's bound to ivy-posframe-swiper-avy, and not to swiper-avy in swiper.el

(setq ivy-posframe-display-functions-alist '((swiper-avy . nil) (swiper . nil) (t . ivy-posframe-display-at-frame-center))) (setq ivy-posframe-parameters '((left-fringe . 8) (right-fringe . 8))) (ivy-posframe-mode 1)

I basically want swiper to be working without posframe...

SreenivasVRao avatar Nov 20 '19 17:11 SreenivasVRao

hmm, you need to unbind [swiper-avy] in ivy-posframe-mode-map. I check this issue by below sample init.el

;; ~/.debug.emacs.d/ivy-posframe-with-avy/init.el

;; you can run like 'emacs -q -l ~/.debug.emacs.d/{{pkg}}/init.el'
(when load-file-name
  (setq user-emacs-directory
        (expand-file-name (file-name-directory load-file-name))))

(prog1 "prepare leaf"
  (prog1 "package"
    (custom-set-variables
     '(package-archives '(("org"   . "https://orgmode.org/elpa/")
                          ("melpa" . "https://melpa.org/packages/")
                          ("gnu"   . "https://elpa.gnu.org/packages/"))))
    (package-initialize))

  (prog1 "leaf"
    (unless (package-installed-p 'leaf)
      (package-refresh-contents)
      (package-install 'leaf))))



(leaf avy :ensure t)

(leaf ivy
  :custom ((ivy-mode     . t)
           (counsel-mode . t))
  :config
  (leaf swiper
    :ensure t
    :bind (("C-s" . swiper)
           ("C-'" . swiper-avy)))

  (leaf ivy-posframe
    :ensure t
    :bind ((ivy-posframe-mode-map
            ([remap swiper-avy] . nil)))
    :custom ((ivy-posframe-mode . t)
             (ivy-posframe-display-functions-alist
              . '((swiper-avy . nil)
                  (swiper . nil)
                  (t . ivy-posframe-display-at-frame-center)))
             (ivy-posframe-parameters
              . '((left-fringe . 8)
                  (right-fringe . 8))))))

conao3 avatar Dec 27 '19 23:12 conao3

I tried that. It doesn't work... This is after calling swiper, searching for a word and calling swiper-avy: image

SreenivasVRao avatar Jan 19 '20 18:01 SreenivasVRao

@tumashu can you let me know about this? thanks! :)

SreenivasVRao avatar May 20 '20 19:05 SreenivasVRao

try run ivy-posframe-avy

tumashu avatar May 20 '20 22:05 tumashu

that jumps to ivy candidates - I want to jump to swiper candidates... I tried it anyway. Didn't work either.

So @conao3 was right about unbinding swiper-avy.

deleting this line works for me - https://github.com/tumashu/ivy-posframe/blob/master/ivy-posframe.el#L555

if you can tell me what the elisp way of editing this is, I'd appreciate it! :)

I tried (define-key ivy-posframe-mode-map "C-'" nil) but that didn't work...

SreenivasVRao avatar May 20 '20 23:05 SreenivasVRao

Maybe fixed, please try again

tumashu avatar May 21 '20 03:05 tumashu

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

weitongdao avatar Jul 31 '20 00:07 weitongdao

+1, 在 ivy-posframe 中 pyim 没有输入框

ionling avatar Aug 31 '20 02:08 ionling

@weitongdao 试试 (setq ivy-posframe-hide-minibuffer nil) 把,难看是难看,最起码能让你看到候选词

tumashu avatar Aug 31 '20 02:08 tumashu

@weitongdao 试试 (setq ivy-posframe-hide-minibuffer nil) 把,难看是难看,最起码能让你看到候选词

真棒, 可以了

ionling avatar Aug 31 '20 02:08 ionling