1

I'm trying to use tern with the latest version of emacs (27 : master branch) and I'm getting the following error :

Request failed: ((wrong-type-argument Need a pre-parsed URL. [cl-struct-url http nil nil 127.0.0.1 39585 / nil nil nil nil t] url))

Basically : tern is unable to perform any kind of request because of this error.
It seems to come from tern-req function in tern.el, this line :

(url (url-parse-make-urlobj "http" nil nil tern-server port "/" nil nil nil))

But I don't know how to fix it, 'cause I'm not really familiar with lisp development.

I've opened an issue on Github, but since "Tern is not being actively maintained right now.", I'm asking here

3
  • Is there any specific reason why you need emacs master?
    – Daniel
    Commented Apr 6, 2018 at 11:33
  • For xwidgets and packages that are only supported since emacs26
    – boehm_s
    Commented Apr 6, 2018 at 11:54
  • Please do not post the same question to emacs.SE and StackOverflow. Choose one or the other. Please delete one of the questions. Thx.
    – Drew
    Commented Apr 6, 2018 at 16:28

1 Answer 1

2

Your tern package was compiled with the older Emacs, but the newer Emacs has changed the representation of structs: the [cl-struct-url http nil nil 127.0.0.1 39585 / nil nil nil nil t] in your error message is an "old-style" struct, returned by the old url-parse-make-urlobj. This happens because this function was inlined when tern was compiled.

You can try to enable (cl-old-struct-compat-mode 1) which was designed to try and accommodate those circumstances. If that fails to solve your problem then you'll need to recompile your tern package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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