emacs-openai / chatgpt

Use ChatGPT inside Emacs
GNU General Public License v3.0
193 stars 21 forks source link

Should `chatgpt` use the minibuffer rather than a small dedicated buffer? #5

Closed benthamite closed 1 year ago

benthamite commented 1 year ago

Is there a reason for using a dedicated ordinary buffer to prompt GPT rather than the minibuffer? The latter is less obtrusive, supports prompting history, and generally benefits from all the features of minibuffer completion. This is also how the similar package gpt.el does it. (I prefer this package over gpt.el because it is based on the openai Elisp library and because it supports GPT-4.)

jcs090218 commented 1 year ago

You can set, (setq chatgpt-input-method 'minibuffer).

https://github.com/emacs-openai/chatgpt/blob/d5e773de2b31a1227d8e1a8946c99e8691bcf375/chatgpt.el#L65-L69

The default is window because I want to insert newline with Shift+return. I can do that easily with a self-defined major-mode. In minibuffer, there isn't a "good" way to do that (not using hackable ways), so I don't have it by default.

benthamite commented 1 year ago

Apologies: I did take a look at the customization section before opening the issue but somehow missed the relevant line.