Use a temp buffer to read the FAQ in helm-spacemacs
Correct a bug in helm-spacemacs: Whenever a function was needing the FAQ's candidates in helm-spacemancs (`SPC f e h` and `SPC f e f`), the `FAQ.org` file was open in a buffer and not closed. This commit corrects this by loading the content of `FAQ.org` in a temp buffer and switch it to `org-mode` in order to get the candidates.
This commit is contained in:
parent
cde101955d
commit
6442e00b2e
|
@ -279,8 +279,10 @@
|
|||
(cons (concat (match-string 1 str) ": "
|
||||
(match-string 2 str))
|
||||
(cdr c)))))
|
||||
(helm-get-org-candidates-in-file
|
||||
(concat spacemacs-docs-directory "FAQ.org") 2 8 nil t))))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents (concat spacemacs-docs-directory "FAQ.org"))
|
||||
(org-mode)
|
||||
(helm-get-org-candidates-in-file (current-buffer) 2 8 nil t)))))
|
||||
|
||||
(provide 'helm-spacemacs)
|
||||
|
||||
|
|
Loading…
Reference in a new issue