From: Günter M. <mi...@us...> - 2022-01-05 18:49:55
|
Docutils is quite clear about the [standard filename extension for a reStructuredText file](https://docutils.sourceforge.io/FAQ.html#what-s-the-standard-filename-extension-for-a-restructuredtext-file), so I don't see this accepted anytime soon. The [policies](https://docutils.sourceforge.io/docs/dev/policies.html#documentation-conventions) advise: > * Add an Emacs "local variables" block in a comment at the end of the document. See the end of this document for an example. Compatible editors can use this to set the editing mode. In the [jed programmer's editor](https://www.jedsoft.org/jed), I use a hook ~~~S-Lang % set rst (reStructured Text) mode for some cases define text_mode_hook() { % Set rst_mode for text files in the Docutils SVN working dir % and the Docutils test dir if ((is_substr(buffer_filename(), "docutils") or is_substr(buffer_filename(), "Test/Docutils")) and not is_substr(buffer_filename(), "Makefile")) { rst_mode(); return(1); } % ... } ~~~ Maybe something similar is available in other "intelligent" editors, too. --- ** [patches:#187] Rename .txt files to .rst** **Status:** open **Group:** None **Created:** Wed Jan 05, 2022 05:51 PM UTC by Adam Turner **Last Updated:** Wed Jan 05, 2022 05:51 PM UTC **Owner:** nobody This change is in two parts -- the first commit does the rename and the second goes through and updates references to .txt files. All tests pass. The benefit of this change is primarily for people -- on user interfaces with syntax highlighting (e.g. IntelliJ / VSCode / Notepad++ editors, code mirrors, etc), the text is presented natively as reStructuredText, and editor features can assist with e.g. autocompletion. Docutils itself of course does not care which file extension is used. I have not renamed any of the include files or template files in `docutils.parsers` or `docutils.writers`, as they form part of the public API and would need a deprecation cycle (or aliasing in the parsing code) A Please see https://github.com/AA-Turner/docutils/pull/3 and https://github.com/AA-Turner/docutils/pull/3.patch for the commits and patch. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |