From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Van L Newsgroups: gmane.emacs.help Subject: rx use case for ETL (was: Looking for generic text transformation utility library) Date: Fri, 20 Jul 2018 12:08:48 +1000 Message-ID: References: <868t6tijeg.fsf@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1532052441 6247 195.159.176.226 (20 Jul 2018 02:07:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 20 Jul 2018 02:07:21 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 20 04:07:17 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgKpA-0001W3-MY for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Jul 2018 04:07:16 +0200 Original-Received: from localhost ([::1]:46086 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgKrH-0000Xf-9c for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Jul 2018 22:09:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgKqq-0000XP-DY for help-gnu-emacs@gnu.org; Thu, 19 Jul 2018 22:09:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgKqn-0003L3-7D for help-gnu-emacs@gnu.org; Thu, 19 Jul 2018 22:09:00 -0400 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:32903) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fgKqn-0003Ho-0Q for help-gnu-emacs@gnu.org; Thu, 19 Jul 2018 22:08:57 -0400 X-Originating-IP: 220.240.100.183 Original-Received: from epi.local (unknown [220.240.100.183]) (Authenticated sender: van@scratch.space) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id DBBAD60003 for ; Fri, 20 Jul 2018 02:08:53 +0000 (UTC) In-Reply-To: <868t6tijeg.fsf@zoho.com> X-Mailer: Apple Mail (2.3124) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.183.195 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117508 Archived-At: >> I can't seem to find a way to do simple >> programmatic transformations without writing >> a good portion of code >=20 > "generic text transformation utility", you mean > like the Unix tool sed(1), the "stream editor > for filtering and transforming text", or tr(1), > to "translate or delete characters"? >=20 > Can you provide me/us with an example of > a text, as well as the end result you want it > to be translated into? A killer-mode in Emacs for the=20 Extract Transform Load (or ETL) industry would be=20 for a way to use rx (not regexp) to step by step=20 transform a source buffer to desired target form. Step 1. begin with two buffers, the source and target which are identical Step 2. an rx machine assisted composition buffer does what sed(1), tr(1), regexp do by showing in two mini buffers candidate patterns for source to target change which are=20 easy human readable and writable; imagine this kind of=20 workload isn=E2=80=99t done more than four times each year so=20 the readability has to be there after long stretches and for first timers Step 3. stop when there are no=20 undesired outliers in the target form=