Steinar Bang <[email protected]> writes:
> I started using emacs in 1987, and I still keep discovering new useful
> features.
>
> In my react frontend apps I have, since the start in 2018, been using
> the .js extension on both JSX and plain js files. And since then it has
> seemed like too much renaming work to split the two.
>
> But with vite 8.0.0 it sounds like the simplest solution is actually to
> bite the bullet and rename all JSX files to .jsx.
>
> The problem for the renaming is that the files that are to be renamed to
> .jsx is mingled with files that should stay as .js files. So doing this
> with a shell script or command line is more work than it is worth.
>
> So I googled, and the built-in solution in emacs proved to be amazingly
> simple and user friendly:
> 1. Open dired on a directory containing jsx files
> 2. Type 'C-x C-q' to make the dired buffer writable
> 3. Edit the file names in the dired buffer directly (in my case: add an
> "x" to the end of the file names that are supposed to have it)
> 4. Type 'C-c C-c' to commit the changes
>
> Here is the relevant manual entry: https://www.gnu.org/software/emacs/manual/html_node/emacs/Wdired.html
>
>
1. Two sources of documentation of Wdired in Emacs are:
(info "(emacs) Wdired")
and
C-h P wdired
If a user was to search for this capability without reading
the entire Emacs manual, they could try C-h p to list
built-in Emacs packages and look through the keywords to see
whether there is a package that could help with this task.
The description for the keyword ‘files’ suggests that it
might have something relevant and helpful:
files file editing and manipulation
When RET is pressed for this line, then we see the
description:
wdired built-in Rename files editing their names in dired buffers
2. The Emacs user manual also has a "concept index" that can be
helpful sometimes for searching for capabilities based on
concepts, but, unfortunately, its entry for Wdired is:
wdired mode: Wdired.
which does not tell a reader what Wdired does.
(info "(emacs) Concept Index")
--
The lyf so short, the craft so long to lerne.
- Geoffrey Chaucer, The Parliament of Birds.
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.