mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-12-12 08:43:03 +01:00
Fix true/false evaluation in Emacs to prevent unintended index re-indexing
Previously, the code incorrectly treated all non-nil values as true, leading to the index being re-indexed with the force flag whenever the user selected to update the index.
This commit is contained in:
parent
0e9e9648e6
commit
f16b0f628b
1 changed files with 1 additions and 1 deletions
|
@ -1265,7 +1265,7 @@ Paragraph only starts at first text after blank line."
|
||||||
(transient-define-suffix khoj--update-command (&optional args)
|
(transient-define-suffix khoj--update-command (&optional args)
|
||||||
"Call khoj API to update index of specified content type."
|
"Call khoj API to update index of specified content type."
|
||||||
(interactive (list (transient-args transient-current-command)))
|
(interactive (list (transient-args transient-current-command)))
|
||||||
(let* ((force-update (if (member "--force-update" args) "true" "false"))
|
(let* ((force-update (if (member "--force-update" args) t nil))
|
||||||
;; set content type to: specified > last used > based on current buffer > default type
|
;; set content type to: specified > last used > based on current buffer > default type
|
||||||
(content-type (or (transient-arg-value "--content-type=" args) (khoj--buffer-name-to-content-type (buffer-name))))
|
(content-type (or (transient-arg-value "--content-type=" args) (khoj--buffer-name-to-content-type (buffer-name))))
|
||||||
(url-request-method "GET"))
|
(url-request-method "GET"))
|
||||||
|
|
Loading…
Reference in a new issue