mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 05:29:12 +00:00
Skeleton to allow incremental search on Khoj via Emacs
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user