emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] imenu support for babel blocks


From: Eric Schulte
Subject: Re: [Orgmode] imenu support for babel blocks
Date: Tue, 20 Jul 2010 15:30:18 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi David,

I've never used imenu myself, but that sounds useful.  I'd recommend
using the following rather than building your own regexp

--8<---------------cut here---------------start------------->8---
(push (list "Source code chunks"
            org-babel-src-name-w-name-regexp 2)
      imenu-generic-expression)
--8<---------------cut here---------------end--------------->8---

You're right that the Org-mode imenu setup looks fairly complex, and is
probably overwriting your simple expression above.  Unfortunately I
don't know much about imenu and I'm now sure how a code block menu fits
into the existing Org-mode imenu support.

Best -- Eric

"David O'Toole" <address@hidden> writes:

> I tried the following to get an Imenu composed of babel blocks, so that you
> could browse/jump to blocks. But it doesn't seem to work, I'm guessing that
> something about how org-mode builds the imenu-generic-expression overwrites
> my entry. Is there a hook (or could there be a hook added) that allows me to
> imenu-ify more constructs?
>
>   (push (list "Source code chunks"
> "^#\\+\\(source:\\|srcname:\\|function:\\) \\(.*\\)$" 2)
>         imenu-generic-expression)
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode



reply via email to

[Prev in Thread] Current Thread [Next in Thread]