0

I want to use the json.el included in 24.5, but cannot do that, because gnus includes an older version of json.el that is loaded before the one from 24.5.

When running list-load-path-shadows I got this as one of the shadows: /usr/share/emacs/site-lisp/gnus/gnus-fallback-lib/json hides /usr/share/emacs/24.5/lisp/json

How do I prevent the fallback json from being loaded?

  • I don't have this fallback lib on my system. Did you per chance install Gnus from your OS package manager? – wasamasa Sep 6 '15 at 11:27
  • It appears I did that, yes. I can't remember anymore why I did that. I probably wanted some functionality that is not (yet?) in emacs 24. What would be an alternative to installing gnus via my package manager? Checking out from git and compiling myself? – Alexander Baier Sep 6 '15 at 12:23
  • The Gnus included with Emacs should be newer than your installed copy, so why not use that? – wasamasa Sep 6 '15 at 12:47
  • Said package is actually an AUR package installing a pretty recent version directly from git (I think directly from master). Thus it is newer than the gnus shipped with emacs 24. – Alexander Baier Sep 6 '15 at 13:20
  • Is there a way to remove the shadowing path from the load-path? – Alexander Baier Sep 6 '15 at 13:43
1

You can re-add /usr/share/emacs/24.5/lisp/ to the start of the load-path by doing something like this

(push "/usr/share/emacs/24.5/lisp" load-path)

While this will work, this is system/installation dependent, I found one installation independent way to get path to lisp startup.el

(expand-file-name "../lisp" data-directory)

Combining these together the following should solve your issue

(push (expand-file-name "../lisp" data-directory) load-path)

Please note that this works because gnus packaged with emacs is installed in /usr/share/emacs/24.5/lisp/gnus directory had it been installed directory in /usr/share/emacs/24.5/lisp, the above would have shadowed the package you installed from your package manager.

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.