Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
deejayem opened this issue Nov 8, 2024 · 0 comments

Comments

@deejayem
Copy link

deejayem commented Nov 8, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant