Bad-ptr / persp-mode.el

named perspectives(set of buffers/window configs) for emacs
402 stars 44 forks source link

conflict with ivy-posframe #113

Closed tshu-w closed 3 years ago

tshu-w commented 4 years ago

Reproduction guide

actiavate persp-mode and use persp-load-state-for-file to load last state, run M-x and ivy-posframe is broken.

if I run (posframe-delete-all), everything works fine, It seems there perp-mode persp-load-state-for-file broke posframe.

Screen Shot 2020-03-04 at 8 48 18 AM

ivy-posframe config

(use-package ivy-posframe
  :hook (ivy-mode . ivy-posframe-mode)
  :init
  (setq ivy-posframe-parameters '((left-fringe . 8) (right-fringe . 8))
        ivy-posframe-width 120
        ivy-posframe-display-functions-alist '((swiper . nil)
                                               (complete-symbol . ivy-posframe-display-at-point)
                                               (t . ivy-posframe-display-at-frame-center))))

System Info :computer:

tshu-w commented 4 years ago

and also company-box which uses frames to show candidates.

Bad-ptr commented 4 years ago

May be this will help:

(with-eval-after-load "persp-mode"
  (add-hook
   'after-make-frame-functions
   #'(lambda (f)
       (when (and (boundp 'posframe--frame)
                  (eq f posframe--frame))
         (set-frame-parameter f 'persp-ignore-wconf t)))))
Bad-ptr commented 4 years ago

Or with latest persp-mode:

(add-hook
 'persp-restore-window-conf-filter-functions
   #'(lambda (f p new-f-p)
        (with-selected-frame f
          (or (eq f posframe--frame) (window-dedicated-p)))))
tshu-w commented 3 years ago

Sorry, I will try in my free time, perhaps next February 😹️

linbinchen commented 3 years ago

Or with latest persp-mode:

(add-hook
 'persp-restore-window-conf-filter-functions
   #'(lambda (f p new-f-p)
        (with-selected-frame f
          (or (eq f posframe--frame) (window-dedicated-p)))))

Had the same issue here, solved by using the second snippet suggested. Thanks!

tshu-w commented 3 years ago

Since @linbinchen has tried it for me, I will close this issue.