Fix indent
This commit is contained in:
parent
ca1fa23ca9
commit
9174b29437
2 changed files with 35 additions and 34 deletions
|
@ -546,6 +546,7 @@ And, the "grab everything that matches" tool.
|
|||
:category "org-ql")
|
||||
#+end_src
|
||||
|
||||
|
||||
** End
|
||||
:PROPERTIES:
|
||||
:CREATED: <2025-04-14 Mon 22:46>
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
(with-temp-buffer
|
||||
(ibuffer)
|
||||
(let ((content (buffer-string)))
|
||||
(kill-buffer (current-buffer))
|
||||
content)))
|
||||
(kill-buffer (current-buffer))
|
||||
content)))
|
||||
:name "list-buffers"
|
||||
:description "Access the list of buffers open in Emacs, including file names and full paths."
|
||||
:args (list '(:name "arg"
|
||||
|
@ -76,12 +76,12 @@
|
|||
|
||||
(gptel-make-tool
|
||||
:function (lambda (file)
|
||||
(find-file-noselect file))
|
||||
(find-file-noselect file))
|
||||
:name "find-file-noselect"
|
||||
:description "Open the file in a buffer. This doesn't interfere with the user."
|
||||
:args (list '(:name "file"
|
||||
:type string
|
||||
:description "Path to file.."))
|
||||
:type string
|
||||
:description "Path to file.."))
|
||||
:category "filesystem")
|
||||
|
||||
(defun gptel-org-tools-org-extract-tags (buffer)
|
||||
|
@ -136,8 +136,8 @@
|
|||
(buffer-substring-no-properties
|
||||
(line-beginning-position)
|
||||
(progn
|
||||
(outline-next-heading)
|
||||
(line-beginning-position)))))))
|
||||
(outline-next-heading)
|
||||
(line-beginning-position)))))))
|
||||
|
||||
(gptel-make-tool
|
||||
:function #'gptel-org-tools-org-ql-select
|
||||
|
@ -179,8 +179,8 @@
|
|||
(with-temp-buffer
|
||||
(org-agenda-list (or days 14))
|
||||
(let ((content (buffer-string)))
|
||||
(kill-buffer (current-buffer))
|
||||
content)))
|
||||
(kill-buffer (current-buffer))
|
||||
content)))
|
||||
:name "org-agenda-fortnight"
|
||||
:description "Get the next 14 days of user's org-agenda."
|
||||
:args (list '(:name "days"
|
||||
|
@ -212,27 +212,27 @@
|
|||
:category "org-ql")
|
||||
|
||||
(defun gptel-org-tools-org-ql-select-headings-rifle (buf query)
|
||||
(org-ql-select
|
||||
(get-buffer buf)
|
||||
`(rifle ,query)
|
||||
:action :action #'(lambda ()
|
||||
(concat
|
||||
(buffer-substring-no-properties
|
||||
(line-beginning-position)
|
||||
(line-end-position))))))
|
||||
(org-ql-select
|
||||
(get-buffer buf)
|
||||
`(rifle ,query)
|
||||
:action :action #'(lambda ()
|
||||
(concat
|
||||
(buffer-substring-no-properties
|
||||
(line-beginning-position)
|
||||
(line-end-position))))))
|
||||
|
||||
|
||||
(gptel-make-tool
|
||||
:function #'gptel-org-tools-org-ql-select-headings-rifle
|
||||
:name "org-ql-select-headings-rifle"
|
||||
:description "Retreive headings from buffer using org-ql-select. Matches against both heading and content. Using filename fails."
|
||||
:args (list '(:name "buffer"
|
||||
:type string
|
||||
:description "The name of the buffer. See the NAME column in ~emacs-list-buffers~.")
|
||||
'(:name "query"
|
||||
:type string
|
||||
:description "The string to pass into org-ql-select-headings-rifle. This is a bare string. Example: \"searchterm\""))
|
||||
:category "org-ql")
|
||||
(gptel-make-tool
|
||||
:function #'gptel-org-tools-org-ql-select-headings-rifle
|
||||
:name "org-ql-select-headings-rifle"
|
||||
:description "Retreive headings from buffer using org-ql-select. Matches against both heading and content. Using filename fails."
|
||||
:args (list '(:name "buffer"
|
||||
:type string
|
||||
:description "The name of the buffer. See the NAME column in ~emacs-list-buffers~.")
|
||||
'(:name "query"
|
||||
:type string
|
||||
:description "The string to pass into org-ql-select-headings-rifle. This is a bare string. Example: \"searchterm\""))
|
||||
:category "org-ql")
|
||||
|
||||
(defun gptel-org-tools-org-ql-select-tags-local (buf query)
|
||||
(org-ql-select
|
||||
|
@ -243,8 +243,8 @@
|
|||
(buffer-substring-no-properties
|
||||
(line-beginning-position)
|
||||
(progn
|
||||
(outline-next-heading)
|
||||
(line-beginning-position)))))))
|
||||
(outline-next-heading)
|
||||
(line-beginning-position)))))))
|
||||
|
||||
|
||||
(gptel-make-tool
|
||||
|
@ -268,8 +268,8 @@
|
|||
(buffer-substring-no-properties
|
||||
(line-beginning-position)
|
||||
(progn
|
||||
(outline-next-heading)
|
||||
(line-beginning-position)))))))
|
||||
(outline-next-heading)
|
||||
(line-beginning-position)))))))
|
||||
|
||||
|
||||
(gptel-make-tool
|
||||
|
@ -293,8 +293,8 @@
|
|||
(buffer-substring-no-properties
|
||||
(line-beginning-position)
|
||||
(progn
|
||||
(outline-next-heading)
|
||||
(line-beginning-position)))))))
|
||||
(outline-next-heading)
|
||||
(line-beginning-position)))))))
|
||||
|
||||
(gptel-make-tool
|
||||
:function #'gptel-org-tools-org-ql-select-rifle
|
||||
|
|
Loading…
Add table
Reference in a new issue