diff options
| author | jao <jao@gnu.org> | 2022-08-08 01:09:29 +0100 |
|---|---|---|
| committer | jao <jao@gnu.org> | 2022-08-08 01:09:29 +0100 |
| commit | 713ddd9a7d639d107711181d7619e3698478580f (patch) | |
| tree | fdaf0bdae00e6daa13aa8429bdc545efa4d190b8 | |
| parent | 8299efb610178a73ea809de74f87d724ee6183d6 (diff) | |
optional embark integration
| -rw-r--r-- | consult-recoll.el | 9 | ||||
| -rw-r--r-- | readme.org | 14 |
2 files changed, 21 insertions, 2 deletions
diff --git a/consult-recoll.el b/consult-recoll.el index 02c3b5f..d6b57bd 100644 --- a/consult-recoll.el +++ b/consult-recoll.el @@ -236,5 +236,14 @@ With prefix argument ASK, the user is prompted for an initial query string." (if (stringp ask) ask (read-string "Initial query: "))))) (consult-recoll--open (consult-recoll--search initial)))) +;;;###autoload +(defun consult-recoll-embark-setup () + "Set up integration with embark. +In particular, allow opening candidates from embark-collect +buffers." + (add-to-list 'embark-default-action-overrides + '(recoll-result . consult-recoll--open))) + + (provide 'consult-recoll) ;;; consult-recoll.el ends here @@ -25,9 +25,9 @@ a sophisticated query language, and, for some document kinds, snippets in the the found documents actually matching the query at hand. This package provides an emacs interface to perform recoll queries, and -display its results, via [[https://github.com/minad/consult][consult]]. It is also recommened that you use a a +display its results, via [[http://elpa.gnu.org/packages/consult.html][consult]]. It is also recommened that you use a a package for vertical display of completions that works well with /consult/, such -as [[https://github.com/minad/vertico][vertico]]. +as [[http://elpa.gnu.org/packages/vertico.html][vertico]]. [[https://codeberg.org/jao/consult-recoll/raw/branch/main/consult-recoll.png]] @@ -109,6 +109,16 @@ it directly via =M-x package-install RET consult-recoll RET=. (setq consult-recoll-format-candidate #'jao-recoll-format) #+end_src +** Integration with embark-collect + If you use [[http://elpa.gnu.org/packages/embark.html][embark]], you can use =embark-collect= to export the list of search + results in the minibuffer to an /Embark collect/ buffer. To allow opening + buffer in that buffer as if they had been selected in the minibuffer, + enable integration with embark adding this call to your init file: + + #+begin_src emacs-lisp + (consult-recoll-embark-setup) + #+end_src + ** Tip: displaying snippets in results list Instead of relying on a separate preview buffer to display snippets, you can set ~consult-recoll-inline-snippets~ to ~t~ to show them in the minibuffer, |
