X-Loop: help-debbugs@HIDDEN Subject: bug#55828: Add command to edit a rectangle arbitrarily in a separate buffer Resent-From: Phil Sainty <psainty@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 07 Jun 2022 09:25:01 +0000 Resent-Message-ID: <handler.55828.B.165459388423409 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 55828 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 55828 <at> debbugs.gnu.org Cc: Michael Heerdegen <michael_heerdegen@HIDDEN> X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.165459388423409 (code B ref -1); Tue, 07 Jun 2022 09:25:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jun 2022 09:24:44 +0000 Received: from localhost ([127.0.0.1]:37662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nyVS8-00065V-2X for submit <at> debbugs.gnu.org; Tue, 07 Jun 2022 05:24:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:50616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <psainty@HIDDEN>) id 1nyVS6-00065O-Ia for submit <at> debbugs.gnu.org; Tue, 07 Jun 2022 05:24:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41070) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <psainty@HIDDEN>) id 1nyVS5-000428-8h for bug-gnu-emacs@HIDDEN; Tue, 07 Jun 2022 05:24:42 -0400 Received: from smtp-4.orcon.net.nz ([60.234.4.59]:52219) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <psainty@HIDDEN>) id 1nyVS2-0003Dh-N8 for bug-gnu-emacs@HIDDEN; Tue, 07 Jun 2022 05:24:40 -0400 Received: from [10.253.37.70] (port=18128 helo=webmail.orcon.net.nz) by smtp-4.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from <psainty@HIDDEN>) id 1nyVRv-0000yq-0G; Tue, 07 Jun 2022 21:24:31 +1200 Received: from ip-116-251-140-135.kinect.net.nz ([116.251.140.135]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Tue, 07 Jun 2022 21:24:30 +1200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_73cb499baa95422a81fc547040b68254" Date: Tue, 07 Jun 2022 21:24:30 +1200 From: Phil Sainty <psainty@HIDDEN> Message-ID: <42925cc4927c79c1bf80ed4e3acf5581@HIDDEN> X-Sender: psainty@HIDDEN User-Agent: Orcon Webmail X-GeoIP: -- Received-SPF: pass client-ip=60.234.4.59; envelope-from=psainty@HIDDEN; helo=smtp-4.orcon.net.nz X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.7 (--) --=_73cb499baa95422a81fc547040b68254 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed At https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55234#11 Michael Heerdegen wrote: > I implemented a command that lets me edit a rectangular region > in a separate buffer I've had one of those for years as well, and always intended to work on it some more and propose it as a standard feature. I bind it to "C-x r e", with "C-c C-c" to write the rectangle back to the original buffer after editing. There are a lot of special-purpose "do X to a rectangle" commands, but I think a command which lets you do *absolutely anything* to a rectangle is extremely useful, and a buffer with only that text gives you that ability pretty trivially. I think Emacs should have this in its standard rectangle toolkit; so here's a new feature request for that. For reference I've attached my version. It's old code which knows nothing of `rectangle-mark-mode' or other newer things, and it has the notable flaw of introducing trailing whitespace if the rectangular region had intersected any line endings (something I'd intended to address before suggesting this); but it's always done the job when I've needed it, so I'm attaching it as-is (aside from renaming it to `rectangle-edit' which seems to be an available name-space for such a feature). It sounds to me as if Michael's code does more than mine -- at minimum mine does not ask what to do with modified dimensions as described at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55234#17 (I just use the original dimensions), so I'd be interested to see that. -Phil --=_73cb499baa95422a81fc547040b68254 Content-Transfer-Encoding: base64 Content-Type: text/x-lisp; name=rectangle-edit.el Content-Disposition: attachment; filename=rectangle-edit.el; size=3536 KHJlcXVpcmUgJ3JlY3QpCgooZGVmaW5lLWRlcml2ZWQtbW9kZSByZWN0YW5nbGUtZWRpdC1tb2Rl IG5pbCAiUmVjdGFuZ2xlLUVkaXQiCiAgOzsgVGhlIHJlY3RhbmdsZSBidWZmZXIgY29udGVudHMg d2lsbCBsaWtlbHkgYmUgaW52YWxpZCBmb3IgdGhlCiAgOzsgbWFqb3IgbW9kZSBvZiB0aGUgc291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kcy1wb2ludCBjb29yZHMtbWFyaykKICAg ICAgcmVjdGFuZ2xlLWVkaXQtZGF0YQogICAgKGxldCAoKHJlY3RhbmdsZS1lZGl0LWJ1ZmZlciAo Y3VycmVudC1idWZmZXIpKSkKICAgICAgOzsgQWNjb3VudCBmb3IgcG9zc2libGUgY2hhbmdlcyBp biB0aGUgZGltZW5zaW9ucyBvZiB0aGUKICAgICAgOzsgZWRpdC1idWZmZXIncyBjb250ZW50cyBi eSBleHBsaWNpdGx5IHVzaW5nIHRoZSBvcmlnaW5hbAogICAgICA7OyByZWN0YW5nbGUncyBoZWln aHQgYW5kIHdpZHRoIHRvIGVzdGFibGlzaCB0aGUgcmVwbGFjZW1lbnQKICAgICAgOzsgcmVjdGFu Z2xlLgogICAgICAoZ290by1jaGFyIChwb2ludC1taW4pKQogICAgICAobGV0ICgocmVtYWluaW5n IChmb3J3YXJkLWxpbmUgKDEtIGhlaWdodCkpKSkKICAgICAgICAoaW5zZXJ0LWNoYXIgP1xuIChp ZiAobG9va2luZy1iYWNrICJeIiAocG9pbnQpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAg IHJlbWFpbmluZwogICAgICAgICAgICAgICAgICAgICAgICAgICAoMSsgcmVtYWluaW5nKSkpKQog ICAgICAobW92ZS10by1jb2x1bW4gd2lkdGggdCkKICAgICAgOzsgUmVwbGFjZSB0aGUgb3JpZ2lu YWwgcmVjdGFuZ2xlIHdpdGggdGhlIGVkaXRlZCB2ZXJzaW9uLgogICAgICAobGV0ICgoY29udGVu dCAoZXh0cmFjdC1yZWN0YW5nbGUgKHBvaW50LW1pbikgKHBvaW50KSkpKQogICAgICAgIChzd2l0 Y2gtdG8tYnVmZmVyIHNvdXJjZS1idWZmZXIpCiAgICAgICAgKGdvdG8tY2hhciBzdGFydCkKICAg ICAgICAoZGVsZXRlLXJlY3RhbmdsZSBzdGFydCBlbmQpCiAgICAgICAgKGluc2VydC1yZWN0YW5n bGUgY29udGVudCkKICAgICAgICAoa2lsbC1id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vb3Jkcy1wb2ludCkgKGxpbmUtbnVtYmVyLWF0 LXBvcykpKQogICAgICAgIChtb3ZlLXRvLWNvbHVtbiAoY2FkciBjb29yZHMtcG9pbnQpIHQpKSkp KQo= --=_73cb499baa95422a81fc547040b68254--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Phil Sainty <psainty@HIDDEN> Subject: bug#55828: Acknowledgement (Add command to edit a rectangle arbitrarily in a separate buffer) Message-ID: <handler.55828.B.165459388423409.ack <at> debbugs.gnu.org> References: <42925cc4927c79c1bf80ed4e3acf5581@HIDDEN> X-Gnu-PR-Message: ack 55828 X-Gnu-PR-Package: emacs Reply-To: 55828 <at> debbugs.gnu.org Date: Tue, 07 Jun 2022 09:25:01 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 55828 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 55828: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D55828 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#55828: Add command to edit a rectangle arbitrarily in a separate buffer Resent-From: Juri Linkov <juri@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 08 Jun 2022 07:03:01 +0000 Resent-Message-ID: <handler.55828.B55828.165467176715326 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 55828 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Phil Sainty <psainty@HIDDEN> Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 55828 <at> debbugs.gnu.org Received: via spool by 55828-submit <at> debbugs.gnu.org id=B55828.165467176715326 (code B ref 55828); Wed, 08 Jun 2022 07:03:01 +0000 Received: (at 55828) by debbugs.gnu.org; 8 Jun 2022 07:02:47 +0000 Received: from localhost ([127.0.0.1]:42280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nypiJ-0003z7-Fi for submit <at> debbugs.gnu.org; Wed, 08 Jun 2022 03:02:47 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:33679) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1nypiH-0003yr-EV for 55828 <at> debbugs.gnu.org; Wed, 08 Jun 2022 03:02:46 -0400 Received: (Authenticated sender: juri@HIDDEN) by mail.gandi.net (Postfix) with ESMTPSA id E9FE0240008; Wed, 8 Jun 2022 07:02:35 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> Organization: LINKOV.NET References: <42925cc4927c79c1bf80ed4e3acf5581@HIDDEN> Date: Wed, 08 Jun 2022 09:58:55 +0300 In-Reply-To: <42925cc4927c79c1bf80ed4e3acf5581@HIDDEN> (Phil Sainty's message of "Tue, 07 Jun 2022 21:24:30 +1200") Message-ID: <868rq7myfs.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) > It sounds to me as if Michael's code does more than mine -- at minimum > mine does not ask what to do with modified dimensions as described at > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55234#17 (I just use the > original dimensions), so I'd be interested to see that. As Michael pointed out, it could be based on string-edit, so rectangle-edit could just call string-edit with the rectangle as a string, and success-callback to replace the original rectangle with the edited string.
X-Loop: help-debbugs@HIDDEN Subject: bug#55828: Add command to edit a rectangle arbitrarily in a separate buffer Resent-From: Phil Sainty <psainty@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 08 Jun 2022 09:58:02 +0000 Resent-Message-ID: <handler.55828.B55828.165468227824578 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 55828 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov <juri@HIDDEN> Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 55828 <at> debbugs.gnu.org Received: via spool by 55828-submit <at> debbugs.gnu.org id=B55828.165468227824578 (code B ref 55828); Wed, 08 Jun 2022 09:58:02 +0000 Received: (at 55828) by debbugs.gnu.org; 8 Jun 2022 09:57:58 +0000 Received: from localhost ([127.0.0.1]:42499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nysRq-0006OM-Ga for submit <at> debbugs.gnu.org; Wed, 08 Jun 2022 05:57:58 -0400 Received: from smtp-3.orcon.net.nz ([60.234.4.44]:38999) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <psainty@HIDDEN>) id 1nysRo-0006OD-Ni for 55828 <at> debbugs.gnu.org; Wed, 08 Jun 2022 05:57:57 -0400 Received: from [10.253.37.70] (port=20344 helo=webmail.orcon.net.nz) by smtp-3.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from <psainty@HIDDEN>) id 1nysRk-0002u6-Hj; Wed, 08 Jun 2022 21:57:52 +1200 Received: from ip-116-251-140-135.kinect.net.nz ([116.251.140.135]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Wed, 08 Jun 2022 21:57:52 +1200 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 08 Jun 2022 21:57:52 +1200 From: Phil Sainty <psainty@HIDDEN> In-Reply-To: <868rq7myfs.fsf@HIDDEN> References: <42925cc4927c79c1bf80ed4e3acf5581@HIDDEN> <868rq7myfs.fsf@HIDDEN> Message-ID: <df77b9fdc10b7b0048b428e704007835@HIDDEN> X-Sender: psainty@HIDDEN User-Agent: Orcon Webmail X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On 2022-06-08 18:58, Juri Linkov wrote: > As Michael pointed out, it could be based on string-edit, Perhaps. I just compiled from master to have a look at this, and I don't know whether that's an obvious way to go. I'm not seeing a particularly nice way to pass the information about the source of the rectangle through to the success callback, unless that function was a closure generated at call time, or the data was passed as text properties, both of which seem a bit ugly to me in this scenario (the latter more so than the former, but neither feels ideal). Perhaps `string-edit' is missing a `data' argument to be passed along to the callback functions? There's also no obvious facility for preparing the edit buffer. In my command I'm setting the syntax-table to match the original buffer, and setting fill-column to the rectangle width, both of which seem like sensible things for the purpose at hand; but there's no way of doing such things with `string-edit' other than `string-edit-mode-hook' which I think is going to be awkward to deal with for such a purpose. I guess you can let-bind the hook variable around the `string-edit' call to add a set-up function, but it again feels like there should be a nicer option. It does provide some boilerplate, but I'm not sure it makes sense to shoe-horn the rectangle command into that framework in its current form. Maybe with some enhancements it makes sense, though. -Phil
X-Loop: help-debbugs@HIDDEN Subject: bug#55828: Add command to edit a rectangle arbitrarily in a separate buffer Resent-From: Juri Linkov <juri@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 08 Jun 2022 16:30:03 +0000 Resent-Message-ID: <handler.55828.B55828.165470574632324 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 55828 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Phil Sainty <psainty@HIDDEN> Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 55828 <at> debbugs.gnu.org Received: via spool by 55828-submit <at> debbugs.gnu.org id=B55828.165470574632324 (code B ref 55828); Wed, 08 Jun 2022 16:30:03 +0000 Received: (at 55828) by debbugs.gnu.org; 8 Jun 2022 16:29:06 +0000 Received: from localhost ([127.0.0.1]:44049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nyyYM-0008PI-9v for submit <at> debbugs.gnu.org; Wed, 08 Jun 2022 12:29:06 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:52333) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1nyyYJ-0008Oh-Bk for 55828 <at> debbugs.gnu.org; Wed, 08 Jun 2022 12:29:05 -0400 Received: (Authenticated sender: juri@HIDDEN) by mail.gandi.net (Postfix) with ESMTPSA id 6B7A2200008; Wed, 8 Jun 2022 16:28:55 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> Organization: LINKOV.NET References: <42925cc4927c79c1bf80ed4e3acf5581@HIDDEN> <868rq7myfs.fsf@HIDDEN> <df77b9fdc10b7b0048b428e704007835@HIDDEN> Date: Wed, 08 Jun 2022 19:18:01 +0300 In-Reply-To: <df77b9fdc10b7b0048b428e704007835@HIDDEN> (Phil Sainty's message of "Wed, 08 Jun 2022 21:57:52 +1200") Message-ID: <86r13zkvxi.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) > It does provide some boilerplate, but I'm not sure it makes > sense to shoe-horn the rectangle command into that framework > in its current form. Maybe with some enhancements it makes > sense, though. The initial version of string-edit is only 1 month old. So you are welcome to propose any improvements that will make it more useful for different use cases.
Received: (at control) by debbugs.gnu.org; 19 Jun 2022 13:53:14 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 19 09:53:14 2022 Received: from localhost ([127.0.0.1]:50966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1o2vMX-0008Vt-Qw for submit <at> debbugs.gnu.org; Sun, 19 Jun 2022 09:53:13 -0400 Received: from mail-pl1-f172.google.com ([209.85.214.172]:46708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1o2vMV-0008Ve-3U for control <at> debbugs.gnu.org; Sun, 19 Jun 2022 09:53:12 -0400 Received: by mail-pl1-f172.google.com with SMTP id d13so7589023plh.13 for <control <at> debbugs.gnu.org>; Sun, 19 Jun 2022 06:53:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=0YPLBnl4d5ZiFkalQDG0O/cgtTxzpZTGU25LGG8aajU=; b=RrHKxVo9z6+QD6S8NVFgwJMUskQNpIHUXi6GRy0qQU2YP2fE4qYivr441oyWum4feM t8TbKf+6g5Mp2KlUvbSGwei6+WSaNOQrvoBNHH2Sh+LDbazIbXIn9vyGxNcGyOpguWLd YDTZqfC1aXK13FtRDS1CIiPUF1Bh+i8gfhSCZfH3AnBvrOkrCcNHELx314Tt7nv05zVH lxJ0Oh8bU1M0XLbNwgKnvfu6eM0qBUnt7xrhlzdf0Rf9tk7xf6/barFKEsu9gobCsQcj 4GSUSUqcTOyoQ8vWVQV/vPmFr4nKdfOsN1m6OdTjVrAaqRfmVMnMHhcmZ4GWQwFzYgkz 4MaQ== X-Gm-Message-State: AJIora+JMHYkwOBpku5cIBY8ikNwzfHbX09IoD3Kiv8DXslxy4bH+ZFr 6gEXV1hlrYk3Bt3nmGJRf/9wbE3ihGSvgl+bjAkMgqcS X-Google-Smtp-Source: AGRyM1tPNmebQA/3/T0MdCpe/0iCImiR1dDpCM2SzNdj/TrETXS05HqT3hMD7JVfdu27VBaadOpLqp4cWh8XsqoqNhE= X-Received: by 2002:a17:90b:4f8a:b0:1e8:9018:dec9 with SMTP id qe10-20020a17090b4f8a00b001e89018dec9mr32089071pjb.89.1655646785008; Sun, 19 Jun 2022 06:53:05 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 19 Jun 2022 06:53:04 -0700 From: Stefan Kangas <stefan@HIDDEN> MIME-Version: 1.0 Date: Sun, 19 Jun 2022 06:53:04 -0700 Message-ID: <CADwFkmne7VCowCZF3oT6UAVTmdA1oFJJVusn8fyWnUUAAteYrQ@HIDDEN> Subject: control message for bug #55828 To: control <at> debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.5 (/) severity 55828 wishlist quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.