[docutils:patches] #187 Rename .txt files to .rst

Günter Milde via Docutils-develop <[email protected]> Fri, 09 Aug 2024 09:35:00 -0000
Newsgroups gmane.text.docutils.devel
Message-ID </p/docutils/patches/187/6ff16158e326dfd458c5e24124687803f8940e20.patches@docutils.p.sourceforge.net>
We would need to adapt background scripts, too. I am unsure whether the following changes correctly describe the behaviour after applying this patch :
~~~
--- a/sandbox/infrastructure/docutils-update.local
+++ b/sandbox/infrastructure/docutils-update.local
@@ -14,10 +14,10 @@
 #
 # ATTENTION
 #
-# Any .html document with a corresponding .txt file is regenerated 
-# if the .txt has changed, but no new .html files will be generated.
+# Any .html document with a corresponding .rst file is regenerated 
+# if the .rst has changed, but no new .html files will be generated.
 #
-# * Funny thing: sf hides README.txt files.
+# * Funny thing: sf hides README.rst files.
 #
 # ATTENTION
~~~

I downloaded the patch set and tried to commit it to a local branch but failed:
~~~
milde@heinz:/usr/local/src/docutils-git-svn/docutils/docutils > git am -3 /tmp/17.patch 
Applying: Rename all .txt files to .rst
Applying: Update references to .txt files
Using index info to reconstruct a base tree...
M	docutils/test/test_utils/test__init__.py
.git/rebase-apply/patch:7937: trailing whitespace.
# Any .html document with a corresponding .rst file is regenerated 
error: patch failed: docutils/docs/ref/rst/history.rst:1
error: docutils/docs/ref/rst/history.rst: patch does not apply
error: Did you hand edit your patch?
It does not apply to blobs recorded in its index.
Patch failed at 0002 Update references to .txt files
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
~~~



---

**[patches:#187] Rename .txt files to .rst**

**Status:** pending-remind
**Group:** None
**Created:** Wed Jan 05, 2022 05:51 PM UTC by Adam  Turner
**Last Updated:** Fri Aug 09, 2024 05:12 AM UTC
**Owner:** Adam  Turner


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 [email protected] 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.