Install required dependencies
$ pacman -S avahi pulseaudio-zeroconf
(defun chatgpt-shell-check-and-correct-paragraph () | |
"Check and correct the current paragraph using ChatGPT." | |
(interactive) | |
(let* ((bounds (bounds-of-thing-at-point 'paragraph)) | |
(start (car bounds)) | |
(end (cdr bounds)) | |
(original-text (buffer-substring-no-properties start end)) | |
(point-offset (- end (point))) ; Save the offset of point from end | |
(checked-text (chatgpt-shell-check-paragraph original-text))) | |
(when checked-text |