0

I have recently installed emacs on a new system (Manjaro arch-linux), using my usual configuration (available here, if relevant).

However, the jump function never works on this new system: whenever I click a link to a location in a file in grep-mode, compile-mode, or any other mode using these links, I get an error which says Symbol's function definition is void: orig-fun.

For information I am mostly relying on helm, projectile, and desktop-mode in my workflow, if relevant.

I am using emacs 26.1, though I do not believe it is version-related, as I could replicate this problem on earlier versions of emacs (emacs 25 and 24).

I do not know how to further diagnose the issue or how to interpret this error, hence I would appreciate some suggestions.

EDIT1: This is the backtrace of the error, obtained through the emacs debugger (ran a grep-find with search term "emacs" on my home directory and selected the first link):

Debugger entered--Lisp error: (void-function orig-fun)
  orig-fun(#<marker at 145 in *grep*> "./.zshrc.pre-oh-my-zsh" nil nil)
  compilation-find-file-projectile-find-compilation-buffer(#f(compiled-function (marker filename directory &rest formats) "Find a buffer for file FILENAME.\nIf FILENAME is not found at all, ask the user where to find it.\nPop up the buffer containing MARKER and scroll to MARKER if we ask\nthe user where to find the file.\nSearch the directories in `compilation-search-path'.\nA nil in `compilation-search-path' means to try the\n\"current\" directory, which is passed in DIRECTORY.\nIf DIRECTORY is relative, it is combined with `default-directory'.\nIf DIRECTORY is nil, that means use `default-directory'.\nFORMATS, if given, is a list of formats to reformat FILENAME when\nlooking for it: for each element FMT in FORMATS, this function\nattempts to find a file whose name is produced by (format FMT FILENAME)." #<bytecode 0x168f211>) #<marker at 145 in *grep*> "./.zshrc.pre-oh-my-zsh" nil)
  apply(compilation-find-file-projectile-find-compilation-buffer #f(compiled-function (marker filename directory &rest formats) "Find a buffer for file FILENAME.\nIf FILENAME is not found at all, ask the user where to find it.\nPop up the buffer containing MARKER and scroll to MARKER if we ask\nthe user where to find the file.\nSearch the directories in `compilation-search-path'.\nA nil in `compilation-search-path' means to try the\n\"current\" directory, which is passed in DIRECTORY.\nIf DIRECTORY is relative, it is combined with `default-directory'.\nIf DIRECTORY is nil, that means use `default-directory'.\nFORMATS, if given, is a list of formats to reformat FILENAME when\nlooking for it: for each element FMT in FORMATS, this function\nattempts to find a file whose name is produced by (format FMT FILENAME)." #<bytecode 0x168f211>) (#<marker at 145 in *grep*> "./.zshrc.pre-oh-my-zsh" nil))
  compilation-find-file(#<marker at 145 in *grep*> "./.zshrc.pre-oh-my-zsh" nil)
  apply(compilation-find-file #<marker at 145 in *grep*> "./.zshrc.pre-oh-my-zsh" nil nil)
  compilation-next-error-function(0 nil)
  next-error-internal()
  compile-goto-error(return)
  funcall-interactively(compile-goto-error return)
  call-interactively(compile-goto-error nil nil)
  command-execute(compile-goto-error)
  • 1
    Does it happen if you start Emacs with emacs -Q and run M-x package-initialize? Switch on "'Enter Debugger on Error" in the "Options" menu. Add the backtrace which you get in the error case to your question. – Tobias Mar 11 at 10:05
  • Yes @Tobias, it does work when running emacs -Q, both before and after calling M-x package-initialize. However, after calling load-file on my .emacs, it stops working. I have added an error backtrace to the question, as requested. – Pierre Thalamy Mar 11 at 10:34
  • 1
    I think you should update projectile. See github.com/bbatsov/projectile/issues/1364 It is quite clear that github.com/bbatsov/projectile/pull/1363/commits/… fixes your problem. – Tobias Mar 11 at 10:39
  • 2
    FYI orig-fun is a name commonly used in advice written in the nadvice style, so I would initially suspect that some advice is playing up. – phils Mar 11 at 12:19
  • 2
    This is also a good reason not to just blindly install the latest versions of packages when you install your Emacs config on a new machine. Keeping your entire config under version control ensures that it will be in a known and working state when you clone it. – phils Mar 11 at 12:21
2

The cause of that error is a fixed problem in Projectile.

Avoid this problem by updating to a Projectile version where this problem is fixed.

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.