Fix to let user to start enter query right after initiating khoj on emacs

- Fix regression since moving to use `which-key-show-full-keymap~
- The above function reads user keypress, so eats up 1 keypress
  before starting to enter query
- No way to pass no-paging config via the external function to the
  internally used which-key--show-keymap function that does allow
  setting no-paging to not read user keypress
- So use the internal function instead and set no-paging arg to t
This commit is contained in:
Debanjum Singh Solanky 2022-08-07 15:57:08 +03:00
parent e95686c89c
commit f3c1512c38

View file

@ -97,7 +97,9 @@ C-x i | images
Use `which-key` if available, else display simple message in echo area"
(if (fboundp 'which-key-show-full-keymap)
(let ((khoj--keymap (khoj--make-search-keymap)))
(which-key-show-full-keymap 'khoj--keymap))
(which-key--show-keymap (symbol-name 'khoj--keymap)
(symbol-value 'khoj--keymap)
nil t t))
(message "%s" khoj--keybindings-info-message)))
(defun khoj--extract-entries-as-markdown (json-response query)
@ -242,7 +244,7 @@ Use `which-key` if available, else display simple message in echo area"
(delete-process proc)))))
(defun khoj--teardown-incremental-search ()
(message "[Khoj]: Teardown Incremental Search")
(message "Khoj: Teardown Incremental Search")
;; remove advice to rerank results on normal exit from minibuffer
(advice-remove 'exit-minibuffer #'khoj--minibuffer-exit-advice)
;; unset khoj minibuffer window