[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: How to increase the depth of the scan in imenu and speecbar?
From: |
Drew Adams |
Subject: |
RE: How to increase the depth of the scan in imenu and speecbar? |
Date: |
Fri, 27 Mar 2015 07:12:45 -0700 (PDT) |
> I started using imenu and speedbar, anr=d I like them, but I would like
> to have not only a second level, but up to e.g. 6th level. Where can I
> set these options? I did not find anything.
>
> I am particularly talking about orgmode files and their headers, which
> are only shown up to level 2.
See `C-h v imenu-generic-expression'. I don't think you can have more
than two levels. Each element of the list must be a list of the form
(MENU-TITLE REGEXP INDEX [FUNCTION] [ARGUMENTS...]).
You can at least have more submenus (i.e. level 2), to break things
down more. IOW, instead of trying to have, say, this:
MyMenu
Variables
Options
You can just use this:
MyMenu
Options
Non-Option Variables
Remember that the regexps are tried in order. So putting Options
(every option is a variable) before Non-Option Variables lets
you use a more general regexp for the latter.
That's at least better than just MyMenu > Variables, i.e., it at
least lets you separate the two kinds of variables.
Taking a look at library `imenu+.el' might help in this regard.
http://www.emacswiki.org/emacs/download/imenu%2b.el