TOC :glob: is incompatible with explicitly named files

Barry Warsaw avatarBarry Warsaw created an issue

I want to have the following toctree in my top level document:

.. toctree::
    :glob:

    docs/using.txt
    docs/*
    NEWS.txt

The idea being that I want the docs/using.txt to show up first, followed by everything else in the docs directory. This does not work though:

/home/me/projects/flufl/flufl.i18n/flufl/i18n/README.txt:86: (WARNING/2) toctree glob pattern u'docs/using.txt' didn't match any documents
/home/me/projects/flufl/flufl.i18n/flufl/i18n/README.txt:86: (WARNING/2) toctree glob pattern u'NEWS.txt' didn't match any documents

If there's no glob pattern, shouldn't it be taken as a literal file name and used to influence the sorting of the toc entries?

Oh, and why doesn't docs/*.txt work here?

Comments (3)

  1. Georg Brandl

    The problem is that inside "toctree", you specify document names, not file names. Document names are sans extension. Without the glob option, specifying the extension still works because there I can explicitly try removing the extension; for glob it won't.

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.