Skip to content

Commit

Permalink
Add a warning in case embark-consult cannot be loaded
Browse files Browse the repository at this point in the history
A missing embark-consult package seems to be a common issue. Warn about it.
  • Loading branch information
minad committed Oct 20, 2022
1 parent 2422d4e commit 3b91887
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ sets:
package menu mode.

If you use the grepping commands from the [[https://github.com/minad/consult/][Consult]] package,
=consult-grep=, =consult-git-grep= or =consult-ripgrep=, then you'll
probably want to install and load the =embark-consult= package, which
adds support for exporting a list of grep results to an honest
grep-mode buffer, on which you can even use [[https://github.com/mhayashi1120/Emacs-wgrep][wgrep]] if you wish.
=consult-grep=, =consult-git-grep= or =consult-ripgrep=, then you should
install the =embark-consult= package, which adds support for exporting a
list of grep results to an honest grep-mode buffer, on which you can
even use [[https://github.com/mhayashi1120/Emacs-wgrep][wgrep]] if you wish.

When in doubt choosing between exporting and collecting, a good rule
of thumb is to always prefer =embark-export= since when an exporter to a
Expand Down
8 changes: 8 additions & 0 deletions embark.el
Original file line number Diff line number Diff line change
Expand Up @@ -3259,6 +3259,14 @@ PRED is a predicate function used to filter the items."

;;; Integration with external completion UIs

;; consult

(with-eval-after-load 'consult
(unless (require 'embark-consult nil 'noerror)
(warn "The package embark-consult should be installed if you use both Embark and Consult")))

;; marginalia

;; Ensure that the Marginalia cache is reset, such that
;; `embark-toggle-variable-value' updates the display (See #540).
(with-eval-after-load 'marginalia
Expand Down

0 comments on commit 3b91887

Please sign in to comment.