branch: elpa/gptel commit 6090687150e4781e93c1d736e2b8d1e6be60054f Author: StrawberryTea <l...@strawberrytea.xyz> Commit: GitHub <nore...@github.com>
gptel-context: Use default when reading buffer (#595) gptel-context.el (gptel-context-add): Use current buffer as default when reading a buffer. --- gptel-context.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gptel-context.el b/gptel-context.el index d9db08a2bc..acdc7ca02b 100644 --- a/gptel-context.el +++ b/gptel-context.el @@ -135,7 +135,8 @@ context chunk. This is accessible as, for example: (buffer-file-name))) ;; No region is selected, and ARG is positive. ((and arg (> (prefix-numeric-value arg) 0)) - (let* ((buffer-name (read-buffer "Choose buffer to add as context: " nil t)) + (let* ((buffer-name (read-buffer "Choose buffer to add as context: " + (current-buffer) t)) (start (with-current-buffer buffer-name (point-min))) (end (with-current-buffer buffer-name (point-max)))) (gptel-context--add-region