karthink / gptel

A simple LLM client for Emacs
GNU General Public License v3.0
1.04k stars 113 forks source link

Send from transient window fails on Doom Emacs with org-mode #182

Closed edmundmiller closed 5 months ago

edmundmiller commented 5 months ago

I'm getting

Unbound suffix: ‘<return>’ (Use ‘C-g’ to abort, ‘?’ for help) [+org/dwim-at-point]

Whenever using gptel-menu and hitting "enter".

It seems to work from other modes such as markdown and elisp. I think it's this line https://github.com/karthink/gptel/blob/b432b2f3e7ec072f0df6655adda627696abffa7a/gptel-transient.el and these https://github.com/doomemacs/doomemacs/blob/03d692f129633e3bf0bd100d91b3ebf3f77db6d1/modules/lang/org/config.el#L1258-L1259 clashing.

I wish I knew how to set it to either or in the transient suffix map.

karthink commented 5 months ago

Two solutions:

  1. Press C-m instead of RET (see #75)
  2. Replace the send key with a key of your choice:
    (transient-suffix-put 'gptel-menu (kbd "RET") :key "<f8>")
edmundmiller commented 5 months ago

Awesome, I couldn't find the first issue, sorry for any duplication!

The second solution also works great, thank you so much!