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