Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ediff control frame popup failed, when together with pyim or lsp-bridge #2

Open
sawyerzheng opened this issue Jan 9, 2025 · 1 comment

Comments

@sawyerzheng
Copy link

My analysis, tools like pyim and lsp-bridge's acm.el will make a completion buffer which will not deleted after cancelled or finished the completion.

  1. It is OK, when not enabled persp-mode-project-bridge.

  2. But, if I enable persp-mode-project-bridge, it will failed to popup *Ediff Control Panel* buffer in the popup frame, as the dedicated frame will be occupied by the comletion buffer of pyim or lsp-bridge's acm.el.

how to reproduce:

  1. enable persp-mode, enable persp-mode-project-bridge
  2. use pyim
  3. use ediff

error image:

image

@sawyerzheng
Copy link
Author

My own temporary fix. Hope it can help ones who need it:

(defun my/persp-mode-project-bridge-fix-fn ()
  (interactive)
  (mapcar (lambda (buff-name)
	    (when (buffer-live-p (get-buffer buff-name))
	      (kill-buffer buff-name)))
	  '(" *pyim-page--posframe-buffer*" " *acm-buffer*")))

(defun my/persp-mode-project-bridge-fix-advice-fn (orig-fn &rest args)
  (my/persp-mode-project-bridge-fix-fn)
  (apply orig-fn args))

(advice-add #'make-frame-command :around #'my/persp-mode-project-bridge-fix-advice-fn)
(advice-add #'ediff :around #'my/persp-mode-project-bridge-fix-advice-fn)
(advice-add #'ediff3 :around #'my/persp-mode-project-bridge-fix-advice-fn)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant