Remove org link syntax from help search commands

And prevent ivy sorting them.
This commit is contained in:
Henrik Lissner 2019-05-19 19:15:29 -04:00
parent 9d5e8fdda4
commit 8aa6273dcf
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -146,7 +146,7 @@ selection of all minor-modes, active or not."
(list (or (+org-get-property "TITLE") (list (or (+org-get-property "TITLE")
(file-relative-name buffer-file-name)))) (file-relative-name buffer-file-name))))
path path
(list text)) (list (replace-regexp-in-string org-any-link-re "\\4" text)))
" > ") " > ")
tags) tags)
" ") " ")
@ -158,6 +158,7 @@ selection of all minor-modes, active or not."
;;;###autoload ;;;###autoload
(defun doom-completing-read-org-headings (prompt files &optional depth include-files initial-input) (defun doom-completing-read-org-headings (prompt files &optional depth include-files initial-input)
"TODO" "TODO"
(let (ivy-sort-functions-alist)
(if-let* ((result (completing-read (if-let* ((result (completing-read
prompt prompt
(doom--org-headings files depth include-files) (doom--org-headings files depth include-files)
@ -166,7 +167,7 @@ selection of all minor-modes, active or not."
(get-text-property 0 'location result) (get-text-property 0 'location result)
(find-file file) (find-file file)
(goto-char location)) (goto-char location))
(user-error "Aborted"))) (user-error "Aborted"))))
;;;###autoload ;;;###autoload
(defun doom/help () (defun doom/help ()
@ -178,7 +179,6 @@ selection of all minor-modes, active or not."
(defun doom/help-search (&optional initial-input) (defun doom/help-search (&optional initial-input)
"Search Doom's documentation and jump to a headline." "Search Doom's documentation and jump to a headline."
(interactive) (interactive)
(let (ivy-sort-functions-alist)
(doom-completing-read-org-headings (doom-completing-read-org-headings
"Find in Doom help: " "Find in Doom help: "
(list "getting_started.org" (list "getting_started.org"
@ -187,7 +187,7 @@ selection of all minor-modes, active or not."
"tutorials.org" "tutorials.org"
"faq.org" "faq.org"
"../modules/README.org") "../modules/README.org")
2 t initial-input))) 2 t initial-input))
;;;###autoload ;;;###autoload
(defun doom/help-faq (&optional initial-input) (defun doom/help-faq (&optional initial-input)