waymondo / frog-jump-buffer

The fastest buffer-jumping Emacs lisp package around
158 stars 5 forks source link

Arithmetic error on call #4

Closed natecox closed 5 years ago

natecox commented 5 years ago

Trying this out on a project because it seems like a cool idea, but I'm not currently able to use the buffer switcher due to an error:

frog-menu-grid-format: Arithmetic error

Not sure what information is relevant to you to help debug. I'm currently using projectile, and projectile-rails on a ruby project.

waymondo commented 5 years ago

What version of frog-menu are you using? If you eval (frog-jump-buffer-buffer-names) do you get any extremely long or otherwise suspicious results?

natecox commented 5 years ago

I'm currently using frog-menu 0.2.8

After researching this more heavily on my end, I think this may have something to do with the emacs version. 26.2 works fine, 27.0.50 does not.

Here's the result of a (frog-jump-buffer-buffer-names)

| *scratch* | *Minibuf-1* | organization_membership.rb | participant_contact.rb | watched_event.rb | Gemfile | *dashboard* | *Minibuf-0* | *Messages* | *code-conversion-work* | *Echo Area 0* | *Echo Area 1* |
waymondo commented 5 years ago

Strange, I'm on frog-menu version 0.2.8 and my Emacs version is: GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin18.6.0, NS appkit-1671.50 Version 10.14.5 (Build 18F132)) of 2019-06-10

I haven't seen that error before. Maybe do M-x toggle-debug-on-error and see if you can get more visibility into the error from the stack trace and debugger.

natecox commented 5 years ago

Here's the trace I'm getting:

Debugger entered--Lisp error: (arith-error)
  frog-menu--grid-format((#("_ Gemfile" 0 1 (face (:foreground "#fbf1c7"))) #("_ *dashboard*" 0 1 (face (:foreground "#fbf1c7"))) #("_ *Warnings*" 0 1 (face (:foreground "#fbf1c7"))) #("_ *scratch*" 0 1 (face (:foreground "#fbf1c7"))) #("_ *Messages*" 0 1 (face (:foreground "#fbf1c7"))) #("_ *elfeed-log*" 0 1 (face (:foreground "#fbf1c7"))) #("_ projects.org" 0 1 (face (:foreground "#fbf1c7"))) #("_ *EGLOT (sportsboard/ruby-mode) stderr*" 0 1 (face (:foreground "#fbf1c7"))) #("_ *autoconnect-EGLOT (sportsboard/ruby-mode) outpu..." 0 1 (face (:foreground "#fbf1c7"))) #("_ *autoconnect-EGLOT (sportsboard/ruby-mode) stder..." 0 1 (face (:foreground "#fbf1c7"))) #("_ *EGLOT (sportsboard/ruby-mode) events*" 0 1 (face (:foreground "#fbf1c7"))) #("_ *Flymake log*" 0 1 (face (:foreground "#fbf1c7")))) 1 40)
  frog-menu-grid-format(("Gemfile" "*dashboard*" "*Warnings*" "*scratch*" "*Messages*" "*elfeed-log*" "projects.org" "*EGLOT (sportsboard/ruby-mode) stderr*" "*autoconnect-EGLOT (sportsboard/ruby-mode) output*" "*autoconnect-EGLOT (sportsboard/ruby-mode) stderr*" "*EGLOT (sportsboard/ruby-mode) events*" "*Flymake log*"))
  frog-menu--init-buffer(#<buffer  *frog-menu-menu*> "Showing Buffers: [all]\nTarget Window: [same]\n" ("Gemfile" "*dashboard*" "*Warnings*" "*scratch*" "*Messages*" "*elfeed-log*" "projects.org" "*EGLOT (sportsboard/ruby-mode) stderr*" "*autoconnect-EGLOT (sportsboard/ruby-mode) output*" "*autoconnect-EGLOT (sportsboard/ruby-mode) stderr*" "*EGLOT (sportsboard/ruby-mode) events*" "*Flymake log*") (("1" "[all]" frog-jump-buffer-filter-all) ("2" "[project]" frog-jump-buffer-filter-same-project) ("3" "[mode]" frog-jump-buffer-filter-same-mode) ("4" "[files]" frog-jump-buffer-filter-file-buffers) ("0" "[other]" frog-jump-buffer-other-window)))
  frog-menu-read("Showing Buffers: [all]\nTarget Window: [same]\n" ("Gemfile" "*dashboard*" "*Warnings*" "*scratch*" "*Messages*" "*elfeed-log*" "projects.org" "*EGLOT (sportsboard/ruby-mode) stderr*" "*autoconnect-EGLOT (sportsboard/ruby-mode) output*" "*autoconnect-EGLOT (sportsboard/ruby-mode) stderr*" "*EGLOT (sportsboard/ruby-mode) events*" "*Flymake log*") (("1" "[all]" frog-jump-buffer-filter-all) ("2" "[project]" frog-jump-buffer-filter-same-project) ("3" "[mode]" frog-jump-buffer-filter-same-mode) ("4" "[files]" frog-jump-buffer-filter-file-buffers) ("0" "[other]" frog-jump-buffer-other-window)))
  frog-jump-buffer()
  funcall-interactively(frog-jump-buffer)
  call-interactively(frog-jump-buffer nil nil)
  command-execute(frog-jump-buffer)
waymondo commented 5 years ago

I'm wondering if it has to do with the long autoconnect EGLOT buffer name. This error is happening within frog-menu so perhaps open an issue there: https://github.com/clemera/frog-menu