2

What Emacs utilities can provide better browsing and navigation of reST documents? Alternatively, how to configure existing utilities to work with reST? What I mean, why I ask:

Of the lightweight markups I lately mostly compose reST [1], and of course I do so with God's Own Editor (currently version='GNU Emacs 24.4.1' as packaged for Debian stable). Some of my reST docs are rather large, hence I seek better ways to

  • high-level-view reST doc sections. E.g., un/folding at section headings, or (better yet) providing a speedbar-like tree browser.
  • navigate between doc sections. Again, speedbar for reST would be great, but even an occur-like view would be helpful. (Unfortunately I lack sufficient multiline-regexp-fu to tell occur how to match reST section headings--your assistance is appreciated!)

Unfortunately

  1. the otherwise-quite-useful rst-mode does not currently provide this functionality, though I am also pinging its maintainer regarding this. It does provide rst-backward-section (C-M-a) and rst-forward-section (C-M-e), but linear navigation is well short of what I want.
  2. When I M-x speedbar from an rst-mode buffer, I get basically an empty frame.
  3. When I M-x imenu from an rst-mode buffer, it seems only able to find the first-level headers. (Am I missing something?)
  4. set-selective-display (e.g., M-1 C-x $) seems quite confused: it folds some sections and list items but not others, apparently at random (at least, I'm seeing no sense to it).
  5. As noted above, I don't know the correct regexp to give occur to parse reST section heads.

[1] except when on an SE site :-(

8
  • 1
    Please edit the question to clarify what you're asking and to make it a discrete question. Right now, it's probably too open-ended to give a good answer.
    – Dan
    Sep 13, 2016 at 21:54
  • Please a single, clear, specific question. Thx.
    – Drew
    Sep 13, 2016 at 23:10
  • 1
    If the question were more specific, someone might be interested in fixing or adding a feature to an existing library (like some that are hinted at in the question) or provide meaningful input about how to achieve a certain view based upon features already present. Absent that, the answers will undoubtedly be just like the question has been written . . . But, perhaps the original poster will be lucky and someone will suggest an existing library that does exactly what is sought. It doesn't sound like the answer (at this point in time) is going to contain any code.
    – lawlist
    Sep 14, 2016 at 0:45
  • 2
    Consider the possibility that I'm being a moderator who's trying to help clarify the question. Please tone down the rhetoric.
    – Dan
    Sep 14, 2016 at 0:47
  • 1
    @Drew: I don't feel this question is "competing" against anything. Please reread my comment. My point is, (1) that question is structured very similarly to this one, with the difference that I am much more explicit about how the utilities I have tried have failed. (2) What is unclear about What Emacs utilities can provide better browsing and navigation of reST documents? Alternatively, how would you make it more clear?
    – TomRoche
    Sep 14, 2016 at 2:48

2 Answers 2

2

rst-toc can be used to navigate sections.

1
  • Nice! and it comes with GNU Emacs 24.4.1
    – TomRoche
    Sep 14, 2016 at 3:30
0

3- when I use helm-imenu (coming in helm), I do have many levels of titles. I don't with a simple imenu.

5- instead of occur I switched to helm-swoop which is the same idea, but interactive. So I can feed it level markups, like --- or === and I can navigate through them with C-n and C-p. I know it isn't really a regexp, and I don't see the titles (but I do see them with helm-imenu).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.