leoliu / ggtags

Emacs frontend to GNU Global source code tagging system.
http://elpa.gnu.org
577 stars 56 forks source link

`ggtags-find-tag-dwim` fails when projectile mode is enabled #187

Closed yuezhu closed 5 years ago

yuezhu commented 5 years ago

I am running GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511)) of 2018-05-30 with projectile installed by ELPA version 20181213.1630. If I enable projectile mode, running ggtags-find-tag-dwim will fail with these backtrace:

Debugger entered--Lisp error: (void-function orig-fun)
  orig-fun(#<marker at 213 in *ggtags-global*> "include/types/stream.h" 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 0x41814781>) #<marker at 213 in *ggtags-global*> "include/types/stream.h" 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 0x41814781>) (#<marker at 213 in *ggtags-global*> "include/types/stream.h" nil))
  compilation-find-file(#<marker at 213 in *ggtags-global*> "include/types/stream.h" nil)
  apply(compilation-find-file #<marker at 213 in *ggtags-global*> "include/types/stream.h" nil nil)
  compilation-next-error-function(0 nil)
  next-error-internal()
  compile-goto-error()
  compilation-auto-jump(#<buffer *ggtags-global*> 213)
  apply(compilation-auto-jump (#<buffer *ggtags-global*> 213))
  timer-event-handler([nil 23575 63889 277034 nil compilation-auto-jump (#<buffer *ggtags-global*> 213) nil 0])
  ggtags-global-handle-exit(#<buffer *ggtags-global*> "finished\n")
  run-hook-with-args(ggtags-global-handle-exit #<buffer *ggtags-global*> "finished\n")
  compilation-handle-exit(exit 0 "finished\n")
  compilation-sentinel(#<process global> "finished\n")
yuezhu commented 5 years ago

hm..looks like this should be an issue of projectile, rather than ggtags:

https://github.com/bbatsov/projectile/issues/1364