4

Is there a way to get an occur-style summary that contains all of the function definitions of the current file? Perhaps using semantic-mode?

I'm particularly concerned about C. Emacs Lisp, Caml (tuareg-mode) and Haskell would be welcome additions, but not required.

5

If you use Helm, then yes, there's helm-semantic-or-imenu command.

Demo with C:

c

Demo with Emacs Lisp:

elisp

For Caml and Haskell, you can use this command but there's probably only Imenu support (so you won't get full function interface like the above 2 demos).

  • I am not using Helm, I found it distracting (too flashy). Perhaps I should give it another chance. – jch Nov 9 '14 at 18:22
  • If you don't want to enable Helm for everything, don't put in (helm-mode 1). You can pick and use individual commands. If you use helm-mode, see Use Helm with Ido in Helm Wiki. – Tu Do Nov 9 '14 at 18:32
  • I've now tried that. Unlike the occur buffer, which is just an ordinary Emacs buffer with some special commands, the Helm buffer has very different behaviour. I'd much prefer working with an ordinary Emacs buffer. – jch Nov 9 '14 at 18:45
  • 1
    It is used for quick look up and jump around and is quite fast. If you want to always have visible buffer that lists definitions, how about sr-speedbar as an outline tree? If you want exactly occur-style buffer, then there's none exist. – Tu Do Nov 9 '14 at 18:49
  • 1
    @jch, you can use the standard M-x imenu, I guess or ido-imenu if you're an ido user. wikemacs.org/wiki/Imenu – rimero Nov 10 '14 at 4:22

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.