Fix open-file-inactive

This commit is contained in:
Phil Bajsicki 2025-05-24 03:48:56 +02:00
parent 8e8fe1186f
commit 5c056e0183
2 changed files with 6 additions and 6 deletions

View file

@ -296,9 +296,9 @@ Disabled for now, as it's causing some issues.
Opens a file into an inactive (background) buffer for processing.
#+begin_src elisp
(defun gptel-org-tools--open-file-inactive (file)
"Open FILE in a buffer."
(with-current-buffer (get-buffer-create file)
(current-buffer)))
"Open FILE in a background buffer without modifying its contents."
(find-file-noselect file)
(set-buffer-modified-p nil))
(add-to-list 'gptel-org-tools
(gptel-make-tool

View file

@ -106,9 +106,9 @@
:category "filesystem"))
(defun gptel-org-tools--open-file-inactive (file)
"Open FILE in a buffer."
(with-current-buffer (get-buffer-create file)
(current-buffer)))
"Open FILE in a background buffer without modifying its contents."
(find-file-noselect file)
(set-buffer-modified-p nil))
(add-to-list 'gptel-org-tools
(gptel-make-tool