From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#36167: [PATCH] Replace [0-9a-fA-F] with [[:xdigit:]] Date: Wed, 12 Jun 2019 19:39:26 +0300 Message-ID: <1560357566.5452.0@yandex.ru> References: <1560254386.25060.0@yandex.ru> <20190611122925.12809-1-Hi-Angel@yandex.ru> <1560259030.21373.0@yandex.ru> <1560299369.31875.0@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="184533"; mail-complaints-to="usenet@blaine.gmane.org" Cc: rpluim@gmail.com, 36167@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 12 18:51:07 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hb6So-000lp0-5F for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jun 2019 18:51:06 +0200 Original-Received: from localhost ([::1]:33810 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hb6Sm-0004q4-Ql for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jun 2019 12:51:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56017) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hb6O2-0001qI-K7 for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2019 12:46:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hb6Nx-0000N4-JJ for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2019 12:46:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48664) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hb6Nu-0000JU-NR for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2019 12:46:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hb6Nu-0004ir-I6 for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2019 12:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Jun 2019 16:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36167 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 36167-submit@debbugs.gnu.org id=B36167.156035791918093 (code B ref 36167); Wed, 12 Jun 2019 16:46:02 +0000 Original-Received: (at 36167) by debbugs.gnu.org; 12 Jun 2019 16:45:19 +0000 Original-Received: from localhost ([127.0.0.1]:33975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb6ND-0004hl-69 for submit@debbugs.gnu.org; Wed, 12 Jun 2019 12:45:19 -0400 Original-Received: from forward101j.mail.yandex.net ([5.45.198.241]:38831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb6N8-0004hL-Fy for 36167@debbugs.gnu.org; Wed, 12 Jun 2019 12:45:16 -0400 Original-Received: from mxback14o.mail.yandex.net (mxback14o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::65]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 17E921BE0B6A; Wed, 12 Jun 2019 19:39:29 +0300 (MSK) Original-Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback14o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 3XFjgTN5b6-dRc8hO8Q; Wed, 12 Jun 2019 19:39:29 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1560357569; bh=697RyuLxlHTvv7wNmYW9dY/Q9YLwmywyS/a6clXYmwg=; h=In-Reply-To:Cc:To:Subject:From:References:Date:Message-Id; b=CIdfzf57okNMjPyRmKsznvJjTXma+KWpIRTsDMkMGrGZ1GkdgXapflJc/1SnBCjkU M5FxhcoepODNc1UM+mw6HfsbN66aP5M91oh9b0a1TYH9D1sR6xzNqaxVYroM/9hIjj 89/zkmRsQbUnt3b+COqMvxgCc0984OVyFb1Xs+wU= Authentication-Results: mxback14o.mail.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id wjLFY94LE1-dRECmQr3; Wed, 12 Jun 2019 19:39:27 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) In-Reply-To: <83lfy697ke.fsf@gnu.org> X-Mailer: geary/3.33.1 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:160456 Archived-At: =D0=92 =D0=A1=D1=80, =D0=B8=D1=8E=D0=BD 12, 2019 at 17:55, Eli Zaretskii =20 =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: >> Date: Wed, 12 Jun 2019 14:19:04 +0300 >> From: Konstantin Kharlamov >> Cc: 36167@debbugs.gnu.org >>=20 >> > Sorry, I forgot a step: you have to visit the file you changed,=20 >> and >> > make sure point is near where you made changes (C-x v =3D will show=20 >> you >> > a *vc-diff* buffer containing the changes), and then do C-x 4 a >> > (possibly multiple times if you changed multiple things). >>=20 >> Oh, that doesn't sound automated, it's a lot of work. I had 28=20 >> files in >> the outdated patch, and there will be more, as noted Paul. >=20 > 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=20 replacement manually. But I'm a fan of automation, this reduces a "human factor" and is=20 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=C2=B9. (okay, maybe then also to=20 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. >=20 > 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:=20 https://github.com/Hi-Angel/dotfiles/blob/33eab4cc99ad06dbfa71fa0cf9c2822e5= d824f24/.zshrc#L122 =