Re: emacs can't create index

Stefan Merten <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <[email protected]>
Hi Ed!

3 hours ago Ed Brunelle wrote:
> I have the following test.rst :
> 
> list1
> -----
> 
> list2
> -----
> 
> list3
> -----

Thanks. I can reproduce the problem.

`rst-toc-insert` is somewhat picky in what it accepts. I do not use it
myself (and have not developed it myself) and doubt it's use. Thus I
did not do anything to make it more useful. I just removed a couple of
bugs ;-) .

In fact you have found something I call a mis-feature in my unit
tests for this function.

Please read the documentation of `rst-toc-insert` carefully:

  Insert the table of contents of the current section at the current column.
  By default the top level is ignored if there is only one, because
  we assume that the document will have a single title.

Your document has neither a title nor is the cursor in a section. Try
it with this example:

=====
TITLE
=====

list1
-----

list2
-----

list3
-----


Now in the line after the title `rst-toc-insert` works as documented.

However, the intended usage of this function is to use it at the point
marked by ``^@``:

=====
TITLE
=====

.. ^@

list1
-----

list2
-----

list3
-----


						Grüße

						Stefan

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.