embark icon indicating copy to clipboard operation
embark copied to clipboard

Consult commands called with `embark-act` do not respect properties set with `consult-customize`

Open deejayem opened this issue 1 year ago • 0 comments

I'm not sure if this is an embark issue or a consult one (or if it's fixable), so hopefully I guessed at the right place to create this.

Let's say I want automatic previews when using consult-line, but with consult-ripgrep I don't want this, and want to set a :preview-key with consult-customize. This works great, but now suppose I want to call embark-act first (to search for the symbol at point), then I get automatic previews with consult-ripgrep.

This can be reproduced with the following config:

(unless (package-installed-p 'use-package)
  (package-install 'use-package))

(require 'use-package)

(setq use-package-always-ensure t)

(use-package vertico
  :init (vertico-mode))

(use-package consult
  :bind ("C-c r" . consult-ripgrep)
  :config (consult-customize consult-ripgrep :preview-key "M-."))

(use-package embark
  :bind ("C-." . embark-act))

(use-package embark-consult
  :demand t)

Then just use C-. C-c r to search for the symbol at point with consult-ripgrep.

I think that this-command is embark-act when consult-ripgrep is called this way, as if I act embark-act to the consult-customize call, I don't get automatic previews with consult-ripgrep (but this means I don't get them when combining embark-act with consult-line either).

(There are other ways to get the symbol-at-point functionality with consult commands, so it's not a major issue if this can't be fixed)

deejayem avatar Nov 08 '24 16:11 deejayem