From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: imenu support for babel blocks
Date: Wed, 01 Dec 2010 17:17:18 +0100 [thread overview]
Message-ID: <808w09foxd.fsf@missioncriticalit.com> (raw)
In-Reply-To: 87wrspu6px.fsf@gmail.com
Hi Eric and David,
"Eric Schulte" wrote:
> Hi David,
>
> I've never used imenu myself, but that sounds useful. I'd recommend using
> the following rather than building your own regexp
>
> (push (list "Source code chunks"
> org-babel-src-name-w-name-regexp 2)
> imenu-generic-expression)
>
> 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.
I've written the following in my .emacs file:
#+begin_src emacs-lisp
;; extension of Imenu
(when (and
;; `org-babel' has been loaded
(fboundp 'org-babel-execute-src-block)
;; `imenu' has been loaded
(fboundp 'try-to-add-imenu))
(setq org-src-blocks-imenu-generic-expression
`(("Snippets" ,org-babel-src-name-w-name-regexp 2)))
(add-hook 'org-mode-hook
(lambda ()
(setq imenu-generic-expression
org-src-blocks-imenu-generic-expression))))
#+end_src
... but I never see any name of code chunk in the "IMenu" menu.
I only see the headings of my current Org file.
Any idea what I'm doing wrong?
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
prev parent reply other threads:[~2010-12-01 16:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-17 20:57 imenu support for babel blocks David O'Toole
2010-07-18 4:01 ` [PATCH] Quote path argument in ob-ditaa Gregory J. Grubbs
2010-07-18 5:43 ` Patchwork: Patch 150 Accepted Carsten Dominik
2010-07-18 5:51 ` [PATCH] Quote path argument in ob-ditaa Carsten Dominik
2010-07-20 22:30 ` imenu support for babel blocks Eric Schulte
2010-12-01 16:17 ` Sébastien Vauban [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=808w09foxd.fsf@missioncriticalit.com \
--to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).