perspective-el icon indicating copy to clipboard operation
perspective-el copied to clipboard

helm mini frame errors saying no such buffer

Open rmNULL opened this issue 2 years ago • 5 comments

Briefing

Using helm apropos in a mini frame errors with "with "No such live buffer *helm apropos*". I know this is not a helm error as this error only occurs when persp-mode is enabled. If we enable persp-mode after the call to helm-apropos command, then the bug disappears.

Steps to reproduce

In order to test this i've used the testing helm distribution emacs-helm.sh

  1. run emacs-helm.sh
  2. Evaluate this in a buffer
(add-to-list 'helm-commands-using-frame 'helm-apropos)
(straight-use-package 'perspective)
(persp-mode)
  1. M-x helm-apropos RET gzip RET Receive an error saying "No such live buffer *helm apropos*"
  2. (persp-mode -1)
  3. M-x helm-apropos RET gzip RET now it works fine
  4. (persp-mode) It works fine after this point

Test Snippet

(add-to-list 'helm-commands-using-frame 'helm-apropos)
(straight-use-package 'perspective)
(persp-mode)

;;
;; M-x helm-apropos RET gzip RET
;; errors with "No such live buffer *helm apropos*"

;; (persp-mode -1)
;;
;; M-x helm-apropos RET gzip RET
;; works fine


;; (persp-mode)
;; works alright after this.
;;

Recording

https://user-images.githubusercontent.com/8173131/162042604-cc7cdf11-fbfc-4f10-90a6-1f322a6f0e84.mp4

Thanks

rmNULL avatar Apr 06 '22 17:04 rmNULL

I reproduced the error. Won't have time to look into it in the next few days. If you want to try debugging it yourself, it probably has something to do with the way Perspective cleans up buffers when a frame is closed. A workaround might be for Perspective to detect frames being allocated by Helm and avoid calling persp-init-frame on them.

gcv avatar Apr 07 '22 14:04 gcv

Thanks for the tips, i'll look into it on my free time.

rmNULL avatar Apr 07 '22 16:04 rmNULL

If that turns out to be the problem, another fix is to patch Helm to open its child frame without parameters. I don't remember exactly how to do it, but I think both posframe and emacs-mini-frame do this.

gcv avatar Apr 07 '22 16:04 gcv

Ah, I’ve just been running into this as well. I’ll try to come up with a fix, too.

sellout avatar Jan 25 '23 21:01 sellout

I've been running into a similar "no such buffer" error message since installing this package. However, I am using Corfu, not Helm.

montchr avatar Sep 20 '23 18:09 montchr