From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sahitihi Subject: Re: Fwd: Re: Patch file for colorize module Date: Thu, 31 May 2018 23:55:51 +0530 Message-ID: <2f71be8d-c672-c66a-0b16-bc3abc748754@swecha.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> <87o9gwpcmx.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------094578EB1C0AC9D482BD0BC3" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOSHa-0007NJ-BH for guix-devel@gnu.org; Thu, 31 May 2018 14:26:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOSHX-0005yH-61 for guix-devel@gnu.org; Thu, 31 May 2018 14:26:42 -0400 In-Reply-To: <87o9gwpcmx.fsf@elephly.net> Content-Language: en-US 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: Ricardo Wurmus Cc: guix-devel This is a multi-part message in MIME format. --------------094578EB1C0AC9D482BD0BC3 Content-Type: multipart/alternative; boundary="------------AA46D71571550E4EDB1237D7" --------------AA46D71571550E4EDB1237D7 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ricardo, Sorry for delay. Next time I will make sure to run conversation via email as well. > Have you started on working on this yet? If so,could you please give u= s > an update on your progress via email? > I have started out using different functions like |1) regexp-match 2) ||string-contains which resulted same output for stri= ngs then i tried 1) string-match 2) string-substitute ended up using string substitute so that the result can be colored one. But I failed executing it. File is attached, Can u suggest where I went wrong. As per IRC discussion with Ricardo, I tried installing emacs and running a shell. ---- Sahithi||| --------------AA46D71571550E4EDB1237D7 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Hi Ricardo,

Sorry for delay. Next time I will make sure to run conversation via email as well.
Have you started on working on this yet?  If so,could you please give us
an update on your progress via email?

I have started out using different functions like
1) regexp-match
2) string-contains


which resulted same output for strings 


then i tried 


1) string-match

2) string-substitute 


ended up using string substitute so that the result can be colored one.


But I failed executing it. File is attached, Can u suggest where I went wrong.



As per IRC discussion with Ricardo, I tried installing emacs and running a shell.


----
Sahithi
--------------AA46D71571550E4EDB1237D7-- --------------094578EB1C0AC9D482BD0BC3 Content-Type: text/x-scheme; name="String Match.scm" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="String Match.scm" (use-modules (ice-9 regex)) (use-modules (ice-9 colorized)) (activate-colorized) (define p (make-soft-port (vector (lambda (c) (write c stdout)) (regexp-substitute/global #t ("^starting phase.*" "^phase .* succeeded.*" "^phase .* failed.*") "phase" 'pre (lambda (s) (display (colorized-display s '(GREEN)) stdout)) 'pos= t) (lambda () (display "." stdout)) (lambda () (char-upcase (read-char))) (lambda () (display "@" stdout))) "rw")) (write s p) --------------094578EB1C0AC9D482BD0BC3--