Fix open-file-inactive
This commit is contained in:
parent
8e8fe1186f
commit
5c056e0183
2 changed files with 6 additions and 6 deletions
|
@ -296,9 +296,9 @@ Disabled for now, as it's causing some issues.
|
||||||
Opens a file into an inactive (background) buffer for processing.
|
Opens a file into an inactive (background) buffer for processing.
|
||||||
#+begin_src elisp
|
#+begin_src elisp
|
||||||
(defun gptel-org-tools--open-file-inactive (file)
|
(defun gptel-org-tools--open-file-inactive (file)
|
||||||
"Open FILE in a buffer."
|
"Open FILE in a background buffer without modifying its contents."
|
||||||
(with-current-buffer (get-buffer-create file)
|
(find-file-noselect file)
|
||||||
(current-buffer)))
|
(set-buffer-modified-p nil))
|
||||||
|
|
||||||
(add-to-list 'gptel-org-tools
|
(add-to-list 'gptel-org-tools
|
||||||
(gptel-make-tool
|
(gptel-make-tool
|
||||||
|
|
|
@ -106,9 +106,9 @@
|
||||||
:category "filesystem"))
|
:category "filesystem"))
|
||||||
|
|
||||||
(defun gptel-org-tools--open-file-inactive (file)
|
(defun gptel-org-tools--open-file-inactive (file)
|
||||||
"Open FILE in a buffer."
|
"Open FILE in a background buffer without modifying its contents."
|
||||||
(with-current-buffer (get-buffer-create file)
|
(find-file-noselect file)
|
||||||
(current-buffer)))
|
(set-buffer-modified-p nil))
|
||||||
|
|
||||||
(add-to-list 'gptel-org-tools
|
(add-to-list 'gptel-org-tools
|
||||||
(gptel-make-tool
|
(gptel-make-tool
|
||||||
|
|
Loading…
Add table
Reference in a new issue