From b7aa22a059de8c6c492bde44c46d007db749fdcb Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Fri, 20 Jan 2023 22:11:00 -0300 Subject: [PATCH] Change order of arg passed to query-api-and-render-results by importance --- src/interface/emacs/khoj.el | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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)))))