abo-abo / swiper

Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
https://oremacs.com/swiper/
2.27k stars 337 forks source link

counsel-switch-buffer: "Error in post-command-hook (ivy--queue-exhibit): (file-error "Opening directory" "Ist kein Verzeichnis" #3006

Closed buhtz closed 1 year ago

buhtz commented 1 year ago

I did an upgrade of all my packages. I also double checked that I use the elpa packages and not any of debians emacs packages.

After that counsel-switch-buffer did not work anymore.

I got this in my Message buffer

Error in post-command-hook (ivy--queue-exhibit): (file-error "Opening directory" "Ist kein Verzeichnis" "/home/user/test_file.py")
ivy-read: Command attempted to use minibuffer while in minibuffer

Any idea where to start with analysis?

It is emacs 27.1 on Debian stable (11) from the Debian repo.

Counsel is counsel-20221015.936 from melpa.

Maybe Ivy is involved? IT is ivy-20220926.1250 from melpa.

Counsel configuration from my init.el.

(use-package counsel
  :bind (
     ("M-x" . counsel-M-x)
     ("C-x b" . counsel-switch-buffer)  ; counsel-ibuffer
     ("C-x C-f" . counsel-find-file)
     ("C-c i" . counsel-imenu)
     )
  )

Btw: counsel-ibuffer does work.

gynamics commented 1 year ago

I got this problem on emacs-30.0 too, but I found that this error is not caused by ivy but by ivy-rich. Once I disabled ivy-rich everything seems to be OK. It seems that ivy-rich can not get information correctly from some files. (e. g. bookmarks)

anildigital commented 1 year ago

Same here. Using GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin22.3.0, NS appkit-2299.40 Version 13.2.1 (Build 22D68)) of 2023-02-15

buhtz commented 1 year ago

Emacs 30!? WTF! :smiley:

It seems that swiper is dead. Last commit is 4 months ago. Any alternatives?

basil-conto commented 1 year ago

Any idea where to start with analysis?

The usual first step is to check whether the problem can be reproduced starting from emacs -Q, i.e. without any personal or site-wide configuration in the picture.

In addition to that, or alternatively, you can bisect your configuration to see which parts of it are needed to reproduce the issue.

Either way, the ideal analysis is one that results in a set of precise steps to reproduce the issue, because then someone else (e.g. I) may be able to get to the bottom of the root cause.

Currently counsel-switch-buffer works fine for me, but then I use neither bookmarks, nor recentf, nor ivy-rich, so it may be some combination of these features that is problematic.

I got this problem on emacs-30.0 too, but I found that this error is not caused by ivy but by ivy-rich. Once I disabled ivy-rich everything seems to be OK. It seems that ivy-rich can not get information correctly from some files. (e. g. bookmarks)

So should this issue be closed, and reported against ivy-rich instead?

Emacs 30!?

Emacs 30 is the current development version of Emacs from its upstream source repository. In the coming months we should see an official Emacs 29 release. The latest existing release is Emacs 28, which is present, for example, in Debian Testing.

It seems that swiper is dead.

Its original author hasn't really been active in maintaining it for a couple of years now. I tried comaintaining the parts that I could, but I was AFK for most of the last year and a half due to mandatory military service in my country. I'm now slowly trying to get back up to speed, but progress is slow. It doesn't help that Ivy/Swiper/Counsel saw a period of very quick addition of features which were not written in a particularly modular way.

Either way, sorry about the slow response time.

[ BTW, just because it's not currently enjoying active development doesn't mean it's completely useless/stale/dead - for better or worse I still use Ivy/Swiper/Counsel on a daily basis for all of my interactive completion needs, with the latest development version of Emacs, without issue. ]

Any alternatives?

I haven't yet had a chance to give them a try, but @oantolin and @minad have written a set of packages which I believe take some inspiration from the features of Ivy/Swiper/Counsel and try to extend them and integrate more closely with Emacs: https://github.com/minad/vertico#complementary-packages

gynamics commented 1 year ago

@buhtz If you are sure that the problem is cause by ivy-rich, there is a workaround, see ivy-rich #115. swiper works well on emacs-30, don't be frustrated, lisp code can be very robust.

anildigital commented 1 year ago

@gynamics, thanks for the ivy-rich patch. It helps. Hopefully, a proper fix soon.

buhtz commented 1 year ago

It seems to be fixed now.