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 :-(

TomRoche
  • 592
  • 3
  • 20
  • 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 '16 at 21:54
  • Please a single, clear, specific question. Thx. – Drew Sep 13 '16 at 23:10
  • @Dan: how is this question less clear or more open-ended than [this question](http://emacs.stackexchange.com/questions/5348/better-indentation-and-navigation-in-assembly-source-code?rq=1) which has been un-closed (and upvoted, and starred!) for a year? Consider the possibility that you're being a [question-Nazi](http://meta.stackexchange.com/questions/19999/should-question-titles-be-phrased-as-questions-a-straw-poll#comment173510_20005). – TomRoche Sep 13 '16 at 23:43
  • @Drew: see previous comment. (This one is separate only because "only one additional `@user` can be notified.") – TomRoche Sep 13 '16 at 23:44
  • 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 '16 at 00: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 '16 at 00:47
  • Tom: Please consider rereading your question and clarifying it, to *help you* get useful answers to the questions you have. That is the only purpose of the comments here (so far). And note that the question that you seem to feel you are "competing" against was *upvoted* 11 times and has two answers, one of which was *upvoted* 10 times. Help others help you, and you too might get good answers to whatever you are trying to find. For now, it's not clear (to me) what that is. On the other hand, sometimes something has been unclear to me but was clear to someone else who provided a good answer... – Drew Sep 14 '16 at 02:23
  • 1
    @Drew: I don't feel this question is "competing" against anything. Please reread [my comment](http://emacs.stackexchange.com/questions/5348/better-indentation-and-navigation-in-assembly-source-code?rq=1). 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 '16 at 02:48

2 Answers2

2

rst-toc can be used to navigate sections.

Ista
  • 1,148
  • 8
  • 12
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).

Ehvince
  • 1,091
  • 10
  • 14