mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-30 19:03:01 +01:00
Skeleton to allow incremental search on Khoj via Emacs
This commit is contained in:
parent
1168244c92
commit
3fa7d8f03a
1 changed files with 13 additions and 0 deletions
|
@ -122,6 +122,19 @@
|
|||
(let ((encoded-query (url-hexify-string query)))
|
||||
(format "%s/search?q=%s&t=%s" khoj--server-url encoded-query search-type)))
|
||||
|
||||
(defun query-khoj (beg end len)
|
||||
(let ((query (minibuffer-contents)))
|
||||
(message "t")))
|
||||
|
||||
(defun remove-khoj ()
|
||||
(remove-hook 'after-change-functions #'query-khoj))
|
||||
|
||||
(minibuffer-with-setup-hook
|
||||
(lambda ()
|
||||
(add-hook 'after-change-functions #'query-khoj)
|
||||
(add-hook 'minibuffer-exit-hook #'remove-khoj))
|
||||
(read-string "Query: "))
|
||||
|
||||
;;;###autoload
|
||||
(defun khoj (query)
|
||||
"Search your content naturally using the Khoj API"
|
||||
|
|
Loading…
Reference in a new issue