From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Fwd: Re: Patch file for colorize module Date: Thu, 31 May 2018 08:26:46 +0200 Message-ID: <87o9gwpcmx.fsf@elephly.net> References: <8ea5d026-fab9-7b12-198e-610ad7743cb2@swecha.net> <5ab51417-b635-9725-9f48-3bc3f9b61fdf@swecha.net> <87tvsko2wd.fsf@elephly.net> <7290013c-990d-3f7d-d8db-38e090ed766a@swecha.net> <87zi28kt82.fsf@elephly.net> <8573e97d-d107-cde6-cd17-35f4ef6d2de3@swecha.net> <87k1takumm.fsf@elephly.net> <87o9hycwl6.fsf@elephly.net> <87r2mhdeap.fsf@elephly.net> <618c131c-6ba6-e525-aefc-72acca1c910f@swecha.net> <87a7suwtp7.fsf@elephly.net> <149bfb8c-22b5-797d-e88a-ca4077b0a4cc@swecha.net> <87d0xmok8e.fsf@elephly.net> <87k1rsb9ex.fsf@elephly.net> <3e099b0b-e3ec-2bbb-6d10-5b7e48c4dff6@swecha.net> <300fd917-6742-3ef1-044d-4b0f38a44250@swecha.net> <87a7sm4v5j.fsf@elephly.net> <3d5eca09-7730-bd38-265b-7942d0ea16ed@swecha.net> <878t864i59.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPIZ2-0006Ov-6m for guix-devel@gnu.org; Sat, 02 Jun 2018 22:16:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPIYz-0008Dn-6f for guix-devel@gnu.org; Sat, 02 Jun 2018 22:16:12 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21037) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fPIYy-0008Ct-UX for guix-devel@gnu.org; Sat, 02 Jun 2018 22:16:09 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Sahithi Cc: guix-devel Hi Sahithi, a couple of days ago I wrote this: > We=E2=80=99re still lacking code to actually use =E2=80=9Ccolorize-string= =E2=80=9D anywhere. > Could you please prepare a patch or a series of patches that achieves > the following: > > * add a soft port to (guix ui) that colorizes strings that match an > internal list of regular expressions. The initial list of regular > expressions could be something like this: > > '("^starting phase.*" > "^phase .* succeeded.*" > "^phase .* failed.*") > > See the documentation for =E2=80=9Cstring-match=E2=80=9D for details. > > Initially, the port should print any matching string as just green. > All other strings should not be modified at all. This will become a > little fancier in the future to allow use to apply different colours > or formatting to different parts of the strings just like it is done > by =E2=80=9Cguix-build-log-minor-mode=E2=80=9D of the Emacs interface f= or Guix. (If > you haven=E2=80=99t played with that interface yet, please do so.) > > * change =E2=80=9Cguix-package=E2=80=9D in =E2=80=9Cguix/scripts/package.= scm=E2=80=9D such that it will > use the new soft port. Note that =E2=80=9Ccurrent-build-output-port=E2= =80=9D in (guix > store) is a so-called parameter, which can be modified dynamically > using =E2=80=9Cparameterize=E2=80=9D. Take a look at =E2=80=9Cguix/scr= ipts/build.scm=E2=80=9D where > =E2=80=9Ccurrent-build-output-port=E2=80=9D is parameterized to the voi= d port when > =E2=80=9C--quiet=E2=80=9D was passed (this causes =E2=80=9Cguix build= =E2=80=9D to print no build log). > The change to =E2=80=9Cguix-package=E2=80=9D should be very similar. > > Does this sound like a good idea to you? > > By using a soft port I think we can limit future work (e.g. hiding of > parts of the build output) to just the inner procedures and data > structures of the soft port. > > Please try to give us short updates every two days or so; this way we > can ensure that any questions you may have can be addressed quickly. > Please also ask right away when anything is unclear or if the suggested > approach seems weird. Have you started on working on this yet? If so,could you please give us an update on your progress via email? --=20 Ricardo