abo-abo / swiper

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

Error in post-command-hook (ivy--queue-exhibit): (arith-error) #2249

Open tsmithe opened 5 years ago

tsmithe commented 5 years ago

Hi, I have encountered this issue when trying to use ebib with counsel-find-file.

The precise error is: Error in post-command-hook (ivy--queue-exhibit): (arith-error)

I have a very basic ebib config:

(use-package ebib
  :config
  ((global-set-key (kbd "C-c e") 'ebib)
   ))

but earlier in my config I also have

  (setq ivy-re-builders-alist
        '((ivy-bibtex . ivy--regex-ignore-order)
          (t . ivy--regex-plus)))

(Issue #1466 suggested this fragment may be important; I have this fragment because the ivy-bibtex documentation indicated it was necessary.)

Can you help? The problem appears as soon as I open ebib and press o to open a file...

I am using ebib 2.15 and counsel / ivy / swiper 0.12.0.

abo-abo commented 5 years ago

Please add some reproduction steps. I don't see how I can reproduce this now. Should I call ebib or counsel-find-file?

tsmithe commented 5 years ago

Thanks for your response. As I wrote, "The problem appears as soon as I open ebib and press o to open a file..."

I do not know precisely what code is executed in what order on performing those actions, but those are the actions that I take, and that is the error that I receive, given the vanilla configuration that I described.

If you could explain what the error means, I could try and debug further in order to be more helpful, but I am not an Emacs expert, just someone who is keen to use ebib with ivy.

abo-abo commented 5 years ago

The problem appears as soon as I open ebib and press o to open a file...

For me, the part "open ebib" is not clear. I've never used ebib. I installed a package from MELPA and did M-x ebib, but it doesn't do much. How do I achieve a minimal set up?

ghost commented 4 years ago

I have the error:

Error in post-command-hook (ivy--queue-exhibit): (arith-error)

Which lead me here.

While in dired, the key + makes the error appear.

I disabled: ;; (ivy-explorer-mode 1) in my init.el and the error disappeared.

https://github.com/clemera/ivy-explorer

Hope this helps.

basil-conto commented 4 years ago

I disabled: ;; (ivy-explorer-mode 1) in my init.el and the error disappeared.

Have you reported this on the ivy-explorer project issue tracker?

Please also try to find the minimal init file and reproduction recipe that leads to the error, ideally starting from emacs -Q.

ghost commented 4 years ago

~/.emacs.d/init.el:

;; -*- lexical-binding: t -*-
(require 'cask "~/bin/cask/cask.el")
(cask-initialize)
(ivy-explorer-mode 1)

steps to reproduce:

$ emacs --version
GNU Emacs 26.3 
...
$ emacs --daemon
$ emacsclient -a "" -c init.el

Then, inside Emacs: C-x C-f

Result: Error in post-command-hook (ivy--queue-exhibit): (arith-error)

P.S. $ emacs -Q -l init.el or just $ emacs works as expected.

abo-abo commented 4 years ago

Tested just now by adding the dependency

--- a/targets/install-deps.el
+++ b/targets/install-deps.el
@@ -15,6 +15,7 @@

 (defconst ivy-dev-packages
   '(avy
+    ivy-explorer
     hydra
     wgrep))

And doing make plain, M-x ivy-explorer-mode, C-x C-f. Everything works as expected. Could you please try this recipe?

ghost commented 4 years ago

Given: test.el:

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(package-refresh-contents)
(package-install 'ivy)
(ivy-mode 1)

$ emacs -Q -l test.el ./test.el and C-x C-f works just fine.


Given: test.el:

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(package-refresh-contents)
(package-install 'ivy-explorer)
(ivy-explorer-mode 1)

and: $ emacs -Q -l test.el ./test.el

then an error occurs:

ivy-configure: Keyword argument :parent not one of (:initial-input :height :occur :update-fn :unwind-fn :index-fn :sort-fn :format-fn :display-transformer-fn :more-chars :grep-p :exit-codes)

I guess we should look into ivy-explorer more than in ivy.

basil-conto commented 4 years ago

ivy-configure: Keyword argument :parent not one of

Looks like your version of Ivy is older than one of the packages using it. Check your package versions, and perhaps try reinstalling Ivy, Counsel, etc. and restarting Emacs.

Also, when debugging an error please try to M-xtoggle-debug-on-errorRET first so that we can get a more informative backtrace.