From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#50806: 27.2; [PATCH] Optimize ansi-color.el Date: Mon, 04 Oct 2021 12:17:43 +0200 Message-ID: <87sfxhf60o.fsf@miha-pc> References: <87tui8wakb.fsf@miha-pc> <25ed8125-3f78-c9c9-9324-d75e48e702c6@gmail.com> <87k0itc2ap.fsf@miha-pc> <3e19d87f-371b-31d5-cc1a-dd0b22659acf@gmail.com> Reply-To: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12240"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen To: Jim Porter , 50806@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 04 12:31:50 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXLGA-0002yX-7Y for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Oct 2021 12:31:50 +0200 Original-Received: from localhost ([::1]:60606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXLG9-0001wh-6y for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Oct 2021 06:31:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXKzu-0007ag-J1 for bug-gnu-emacs@gnu.org; Mon, 04 Oct 2021 06:15:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52432) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXKzu-0004kH-7T for bug-gnu-emacs@gnu.org; Mon, 04 Oct 2021 06:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mXKzu-0002LL-0O for bug-gnu-emacs@gnu.org; Mon, 04 Oct 2021 06:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Oct 2021 10:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 50806-submit@debbugs.gnu.org id=B50806.16333424598939 (code B ref 50806); Mon, 04 Oct 2021 10:15:01 +0000 Original-Received: (at 50806) by debbugs.gnu.org; 4 Oct 2021 10:14:19 +0000 Original-Received: from localhost ([127.0.0.1]:35745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXKzC-0002K6-6L for submit@debbugs.gnu.org; Mon, 04 Oct 2021 06:14:19 -0400 Original-Received: from kamnitnik.top ([209.250.245.214]:41892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXKz6-0002Jr-S2 for 50806@debbugs.gnu.org; Mon, 04 Oct 2021 06:14:17 -0400 Original-Received: from localhost (BSN-77-156-43.static.siol.net [193.77.156.43]) by kamnitnik.top (Postfix) with ESMTPSA id A46819C707; Mon, 4 Oct 2021 10:14:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1633342451; bh=Z23kgMqPKuVvl14NxHCVyJmQY9BuHQTaMj1Oup8ZU9k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=BJen/OImCf32XsYNikgVUZPDQdtjTh1N3ZI2LiLyaqPqH3lAxzrE/s++/dbDvb0o/ L1qpI+7PFyXGtpwPOsM30F5o8TN0qKLgiXvfQFa2TssCekptLKGQ4kZSyYYCJ6tvzi iZCBQXYoNkZKwlAliyN/YEuiKaT0RbSzPBNiK50L2z0aRca90HAGSMjYEpkpiadO4t qyj84hyEmpagaSKBGkuidCpKu5JqwxKLSCvelfs3edbn0d1XHNKOVcQSScCkiP2NH/ I/mroWlJYtc7k6uK28PjgoHgdZQn8tYWmpUJsmjH3oThaZo7YSFLiFYaRr/JkL+abW fLf1aF+dAa68g== In-Reply-To: <3e19d87f-371b-31d5-cc1a-dd0b22659acf@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216341 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Jim Porter writes: > I took a brief look at these and they seem reasonable to my eyes. It'll=20 > be nice to have (mostly) complete support for reading ANSI colors in Emac= s. > > Thinking about it a bit more, one thing that might be nice to add for > the first patch would be some additional tests to be sure that > `ansi-color-context-region' and `ansi-color-context' work as expected > (i.e. testing that multiple calls to `ansi-color-apply-on-region' and > similar produce the correct results). That's one of the trickier bits > in ansi-color.el (to me, anyway), and it'd be good to be sure all the > various cases still work there. > [...] > Good idea. For testing my patches, I already made some private tests of this nature (but only for ansi-color and not for term-mode). It should be easy to polish them up for ansi-color-tests.el. Will probably send a patch later. >>> I see you posted an updated patch that doesn't merge these vectors. I >>> don't have an opinion here, although if we do merge them, it would >>> probably be nice to get that into Emacs 28; other packages might >>> conceivably want to let-bind those[1]. >>=20 >> Indeed, if we wanted to merge them we'd have to do it in Emacs 28. >> That's why I think its best to simply leave them un-merged. > > If there's a performance benefit to merging them, I think it would be=20 > nice to do so while we have the chance. Perhaps a patch that just merges= =20 > the two vectors, and nothing else, would make sense for Emacs 28. Best=20 > to ask the maintainers in this case too, though. The performance benefit I measured was negligible so I think it's fine to just focus on Emacs 29. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmFa1McTHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP1aKEADBGLRyRlpx1EYmr+3frxmh1bFpbt6x jGOSCBiZWc2ceyDQ9q4m2WuQOn1+nvjcTrJCR6u7AnmIsRMXr1Sx09WJGVYCsPhZ rozCKOYb5S9/kFJL+GCeltf9QuCLtvnRKj1OC2CP9QxidBaKH15WupE6rFzchKNo otZeT/wPMeR0C1bCjQRQgDPccHdv6A3DP4arvjH3u8ionsNE9yDRo16qtRbUFie1 uSVFjpBBbqh7KK78Tjz4BDKFBolMcfd2nbti+yKcCveiDh4H2hDCEvWc7n43aJpz D5k9Yeeotr2yXYbYz+BZmA+uSIc8JMSAzFVuTT6lCiG8LsOUcz+UIGkQY5ach9rf 8fgQdIvvW99Q2B3/bjCH0cW+4qNalNCF1jRWwfOTKdQm2OEmEaaaxA71WLqs7OLG 1ILO7IxmU5DTw1myBoujbESS/ek9tREw5kunbklX6dFC+jVaQJxXUKnqpmo+k8gg LQLA+ii1AWwA5uxZ6ULnt0TTX1cFWC212NuDMEO4BPKp6ke0KUvgIzV8fcTxPJOx +PlZ0Aw9GO3rrbretHyXY5DCAl4CW/u6qYzm6B+EpM5fZDD+7X2euLoZQseIaFjG vlY2aM1P4O8ZKO9HSqxEB7yFB2EvdAj2pvZ3OFlP4DsIjARcsz6ikQyaWe+J56Vs AEN6gSdNWNimbg== =2DNf -----END PGP SIGNATURE----- --=-=-=--