doomemacs / doomemacs

An Emacs framework for the stubborn martian hacker
MIT License
19.39k stars 3.05k forks source link

`C-x b` results in `Error in post-command-hook (ivy--queue-exihbit): (file-error ...)` #7293

Open Armael opened 1 year ago

Armael commented 1 year ago

I confirm that...

Expected behavior

C-x b works and shows the list of buffers

Current behavior

C-x b fails to list buffers, and shows the following error in the minibuffer:

[Error in post-command-hook (ivy--queue-exhibit): (file-error "Opening directory" "Not a directory" "/home/armael/.doom.d/init.el")]

where /home/armael/.doom.d/init.el is the file currently opened.

The *Messages* buffer does not seem to include a more detailed error message; I could not get a backtrace to show up either, even after enabling doom-debug-mode.

Steps to reproduce

This bugs seems to only show up with a specific combination of packages. I tracked it down to the following:

  1. Start with a fresh doom installation, with the default config
  2. in init.el, enable ivy instead of vertico; disable doom-dashboard, and disable (default +bindings +smartparens). As far as I can tell, all three changes are required for the bug to manifest.
  3. open a file with emacs, for example emacs ~/.doom.d/init.el, then type C-x b.

System Information

https://gist.github.com/Armael/6478254dce17d3272e5080e1ed913f12

EinarElen commented 9 months ago

This bug shows up in the workspaces function as well. Seems to come from this part of +workspace/switch-to

                   (ivy-read "Switch to workspace: "
                           (+workspace-list-names)
                            :caller #'+workspace/switch-to
                           :preselect (+workspace-current-name))

Commenting out the :caller part resolves the problem