From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Status of Submitted Patches Date: Wed, 23 May 2018 10:21:37 +0200 Message-ID: <87d0xmok8e.fsf@elephly.net> References: <8ea5d026-fab9-7b12-198e-610ad7743cb2@swecha.net> <871sfxev9w.fsf@elephly.net> <7626275c-3eee-bb05-ab9d-4c88ec6f0329@swecha.net> <87r2nvjte6.fsf@elephly.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> 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]:54820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMJ35-0006z1-Lz for guix-devel@gnu.org; Fri, 25 May 2018 16:10:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMJ31-0008HM-L4 for guix-devel@gnu.org; Fri, 25 May 2018 16:10:51 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21009) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fMJ31-0008Fr-7H for guix-devel@gnu.org; Fri, 25 May 2018 16:10:47 -0400 In-reply-to: <149bfb8c-22b5-797d-e88a-ca4077b0a4cc@swecha.net> 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: Sahitihi Cc: guix-devel@gnu.org Hi Sahithi, >> As a first change, could you please add the relevant parts of =E2=80=9C(= ice-9 >> colorized)=E2=80=9D to a module in Guix? We probably don=E2=80=99t want= to depend on >> having users install this module separately. We also don=E2=80=99t need= all of >> it. Please prepare a patch that adds only the relevant parts to =E2=80= =9C(guix >> ui)=E2=80=9D and update the copyright headers. > > I think small changes to the attached file will serve the purpose. > But when I tried executing the file, that resulted with a error unbound v= ariable : colorize string > > I am not sure where I went wrong, can you please explain. Procedures need to be defined before they are used. On the first line (display (colorize-string "Hello!\n" 'RED 'BOLD 'ON-BLUE)) you=E2=80=99re refering to =E2=80=9Ccolorize-string=E2=80=9D, which is only= defined at the very bottom. Another problem is that you=E2=80=99re defining a module, but you aren=E2= =80=99t using it correctly. A module has a name =E2=80=94 in this case that=E2=80=99s = =E2=80=9C(term ansi-color)=E2=80=9D =E2=80=93 and that name must match the path of the fil= e containing it. So for =E2=80=9C(term ansi-color)=E2=80=9D we=E2=80=99d expect the mod= ule to be in a file =E2=80=9Cterm/ansi-color.scm=E2=80=9D in a directory in which Guile looks f= or modules. For your change to Guix itself I=E2=80=99d suggest adding the needed defini= tions to the existing module =E2=80=9C(guix ui)=E2=80=9D. Another note about style: I think it would be better to use =E2=80=9Calist->hash-table=E2=80=9D instead of =E2=80=9Cmake-hash-table=E2= =80=9D followed by repeated modifications to the hash table with =E2=80=9Chashq-set!=E2=80=9D. We pref= er to avoid mutation of values when possible. Regarding copyright headers: please make sure to also add a copyright line for yourself and a copyright line from the file of guile-colorize to =E2=80=9C(guix ui)=E2=80=9D. When you=E2=80=99re done with these changes, please make a local commit and= send the output of =E2=80=9Cgit format-patch -1=E2=80=9D. Thanks! -- Ricardo