0

I used counsel-org-goto-all to jump between headings. This morning, the command (which I have bound to C-;) stopped working with this error: Wrong type argument: arrayp, nil.

I have searched on the internet a bit, and found this fix:

(setq projectile-keymap-prefix (kbd "C-c C-p"))

But it does not seem to fix anything for me.

I did some debugging and got this trace from the error after setting debug-on-error to t.

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  replace-regexp-in-string("\\[[0-9]*\\(?:%\\|/[0-9]*\\)\\]" " " nil)
  counsel-outline-title-org()
  counsel-outline-candidates((:outline-title counsel-outline-title-org :action counsel-org-goto-action :history counsel-org-goto-history :caller counsel-org-goto) nil)
  counsel-org-goto-all()
  funcall-interactively(counsel-org-goto-all)
  call-interactively(counsel-org-goto-all nil nil)
  command-execute(counsel-org-goto-all)

But I don't know enough elisp and emacs to figure out what is going on.

I don't even know what the error means. Does it mean arrayp was expected and nil was received? The error seems cryptic.

3
  • 1
    What's going on is that something in counsel-outline-title-org, or something it calls, is calling replace-regexp-in-string with a nil 3rd arg, and the 3rd must be a string. Maybe a bug in the counsel code. Consider reporting it. But first start Emacs using emacs -Q, and try to repro the problem, to be sure it's not coming from something in your init file. – Drew Jun 15 '20 at 22:45
  • @Drew I tried the emacs -Q command, but it does not load anything. I tried loading init.el (my init file), but then something funky happened. If I opened just one file with emacs -Q, the error did not happen. If I opened multiple files (with emacs -Q *.org, then the error happened. I need to explore this more to see what is going on, and report the results. Thanks for the pointer. – Yogeshwer Sharma Jun 16 '20 at 5:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.