1
0
Fork 0

Shadow C-c C-o to open an URL instead of flushing output

It's easy to lose previous outputs when using this binding if the
expectation is that you open an URL like in Org-Mode. Instead, bind it
to goto-address-at-point.
This commit is contained in:
Bram Schoenmakers 2024-01-11 22:12:32 +01:00
parent 5097198ef9
commit 17fde02763

View file

@ -348,7 +348,14 @@ Returns a formatted string to be displayed by the shell."
(defun kagi-fastgpt-shell ()
"Start an FastGPT shell."
(interactive)
(shell-maker-start kagi-fastgpt--config))
(shell-maker-start kagi-fastgpt--config)
;; C-c C-o is in the comint-mode-map which flushes the output at
;; point. This is undesired, one may accidentally use this key
;; sequence to open a URL since that is the default binding in Org
;; mode. Instead, mimic the same behavior as Org mode (next to the
;; default binding C-c RET).
(keymap-set fastgpt-shell-mode-map "C-c C-o" #'goto-address-at-point))
;;; Summarizer