fci-mode: Args out of range: 3255, 3255
anmonteiro opened this issue · 8 comments
Using the new FCI mode with the fixes for native line numbers, I'm getting fci-mode: Args out of range: 3255, 3255
.
I don't have any more information, and I'm clueless what's causing this error. Please excuse me for the lack of detail.
@anmonteiro Any chance you can provide a recipe for reproducing the problem (ideally starting from emacs -Q
)?
I don't have a clear repro, but this seems to be happening when I setup fci-mode like the following:
(add-hook 'after-change-major-mode-hook 'turn-on-fci-mode)
here's a stack trace that I got from running emacs with toggle-debug-on-error
:
Debugger entered--Lisp error: (args-out-of-range 9538 9538)
signal(args-out-of-range (9538 9538))
fci-mode(1)
turn-on-fci-mode()
run-hooks(change-major-mode-after-body-hook prog-mode-hook js-mode-hook)
apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook js-mode-hook))
run-mode-hooks(js-mode-hook)
js-mode()
set-auto-mode-0(js-mode nil)
set-auto-mode()
normal-mode(t)
after-find-file(nil t)
find-file-noselect-1(#<buffer repl-test.js> "~/Documents/github/lumo/src/js/__tests__/repl-test.js" nil nil "~/Documents/github/lumo/src/js/__tests__/repl-test.js" (41284471 16777220))
find-file-noselect("/Users/anmonteiro/Documents/github/lumo/src/js/__tests__/repl-test.js" nil nil nil)
find-file("/Users/anmonteiro/Documents/github/lumo/src/js/__tests__/repl-test.js")
#f(compiled-function (candidate) "Open file CANDIDATE or open helm marked files in separate windows.\nCalled with a prefix arg open files in background without selecting them." #<bytecode 0x4044d8f3>)("/Users/anmonteiro/Documents/github/lumo/src/js/__tests__/repl-test.js")
apply(#f(compiled-function (candidate) "Open file CANDIDATE or open helm marked files in separate windows.\nCalled with a prefix arg open files in background without selecting them." #<bytecode 0x4044d8f3>) "/Users/anmonteiro/Documents/github/lumo/src/js/__tests__/repl-test.js")
helm-find-file-or-marked("/Users/anmonteiro/Documents/github/lumo/src/js/__tests__/repl-test.js")
helm-execute-selection-action-1()
helm-execute-selection-action()
helm-internal((helm-source-projectile-dired-files-list helm-source-projectile-files-list) nil "[lumo] Find file: " nil nil "*helm projectile*" nil nil nil)
apply(helm-internal ((helm-source-projectile-dired-files-list helm-source-projectile-files-list) nil "[lumo] Find file: " nil nil "*helm projectile*" nil nil nil))
helm((helm-source-projectile-dired-files-list helm-source-projectile-files-list) nil "[lumo] Find file: " nil nil "*helm projectile*" nil nil nil)
apply(helm ((helm-source-projectile-dired-files-list helm-source-projectile-files-list) nil "[lumo] Find file: " nil nil "*helm projectile*" nil nil nil))
helm(:sources (helm-source-projectile-dired-files-list helm-source-projectile-files-list) :buffer "*helm projectile*" :truncate-lines t :prompt "[lumo] Find file: ")
helm-projectile-find-file(nil)
funcall-interactively(helm-projectile-find-file nil)
call-interactively(helm-projectile-find-file nil nil)
command-execute(helm-projectile-find-file)
Thanks. I'll take a look at that kind of setup.
I played a little bit more with this and the error is definitely caused by fci-determine-padding
. If I hardcode it to return 0 I see no errors.
So turns out this may not actually be a bug.
I was turning on native line numbers with (setq-default display-line-numbers t)
, but changed it to use the minor mode after reading this.
That solved this issue for me. Feel free to close this if you think there's nothing to be done in fci-mode
.
Thanks for digging further. I'm still curious about what's going wrong, and this issue also shows the need for better error handling in fci-mode
itself (it's harder than it should be to get a backtrace from the package), so I'll look a bit more as well.
Just FYI, I'm abandoning this package and welcoming requests to be take over as maintainer.