|
From: | Konstantin Kharlamov |
Subject: | bug#36167: [PATCH] Replace [0-9a-fA-F] with [[:xdigit:]] |
Date: | Wed, 12 Jun 2019 19:39:26 +0300 |
В Ср, июн 12, 2019 at 17:55, Eli Zaretskii <eliz@gnu.org> написал:
Date: Wed, 12 Jun 2019 14:19:04 +0300 From: Konstantin Kharlamov <hi-angel@yandex.ru> Cc: 36167@debbugs.gnu.org> Sorry, I forgot a step: you have to visit the file you changed, and > make sure point is near where you made changes (C-x v = will show you> a *vc-diff* buffer containing the changes), and then do C-x 4 a > (possibly multiple times if you changed multiple things).Oh, that doesn't sound automated, it's a lot of work. I had 28 files inthe outdated patch, and there will be more, as noted Paul.The idea is to type "C-x 4 a" right after making each change, or set up a keyboard macro that does this for you.
This indeed sounds somewhat easier, have I been making each xdigit replacement manually.
But I'm a fan of automation, this reduces a "human factor" and is faster. So the original xdigit patch was a matter of a single command:
sp "\[0-9a-fA-F\]" "[[:xdigit:]]"where "sp" is a "sed" replacement in perl¹. (okay, maybe then also to review and "git checkout" irrelevant files, like changelogs)
Having to do all 20 files manually would be a lot of work.
And in the other patch, which I did not send as it turned out to be obsolete (which was replacing [0-9] with [[:digit:]]) I had around 4xx changed files. No way one could manually go through 400 files, stop by each change, and press a hotkey.When you change 400 files, no one will expect you to mention each instance, it's enough to describe the change itself and say "in all files" or somesuch.
Can I do that for 20 files?1: https://github.com/Hi-Angel/dotfiles/blob/33eab4cc99ad06dbfa71fa0cf9c2822e5d824f24/.zshrc#L122
[Prev in Thread] | Current Thread | [Next in Thread] |