bmag / emacs-purpose

Manage Windows and Buffers According to Purposes
GNU General Public License v3.0
498 stars 23 forks source link

Symbol’s function definition is void: user-action-sequence #196

Open jaeyeom opened 5 months ago

jaeyeom commented 5 months ago

I encounter the following error message whenever I do "M-x gptel" and choose the default buffer to create ChatGPT. 100% reproducible for me.

helm-M-x-execute-command: Symbol’s function definition is void: user-action-sequence

I digged into it a bit. The error occurs in purpose--action-function, It seems that alist for user-action-sequence key becomes (user-action-sequence pop-to-buffer) instead of solely (pop-to-buffer). I'm not sure if the purpose-display-buffer-advice is applied twice or some function like display-buffer was called recursively (#140 ) or not, but that happens in this particular case for me.

The following is the purpose message, which looks pretty useful.

Purpose display: Buffer: #<buffer *helm M-x*>; Alist: ((window-height . 0.4) (window-width . 0.6) (side . bottom) (inhibit-same-window . t)) [2 times]
Purpose display: Buffer: #<buffer *helm-mode-gptel*>; Alist: ((window-height . 0.4) (window-width . 0.6) (side . bottom) (inhibit-same-window . t))
Purpose display: Buffer: #<buffer *ChatGPT*>; Alist: ((user-action-sequence pop-to-buffer))
trying: pop-to-buffer
pop-to-buffer advice
Purpose display: Buffer: #<buffer *ChatGPT*>; Alist: ((user-action-sequence user-action-sequence pop-to-buffer))
trying: user-action-sequence
helm-M-x-execute-command: Symbol’s function definition is void: user-action-sequence
Purpose display: Buffer: #<buffer *helm mini*>; Alist: ((window-height . 0.4) (window-width . 0.6) (side . bottom) (inhibit-same-window . t))

Emacs version: 29.4 (But it happened on 29.3 as well)

marcantonio commented 3 months ago

I'm having the same issue. I found the issue reported to gptel here. That issue is reported for spacemacs which uses purpose. A spacemacs workaround was merged here.

I'm not crazy about the workaround, and I'm also not using spacemacs.

jaeyeom commented 1 month ago

FYI, in the case of gptel, Spacemacs has layer that workaround this issue and documentation on gptel is updated.

https://github.com/karthink/gptel/pull/412