Closed ajgrf closed 3 months ago
I have (add-hook 'gptel-post-response-functions 'gptel-end-of-response) in my config, and it recently started causing an error.
(add-hook 'gptel-post-response-functions 'gptel-end-of-response)
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) >(nil 0) (if (> arg 0) #'text-property-search-forward #'text-property-search-backward) (let ((search (if (> arg 0) #'text-property-search-forward #'text-property-search-backward))) (let ((upper-bound (abs arg)) (counter 0)) (while (< counter upper-bound) (let ((_ counter)) (funcall search 'gptel 'response t) (if (> arg 0) (if (looking-at (concat "\n\\{1,2\\}" ... "?")) (progn (goto-char ...))) (if (looking-back (concat ... "?") (point-min)) (progn (goto-char ...))))) (setq counter (1+ counter))))) gptel-end-of-response(41 156) run-hook-with-args(gptel-end-of-response 41 156) gptel-curl--stream-cleanup(#<process gptel-curl> "finished\n")
I believe this was caused by recent commit 376fb4b423 which doesn't handle a nil prefix arg passed to gptel-end-of-response.
gptel-end-of-response
Thanks for all your hard work on gptel, I use it quite a bit!
Fixed, thank you for reporting this.
I have
(add-hook 'gptel-post-response-functions 'gptel-end-of-response)
in my config, and it recently started causing an error.I believe this was caused by recent commit 376fb4b423 which doesn't handle a nil prefix arg passed to
gptel-end-of-response
.Thanks for all your hard work on gptel, I use it quite a bit!