diff --git a/src/interface/emacs/khoj.el b/src/interface/emacs/khoj.el index 2c2f4172..c4a60e57 100644 --- a/src/interface/emacs/khoj.el +++ b/src/interface/emacs/khoj.el @@ -275,9 +275,8 @@ Use `which-key` if available, else display simple message in echo area" (encoded-query (url-hexify-string query))) (format "%s/api/search?q=%s&t=%s&r=%s&n=%s" khoj-server-url encoded-query content-type rerank khoj-results-count))) -(defun khoj--query-api-and-render-results (query content-type query-url buffer-name) - "Query Khoj API using QUERY, CONTENT-TYPE, QUERY-URL. -Render results in BUFFER-NAME." +(defun khoj--query-api-and-render-results (query-url content-type query buffer-name) + "Query Khoj QUERY-URL. Render results in BUFFER-NAME using QUERY, CONTENT-TYPE." ;; get json response from api (with-current-buffer buffer-name (let ((inhibit-read-only t) @@ -335,9 +334,9 @@ Render results in BUFFER-NAME." (setq khoj--rerank t) (message "Khoj: Rerank Results")) (khoj--query-api-and-render-results - query - khoj--content-type query-url + khoj--content-type + query khoj-buffer-name)))))) (defun khoj--delete-open-network-connections-to-server () @@ -438,9 +437,9 @@ Render results in BUFFER-NAME." (buffer-name (get-buffer-create khoj--buffer-name))) (progn (khoj--query-api-and-render-results - query-title - content-type query-url + content-type + query-title buffer-name) (switch-to-buffer buffer-name) (goto-char (point-min)))))