Replies: 1 comment
-
That would be an Org/Markdown feature I think. (defun org-babel-kill-ring-save ()
(interactive)
(let* ((elem (org-element-context))
(start (progn (goto-char (org-element-begin elem))
(forward-line) (point)))
(end (progn (goto-char (org-element-end elem))
(skip-chars-backward " \n")
(forward-line 0)
(point))))
(unless (= start end) (kill-ring-save start end)))) If the source block is intended for another Emacs buffer, using a chat buffer and copying output afterwards is probably an inefficient/tiresome way to go about this. You can redirect the LLM response instead when making the request. Just be sure to add a directive to produce only code as a response. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a command to copy the source block to the kill-ring?
I think that would save me a few hours every day;)
Beta Was this translation helpful? Give feedback.
All reactions