3

I'm trying to get a Cocoa development environment working in Emacs, and I'm 80% of the way there. The one feature I miss is Xcode's "Open Quickly", which basically performs a fuzzy match of the string you type against the filenames referenced in the Xcode workspace and the symbols defined in those files.

My problem is that our project is huge: if I generate a TAGS file using etags for the .h and .m files in our project's sub-directories, the result is over a gig in size and Emacs complains "TAGS file is large. Really open?", and if I say yes, then Emacs hangs and becomes essentially unusable. Of course, this is before I've even considered indexing tags for system libraries. I've also tried projectile, but unfortunately it's similarly unusable on a project of my size (on the order of a full minute to find a match).

It occurs to me that all the indexing information I really want is in the Xcode projects themselves, so if I had an Emacs package that could parse them and traverse their dependencies, that might be a start, but I'm not aware of any such package.

Any suggestions/solutions in this respect?

Community
  • 1
  • 1
PHD
  • 586
  • 1
  • 4
  • 11
  • 5
    The last 20% of any project takes up 80% of the time... Xcode's **Open Quickly** is built on top of the source indexer which is built on top of the compiler... a huge amount of effort has been put into creating the infrastructure necessary to make Open Quickly... well... open quickly. Not to say it can't be done in emacs (much of the gray of my beard was earned w/my ~250K of .emacsrc), just that it is a mistake to underestimate the depth of the infrastructure behind a seemingly straightforward feature! Oh, and, may the force of .el be with you. – bbum Oct 23 '13 at 03:25
  • If GNU Global is an option for you, that *should* be a vast improvement on a TAGS file (I'm not certain if that helps your primary problem or not, but I imagine some of the various "find a thing" libraries would be able to integrate with Global.) – phils Oct 23 '13 at 04:42
  • Thank you @bbum! Very much appreciate your insight here. – PHD Oct 23 '13 at 16:35
  • 1
    @PHD With that said, the indexing of source is something that is encapsulated in LLVM/Clang, IIRC. Thus, you ought to be able to build a plugin that groks the source and spews an index emacs can be taught to consume. – bbum Oct 23 '13 at 17:07
  • It looks as though someone has already started working on a [clang-based ctags](https://github.com/drothlis/clang-ctags). Maybe I'll check that out and see if I can contribute. – PHD Oct 23 '13 at 17:58
  • 1
    Further to my first comment, [Helm](https://github.com/emacs-helm/helm) and [Global](http://www.gnu.org/software/global/) can evidentially work together via [emacs-helm-gtags](https://github.com/syohex/emacs-helm-gtags) – phils Oct 24 '13 at 04:15
  • It looks like someone has done just that: https://github.com/visigoth/emacs-clang-complete-async – PHD Jan 30 '14 at 23:22
  • I have had great success with projectile and helm. It does 95% of what I want. – PHD Aug 31 '16 at 14:42

1 Answers1

0

I've never found a single function quite as convenient as Xcode's "Open Quickly", but these days I use

I've found that this gets me really close to what I wanted in my original question.

PHD
  • 586
  • 1
  • 4
  • 11