From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: imenu support for babel blocks Date: Tue, 20 Jul 2010 15:30:18 -0700 Message-ID: <87wrspu6px.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=33291 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObLKT-0003dQ-LL for emacs-orgmode@gnu.org; Tue, 20 Jul 2010 18:30:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObLKR-000841-Iq for emacs-orgmode@gnu.org; Tue, 20 Jul 2010 18:30:25 -0400 Received: from mail-pv0-f169.google.com ([74.125.83.169]:47220) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObLKR-00083k-Dc for emacs-orgmode@gnu.org; Tue, 20 Jul 2010 18:30:23 -0400 Received: by pvc30 with SMTP id 30so5692642pvc.0 for ; Tue, 20 Jul 2010 15:30:22 -0700 (PDT) In-Reply-To: (David O'Toole's message of "Sat, 17 Jul 2010 16:57:53 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David O'Toole Cc: emacs-orgmode Mailinglist 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" 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. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode