bugEmacs Muse - Bugs: bug #9344, Show table of contents in emacs

Show feedback again

bug #9344: Show table of contents in emacs

Submitted by:  Daniel Clemente <clemente>
Submitted on:  Sat Jun 16 18:00:59 2007  
Category: museSeverity: 1 - Wish
Priority: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sat Jun 16 19:23:51 2007, comment #3:

I forgot: After loading (e.g. in .emacs), do M-x add-menubar-to-index

Daniel Clemente <clemente>
Sat Jun 16 19:15:08 2007, comment #2:

Ok, here's the code as attachment. GNA interpreted the 2 asterisks on each line as strong.

(file #2453)

Daniel Clemente <clemente>
Sat Jun 16 18:51:45 2007, comment #1:

Can you post that example is an attachment? It looks like GNA mangled it.

Michael Olson <mwolson>
Project Administrator
Sat Jun 16 18:00:59 2007, original submission:

To better navigate through the many sections ("* title") of a page, it would help to see the table of contents directly in emacs.
Maybe there where <contents> is written, or better, as a menu, just like "imenu" does.

The following code is a failed attempt to do this in "imenu"

(setq imenu-expression-for-muse
("Tit1" "^\\*\\{1\\} \\(.*\\)" 1)
("Tit2" "^\\*\\{2\\} \\(.*\\)" 1)
("Tit3" "^\\*\\{3\\} \\(.*\\)" 1)
("Tit4" "^\\*\\{4\\} \\(.*\\)" 1)
("Tit5" "^\\*\\{5\\} \\(.*\\)" 1)
("Tit6" "^\\*\\{6\\} \\(.*\\)" 1)
("Tit7" "^\\*\\{7\\} \\(.*\\)" 1)

(add-hook 'muse-mode-hook
(lambda ()
(setq imenu-generic-expression imenu-expression-for-muse)))

But it doesn't work, since "imenu" doesn't support hierarchy. That means, "** sub" are not grouped inside their "* section", etc.

Daniel Clemente <clemente>


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #2453:  imenu-for-muse.el added by clemente (460B - text/plain - imuse (non-hierarchical))


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by mwolson (Posted a comment)
  • -unavailable- added by clemente (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Jun 16 19:15:08 2007clementeAttached File-=>Added imenu-for-muse.el, #2453
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup