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

(embark-collect-mode . consult-preview-at-point-mode) how to make it work. #739

Open
Zweisamkeiten opened this issue Oct 21, 2024 · 0 comments

Comments

@Zweisamkeiten
Copy link

Zweisamkeiten commented Oct 21, 2024

(use-package consult
  :ensure t
  :bind
  (("C-s" . consult-line)
   ("C-x b" . consult-buffer)))

(use-package embark
  :ensure t
  :bind
  (("C-." . embark-act)         ;; pick some comfortable binding
   ("C-;" . embark-dwim)        ;; good alternative: M-.
   ("C-h B" . embark-bindings)) ;; alternative for `describe-bindings'
  :init
  (setq prefix-help-command #'embark-prefix-help-command)
  :config
  (add-to-list 'display-buffer-alist
               '("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
                 nil
                 (window-parameters (mode-line-format . none)))))

(use-package embark-consult
  :ensure t ; only need to install it, embark loads it after consult if found
  :after (embark consult)
  :demand t
  :hook
  (embark-collect-mode . consult-preview-at-point-mode))

(add-hook 'embark-collect-mode-hook
          (lambda ()
            (message "embark-collect-mode activated!")
            (consult-preview-at-point-mode 1)))

I am using the following configuration. After opening dired with C-x C-f, I use m to select multiple files, then run M-x embark-collect. After switching to the embark-collect buffer with C-x o, I confirm that consult-preview-at-point-mode is enabled. However, when moving the cursor in the buffer, there is no real-time preview of the files.

version: GNU Emacs 29.4
consult-20241016.1007
embark-20241003.1953
embark-consult-20240919.1831

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