(fix): remove org-roam-completion-case-sensitive (#1060)
Case sensitivity for completions is already controlled via `completion-ignore-case`, so we remove this variable that doesn't actually do what is expected.
This commit is contained in:
parent
38234b491d
commit
f6bf9d9401
1 changed files with 7 additions and 8 deletions
15
org-roam.el
15
org-roam.el
|
@ -1112,11 +1112,6 @@ This function hooks into `org-open-at-point' via
|
||||||
nil)))))
|
nil)))))
|
||||||
|
|
||||||
;;; Completion at point
|
;;; Completion at point
|
||||||
(defcustom org-roam-completion-case-sensitive nil
|
|
||||||
"If t, completions for Org-roam become case sensitive."
|
|
||||||
:group 'org-roam
|
|
||||||
:type 'boolean)
|
|
||||||
|
|
||||||
(defconst org-roam-fuzzy-link-regexp
|
(defconst org-roam-fuzzy-link-regexp
|
||||||
(rx (seq "[["
|
(rx (seq "[["
|
||||||
(group
|
(group
|
||||||
|
@ -1165,9 +1160,7 @@ This function hooks into `org-open-at-point' via
|
||||||
(if (functionp collection)
|
(if (functionp collection)
|
||||||
(completion-table-dynamic
|
(completion-table-dynamic
|
||||||
(lambda (_)
|
(lambda (_)
|
||||||
(cl-remove-if (if org-roam-completion-case-sensitive
|
(cl-remove-if (apply-partially #'string= prefix)
|
||||||
(apply-partially 'string= prefix)
|
|
||||||
(lambda (s) (string-collate-equalp prefix s nil t)))
|
|
||||||
(funcall collection))))
|
(funcall collection))))
|
||||||
collection)
|
collection)
|
||||||
:exit-function exit-fn)))))
|
:exit-function exit-fn)))))
|
||||||
|
@ -1446,10 +1439,16 @@ during the next idle slot."
|
||||||
(setq org-roam--file-update-queue nil)))
|
(setq org-roam--file-update-queue nil)))
|
||||||
|
|
||||||
;;;; Hooks and Advices
|
;;;; Hooks and Advices
|
||||||
|
(defcustom org-roam-file-setup-hook nil
|
||||||
|
"Hook that is run on setting up an Org-roam file."
|
||||||
|
:group 'org-roam
|
||||||
|
:type 'hook)
|
||||||
|
|
||||||
(defun org-roam--find-file-hook-function ()
|
(defun org-roam--find-file-hook-function ()
|
||||||
"Called by `find-file-hook' when mode symbol `org-roam-mode' is on."
|
"Called by `find-file-hook' when mode symbol `org-roam-mode' is on."
|
||||||
(when (org-roam--org-roam-file-p)
|
(when (org-roam--org-roam-file-p)
|
||||||
(setq org-roam-last-window (get-buffer-window))
|
(setq org-roam-last-window (get-buffer-window))
|
||||||
|
(run-hooks 'org-roam-file-setup-hook) ; Run user hooks
|
||||||
(add-hook 'post-command-hook #'org-roam-buffer--update-maybe nil t)
|
(add-hook 'post-command-hook #'org-roam-buffer--update-maybe nil t)
|
||||||
(add-hook 'before-save-hook #'org-roam--replace-fuzzy-link-on-save nil t)
|
(add-hook 'before-save-hook #'org-roam--replace-fuzzy-link-on-save nil t)
|
||||||
(add-hook 'after-save-hook #'org-roam--queue-file-for-update nil t)
|
(add-hook 'after-save-hook #'org-roam--queue-file-for-update nil t)
|
||||||
|
|
Loading…
Reference in a new issue