Allow user to override inferred search type with other valid options

This commit is contained in:
Debanjum Singh Solanky 2021-09-10 00:54:10 -07:00
parent 3bdeeb1e19
commit 7d5514ecaa

View file

@ -78,7 +78,8 @@
(defun semantic-search (query)
"Semantic search on org-mode content via semantic-search API"
(interactive "sQuery: ")
(let* ((search-type (semantic-search--buffer-name-to-search-type (buffer-name)))
(let* ((default-type (semantic-search--buffer-name-to-search-type (buffer-name)))
(search-type (completing-read "Type: " '("notes" "ledger" "music") nil t default-type))
(url (semantic-search--construct-api-query query search-type))
(buff (get-buffer-create "*semantic-search*")))
;; get json response from api