1

I got such a error report but confused with 'position 2767`

Debugger entered--Lisp error: (void-variable |)
  eval-buffer(#<buffer  *load*-518868> nil "/home/me/.emacs.d/lisp/init-company.el" nil t)  ; Reading at buffer position 2
  load-with-code-conversion("/home/me/.emacs.d/lisp/init-company.el" "/home/me/.emacs.d/lisp/init-company.el" nil t)
  #<subr require>(init-company)
  apply(#<subr require> init-company nil)
  (prog1 (apply orig feature args) (if (and (not already-loaded) (memq feature features)) (progn (let ((time (sanityinc/time-subtract-millis (current-time) require-start-time))) (add-to-list 'sanityinc/require-times (list feature require-start-time time) t)))))
  (let* ((already-loaded (memq feature features)) (require-start-time (and (not already-loaded) (current-time)))) (prog1 (apply orig feature args) (if (and (not already-loaded) (memq feature features)) (progn (let ((time (sanityinc/time-subtract-millis (current-time) require-start-time))) (add-to-list 'sanityinc/require-times (list feature require-start-time time) t))))))
  sanityinc/require-times-wrapper(#<subr require> init-company)
  apply(sanityinc/require-times-wrapper #<subr require> init-company)
  require(init-company)
  eval-buffer(#<buffer  *load*> nil "/home/me/.emacs.d/init.el" nil t)  ; Reading at buffer position 2767
  load-with-code-conversion("/home/me/.emacs.d/init.el" "/home/me/.emacs.d/init.el" t t)
  load("/home/me/.emacs.d/init" t t)
  #f(compiled-function () #<bytecode 0x1dda69>)()
  command-line()
  normal-top-level()

What does the Reading at buffer position 2, and Reading at buffer position 2767,

It seems not helpful because the max-line number is less than 500.

  • 2
    Open up init-company.el and see if you find a | symbol, probably near the very beginning of the file ... Emacs is trying to read that | symbol and she is choking -- saying, wait a minute here, to the extent that | symbol is a variable, it has not been defined .... In other words, it looks like you have a typographical error in your init-company.el. – lawlist Jul 8 '19 at 3:04
1

To navigate to the exact location of the error you visit file /home/me/.emacs.d/lisp/init-company.el do M-x goto-char 2767 RET.

In fact you might be able to just switch to buffer *load*-518868 (note the leading space!).

It appears that your file has a spurious | in it, which could be caused by an incomplete git merge.

See also Find position in file by character number

| improve this answer | |
  • yes, it was caused by git merge. The worst is that it seem impossible to locate it. – Calculus Jul 8 '19 at 4:03
  • You should be able to detect it using git diff. – sds Jul 8 '19 at 13:08

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.