From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 27 06:23:49 2022 Received: (at submit) by debbugs.gnu.org; 27 Sep 2022 10:23:49 +0000 Received: from localhost ([127.0.0.1]:52947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od7ki-0005eV-Tv for submit@debbugs.gnu.org; Tue, 27 Sep 2022 06:23:49 -0400 Received: from lists.gnu.org ([209.51.188.17]:40306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od7kf-0005eM-Uk for submit@debbugs.gnu.org; Tue, 27 Sep 2022 06:23:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7kf-0007pD-F9; Tue, 27 Sep 2022 06:23:45 -0400 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]:41952) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1od7kd-0004Fp-FJ; Tue, 27 Sep 2022 06:23:45 -0400 Received: by mail-oi1-x235.google.com with SMTP id r125so11345477oia.8; Tue, 27 Sep 2022 03:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=7mX3YyvovIC8eX1F9/1LJFHLjCB89ODITvtZq6PDl94=; b=G3NAqYU+LFcX4fn4wRS4oqH8Za9++/LHrCYx4j3ersqY/O5XGokljFx0bIKbFmbGl1 wOW+z2WDxOMd0ynzEZpjCXwa5yak2/xeGhI9KcsmSgt0vWMWKm3LxfyxFzqAQH01Ik/R z9FhZSr3q8WTX1+/1+beU1nbsqzR8HXbNOo20Ej/5Q3lMYOweeKE9x0tLJr2YsLsRDni NkvXoTQP1GvXc6whpNYjQ6piU2wmqxvUv0OKy8lvC+5x5AFJIk0QMVj9fyjQxF8dV+h0 hEENNd+8qwO50CMxKSrulStqrsKVtbkd+MeXU4dobZFTaWB+NIxLgHot1zr9DAJWy+5F 2miQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=7mX3YyvovIC8eX1F9/1LJFHLjCB89ODITvtZq6PDl94=; b=YfBmBn66mBwmDseWeVWvE57DjWcFRNwkPTcanoe8jL5ihb7zNK68gzJYNzOjKVEc3z x3griG2d1GCDpeifsOtUpVfM2M5gxN+lub6C4R7f4i9+f1N0+DlWUBqNUBzO8utuinR5 DaIzGzH9OCJ+DESnuq9SheoQ+PRYUhaSfu9gCc8LBGqZti62O5OdsctLzcCb+3uaCDtm wwa/apl+t599pFJVU5GZTR18vZ/RWPUfJjD27Dpsg1P007S9T2DvHGot869MP6d/XQ4H g4G/tRSPY/RmicAeAKuBpqZ5cYRlX+sn6I5Y+vEDGnnFmwOuZrg9V+6bwqMLHJwF6U5q Xz4Q== X-Gm-Message-State: ACrzQf1pElG2tRRFwn+Pogdg3d8L+7gbCf9zlLX0EXbzD2rCvqOSsmW+ c3fLGfZY0bBDgXA3LmBH+pwSmGyMu1F+IHsbY/tYOksrE4rQaw== X-Google-Smtp-Source: AMsMyM435Yi5xza22J4wU7bR5Zoqn4CNd4ppfPDppa5ObFiRJDoCg1ogPTO/uU/C75gH9iNZus0nfzU9LheMbMaDb04= X-Received: by 2002:a05:6808:1b22:b0:350:c0f6:70ff with SMTP id bx34-20020a0568081b2200b00350c0f670ffmr1368555oib.35.1664274221281; Tue, 27 Sep 2022 03:23:41 -0700 (PDT) MIME-Version: 1.0 From: Christopher Lam Date: Tue, 27 Sep 2022 18:23:14 +0800 Message-ID: Subject: simple-format vs (ice-9 format) bug in 3.0.7? To: bug-guile@gnu.org, guile-devel Content-Type: multipart/alternative; boundary="000000000000c4b56105e9a60900" Received-SPF: pass client-ip=2607:f8b0:4864:20::235; envelope-from=christopher.lck@gmail.com; helo=mail-oi1-x235.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --000000000000c4b56105e9a60900 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi guilers, here's a short bash session. Why would the first bash call to "guile s.scm" work, but not the second one= ? guile-3.0.7 on ubuntu. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D $ cat s.scm (format #t "~f\n" 2.5) $ guile s.scm ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/chris/s.scm ;;; compiled /home/chris/.cache/guile/ccache/3.0-LE-8-4.5/home/chris/s.scm.go 2.5 $ guile s.scm Backtrace: In ice-9/boot-9.scm: 1752:10 6 (with-exception-handler _ _ #:unwind? _ # _) In unknown file: 5 (apply-smob/0 #) In ice-9/boot-9.scm: 724:2 4 (call-with-prompt ("prompt") # =E2=80=A6) In ice-9/eval.scm: 619:8 3 (_ #(#(#))) In ice-9/boot-9.scm: 2835:4 2 (save-module-excursion #) 4380:12 1 (_) In unknown file: 0 (simple-format #t "~f\n" 2.5) ERROR: In procedure simple-format: In procedure simple-format: FORMAT: Unsupported format option ~f - use (ice-9 format) instead $ guile --version guile (GNU Guile) 3.0.7 Packaged by Debian (3.0.7-deb+3.0.7-1) Copyright (C) 2021 Free Software Foundation, Inc. License LGPLv3+: GNU LGPL 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --000000000000c4b56105e9a60900 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi guilers, here's a short bash session.
Why would the first bash call to "guile s.scm" work, but not th= e second one?
guile-3.0.7 on ubuntu.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D
$ cat s.scm
(format #t "~f\n" 2.5)
<= br>$ guile s.scm
;;; note: auto-compilation is enabled, set GUILE_AUTO_= COMPILE=3D0
;;; =C2=A0 =C2=A0 =C2=A0 or pass the --no-auto-compile argum= ent to disable.
;;; compiling /home/chris/s.scm
;;; compiled /home/ch= ris/.cache/guile/ccache/3.0-LE-8-4.5/home/chris/s.scm.go
2.5
$ guile s.scm
Backtrace:
In ice-9/boot-9.scm:
=C2= =A0 1752:10 =C2=A06 (with-exception-handler _ _ #:unwind? _ # _)
In unkn= own file:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A05 (apply-smob/0 #<= thunk 7efd190d5540>)
In ice-9/boot-9.scm:
=C2=A0 =C2=A0 724:2 =C2= =A04 (call-with-prompt ("prompt") #<procedure 7efd190e5760 =E2= =80=A6> =E2=80=A6)
In ice-9/eval.scm:
=C2=A0 =C2=A0 619:8 =C2=A03 = (_ #(#(#<directory (guile-user) 7efd190d9c80>)))
In ice-9/boot-9.s= cm:
=C2=A0 =C2=A02835:4 =C2=A02 (save-module-excursion #<procedure 7e= fd190c9150 at ice-=E2=80=A6>)
=C2=A0 4380:12 =C2=A01 (_)
In unknow= n file:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00 (simple-format #t &qu= ot;~f\n" 2.5)

ERROR: In procedure simple-format:
In procedur= e simple-format: FORMAT: Unsupported format option ~f - use (ice-9 format) = instead

$ guile --version
guile (GNU Guile) 3.0= .7
Packaged by Debian (3.0.7-deb+3.0.7-1)
Copyright (C) 2021 Free Sof= tware Foundation, Inc.

License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html= >.
This is free software: you are free to change and redistribute= it.
There is NO WARRANTY, to the extent permitted by law.
=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= --000000000000c4b56105e9a60900-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 27 06:35:41 2022 Received: (at submit) by debbugs.gnu.org; 27 Sep 2022 10:35:41 +0000 Received: from localhost ([127.0.0.1]:52966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od7wD-00067E-Cn for submit@debbugs.gnu.org; Tue, 27 Sep 2022 06:35:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:42756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od7w9-000674-RF for submit@debbugs.gnu.org; Tue, 27 Sep 2022 06:35:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7w7-0004vu-S4; Tue, 27 Sep 2022 06:35:37 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:49191) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7w6-00070a-4g; Tue, 27 Sep 2022 06:35:35 -0400 Received: from [172.20.10.5] ([37.170.181.106]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.168]) with ESMTPSA (Nemesis) id 1MIdNt-1oRK5j48LV-00EeJz; Tue, 27 Sep 2022 12:35:27 +0200 Message-ID: <00542b80-4511-f902-1f8d-a8c5d1645bc3@abou-samra.fr> Date: Tue, 27 Sep 2022 12:35:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: simple-format vs (ice-9 format) bug in 3.0.7? To: Christopher Lam , bug-guile@gnu.org, guile-devel References: Content-Language: en-US From: Jean Abou Samra In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:6EqWWHrpJAyOvuyE+q3gctmuFWeLNbtQmPC50rk5BLuKeaIN5/F 1VTnyTYMeQQHhOrr86h0gbHlk9fJrATZT8bSn0RFUu4b72xoI/AvdFwh3MK7DCxM9gWEOjq TYUiNtfNgteWvgw1JeNxXwKzA9gjnYSUXjQnzJv4CpKebGLBhrGqzak/tzsl5lSU8xGO9ED V35CIPdBRCLXBHYpvk76A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:LMuhImF5PBs=:Q/mVvYmHj+hiecSbo9yrQL Y2XlXqZVWJ2IGhmeM3ZMnNqZ7AdYIwhn5T8KF2/nqzlzbRwnhleJIqDF05OP77qcpjkJOjkds M0gzI57jF3kBvuLCl8kaCnr9eSE1/+Otcjrr6W/TKwIvI4sACKW1Vyy3Nwiqi2MeqUkNoo3u9 O+yXnZLjArS8EVgWjfOZaOhNagNe9Sk+joCkTmFbAxUeAJXQDrbbGnYQ1XiyoJdmniJOcK7sG QXEfgJ5ZMvoCBPg67urg+S52kd0UIVTlW3cB9pDnWe29ZdMkXlSbei/Y/d4tvwjGXczM8UlMq iz5qXpk3+MEIaSEBurzOfIdotOagYcMs9RNF9ASngtiasubUydnQ09lHYfws/Xo2u+Jo5DrJE XmmMWk0WJd9DPaA37HmSV7lnXAUzfHzw0ZzStzugmbNj2juAXVDjSyBM7LfwoMlEgfC6HuKPj FyAnx3A73dbZ0hyIkbEHKl7N1D4Qq7FdoFSB0cOwy4RJsX1pNlJp9j5X7Oc91Sm9ACz1Qx16e Mq37OHslFVqFO14AgRH7FuyR1zp9NIs0Nzla3EgEmWgo71B77E+RleCQr56JvowKsE0GzDeFS JNdEWUVmiFqvDSxRzKhu9X7aZgezL2llpIrYgRRmmgbXFLe4OlN3+P6es3n0JSMi48paT7VOr B4g984uAm/OvlwGVqxuJYflkv75br4sK/vxRYAVOuaisXmiCa6dwqaxVuier36Gr9K2vuGxpt odLelTLMG5DFxlDCNI6hp+Gft/xgzGd3wbmquO4wrXtvUq/cMQFwdnn/yv52ET5p6+N2RT18K Okrd1Bq Received-SPF: none client-ip=212.227.126.135; envelope-from=jean@abou-samra.fr; helo=mout.kundenserver.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-2.319, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.1 (-----) Le 27/09/2022 à 12:23, Christopher Lam a écrit : > Hi guilers, here's a short bash session. > Why would the first bash call to "guile s.scm" work, but not the > second one? > guile-3.0.7 on ubuntu. > This is a duplicate of https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50059 From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 27 06:38:57 2022 Received: (at submit) by debbugs.gnu.org; 27 Sep 2022 10:38:57 +0000 Received: from localhost ([127.0.0.1]:52970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od7zM-0006Bl-Tn for submit@debbugs.gnu.org; Tue, 27 Sep 2022 06:38:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:36418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od7z7-0006BM-Oz for submit@debbugs.gnu.org; Tue, 27 Sep 2022 06:38:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7z4-0008Ur-CB; Tue, 27 Sep 2022 06:38:41 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:45121) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7z0-0007MJ-5g; Tue, 27 Sep 2022 06:38:36 -0400 Received: from [172.20.10.5] ([37.170.181.106]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.168]) with ESMTPSA (Nemesis) id 1MHGTI-1oPwhD1oUi-00DGo2; Tue, 27 Sep 2022 12:38:31 +0200 Message-ID: <6396d555-17fe-dc16-970b-f1075e61131a@abou-samra.fr> Date: Tue, 27 Sep 2022 12:38:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: simple-format vs (ice-9 format) bug in 3.0.7? From: Jean Abou Samra To: Christopher Lam , bug-guile@gnu.org, guile-devel References: <00542b80-4511-f902-1f8d-a8c5d1645bc3@abou-samra.fr> Content-Language: en-US In-Reply-To: <00542b80-4511-f902-1f8d-a8c5d1645bc3@abou-samra.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:YsXIC7rZ1jQlGkxGxI/f7kXTcGbgUcY/KtOY4w/VaiirnttIrfu jNr/6mAhqn30rmhNaXdgDUeYTA7AMmgGmTxlE8MbZ4tLKbJOT4CLwnH39k+fG1wKponxW6B ciraf4xYB0cxhwqIIygstm8tQ6ysdDOfEtg7e0WhB1Dqlcjz8wfkBNV+dUhCsOMeSFeKGY1 pJYOqc56hdl2H9AmC3ACQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:yZNXXYtmL6c=:Z9HIRHBkZQKL2XO4CPvIwi bhi0YL3DDTPkXoFh9h6dHsNPPbBjcKJzvyRIEL+llynmOObqkNSSiuEmE8sQYS9rcHcYuR7Ri MNbdtOAldZ530oiS+8xQ7mYqFwuXNvh5XoIveGKzCI1cmiQylNq+Vfn4XGOuL6PBzLUjabrUd 8VoKVgRD/1Zku9gQF6siFM295AxANJxGJ/gNbfnwfe0fL4z8Bkv2VTYssoTmIatYZtENqdzrs WGALMrmmYGIAXJJ3oh0HJ2/TZ1HXrtaBm0E/XlZqSrXqdE5YQNq/VsosM5qOXo0a1Cj+7cWc+ k03ExRZ9/NSwu9J2dQYVioBjh2j9BgGYg/V1brwozy9WjL0Rn4f7qyHjq8Vi+ZPBW9xo6dd6p ke1vnqhk8qtb+K58BIE6e22Gmz54x5uFoGv8k/mg//Z4t5ECguapKYRvRCbJ/1v0EJXOK2RF/ fyeB1mQa6hXMBYg+lyqfRjzSactZ9MvKtNOL1KgVhj1PrDPlVzHU+OsEpm73FUQn29rckTiuy qSXcZiNOa/B9njKv6NS8mfcHF8BmuCR4D4aS/u4tMwP/N76Ck02m+mfpN/UEAzvaLSaLZOHpm NoHQADTDEtglJtXLxrVYQoxPfTLK2eWq40dF5s+y7JGa5/Srz61Iclg7KK1LdJljwLNj7MW4C RhToBbmMa1aoFARMEsfC8OCcs+SXPB4K1MheGxN4j4u32W4g7Vn1YN1JJvPdAhtr1L3LZrbm4 1voThtKNAuKmNRR4JZI6WZzgDPOXjm7mwXWpNScqFI92mx1H287bvdFWTxvznceYYs7DioaKy XoWxXD/ Received-SPF: none client-ip=212.227.126.130; envelope-from=jean@abou-samra.fr; helo=mout.kundenserver.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-2.319, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.1 (-----) Le 27/09/2022 à 12:35, Jean Abou Samra a écrit : > > > Le 27/09/2022 à 12:23, Christopher Lam a écrit : >> Hi guilers, here's a short bash session. >> Why would the first bash call to "guile s.scm" work, but not the >> second one? >> guile-3.0.7 on ubuntu. >> > > > This is a duplicate of > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50059 > Uh, at the end of module/ice-9/format.scm, there is ;; Thanks to Shuji Narazaki (module-set! the-root-module 'format format) which dates back to commit 14469b7c69feb0f2c5b8a093f19fe2a548b31c5b Author: Greg J. Badros Date:   Thu Jan 20 20:58:30 2000 +0000     * format.scm: Use (variable-set! (builtin-variable 'format)) to     re-define format to be format:format (instead of just define,     which interacts poorly with the module system).  Thanks to Shuji     Narazaki for this change. diff --git a/ice-9/format.scm b/ice-9/format.scm index fce2737ce..40f20b3da 100644 --- a/ice-9/format.scm +++ b/ice-9/format.scm @@ -1670,7 +1670,9 @@  (define format:abort (lambda () (error "error in format"))) -(define format format:format) +;;(define format format:format) +;; Thanks to Shuji Narazaki +(variable-set! (builtin-variable 'format) format:format)  ;; If this is not possible then a continuation is used to recover  ;; properly from a format error. In this case format returns #f. This probably predates #:replace and could be removed now, right? From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 01 09:40:29 2022 Received: (at 58109) by debbugs.gnu.org; 1 Oct 2022 13:40:29 +0000 Received: from localhost ([127.0.0.1]:43999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oecjE-0005VK-UV for submit@debbugs.gnu.org; Sat, 01 Oct 2022 09:40:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oecjC-0005Uy-9e for 58109@debbugs.gnu.org; Sat, 01 Oct 2022 09:40:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52792) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oecj6-00083k-TA; Sat, 01 Oct 2022 09:40:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=fwpIuFiyyHG/kfPTkcHkSK2aQp0m18pngkht7zRftwM=; b=qz5mS+loA703YcYQXedd xEnBM7IOd7tTZ6tOpXawhEKcbHoMlUpUxLKpZauk06UmCfu67L9kRibwXb5bHjqZ6gDXjvudOGNX0 x1oxSTcjdZDEkunTPBYVF6DA9viD4cttMuqzgFik0ctvRV0yuHt4ssMIAwqTXVufkSzNlx9f3V8Mt IxXwc6Km5rGPe+S5csyBhhSrvLaVeUrfJCVxfAJmn84CAj747EiMcvcjegdRbdHvWDpOVj0G6QbFf 6EhtBIJx94f0BQuwyFO6ekikUSt2CSj8kPpLovsBzDlziboH6O9O2gLK3eTa8lhNOryBLXYL5GUs7 D0mcrliP25MHJA==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41120 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oecj6-00074Y-G8; Sat, 01 Oct 2022 09:40:20 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Jean Abou Samra Subject: Re: bug#58109: simple-format vs (ice-9 format) bug in 3.0.7? References: <00542b80-4511-f902-1f8d-a8c5d1645bc3@abou-samra.fr> <6396d555-17fe-dc16-970b-f1075e61131a@abou-samra.fr> Date: Sat, 01 Oct 2022 15:40:18 +0200 In-Reply-To: <6396d555-17fe-dc16-970b-f1075e61131a@abou-samra.fr> (Jean Abou Samra's message of "Tue, 27 Sep 2022 12:38:29 +0200") Message-ID: <87ill3fyrh.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58109 Cc: christopher.lck@gmail.com, 58109@debbugs.gnu.org, guile-devel@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Jean Abou Samra skribis: > Uh, at the end of module/ice-9/format.scm, there is > > ;; Thanks to Shuji Narazaki > (module-set! the-root-module 'format format) > > which dates back to > > commit 14469b7c69feb0f2c5b8a093f19fe2a548b31c5b > Author: Greg J. Badros > Date:=C2=A0=C2=A0 Thu Jan 20 20:58:30 2000 +0000 [...] > This probably predates #:replace and could be removed now, right? Yes, it could be removed, but probably not before the 4.0 series. The =E2=80=98-Wformat=E2=80=99 warning introduced sometime in the 2.0 or 2.= 2 series prepared for that removal by warning about simple-format/format mismatches, but there=E2=80=99s probably still code out there that assumes =E2=80=98format=E2=80=99 is the full-blown =E2=80=98format=E2=80=99, even w= hen (ice-9 format) is not explicitly imported. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 01 10:14:27 2022 Received: (at 58109) by debbugs.gnu.org; 1 Oct 2022 14:14:28 +0000 Received: from localhost ([127.0.0.1]:45468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oedG7-0006my-HH for submit@debbugs.gnu.org; Sat, 01 Oct 2022 10:14:27 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:34085) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oedG5-0006mk-CU for 58109@debbugs.gnu.org; Sat, 01 Oct 2022 10:14:26 -0400 Received: from [10.188.149.104] ([46.193.67.184]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.184]) with ESMTPSA (Nemesis) id 1MDPuq-1oXWF53zPy-00ARuJ; Sat, 01 Oct 2022 16:14:17 +0200 Message-ID: Date: Sat, 1 Oct 2022 16:14:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: bug#58109: simple-format vs (ice-9 format) bug in 3.0.7? Content-Language: en-US To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= References: <00542b80-4511-f902-1f8d-a8c5d1645bc3@abou-samra.fr> <6396d555-17fe-dc16-970b-f1075e61131a@abou-samra.fr> <87ill3fyrh.fsf@gnu.org> From: Jean Abou Samra In-Reply-To: <87ill3fyrh.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:G8i9XAWEFb75TAAY1UvLOQ6tAB7fnivJXsYRrYFopbfWIH6olD3 N4Y8ncDbVY8CEUrMhR+ZwQejb4QHbo3xk8Lgr/acqFcaGt3/YEJRHrkatFhAkhgCrzpkXYY K7LFNqcxFYfP2WttyFvrmCdcYtX2bXpNP65Qn+JhEAkuJzLSacyplRQjLVN6o4AEWriKCoJ wuzisyB2/utVrtZD7gABg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:TMgxWQC7W7U=:er8XQN9BcoBREa+ND+9jn2 ufsLIhCXwGNi/8ksxtE40yeWUdoCd/6JOXbzP6uQHgj5/aKPbL5OD2obRT3TxR1Fp+Fj3C3uG IHPS4tdbxgPE2ATYXkc/tCeL5GfTsBdJoUh/HLJ05sdPU8pt5+lkbHe2od75xi61LBJuqgyE0 oGm8fq/whPMW1b1e04F19rEGxxBcGadqfLQ1wN92w37EvTcL2SrnSagOywOyDRghMeZgl+eiT zWJTOLxlukBD63+ByRLU+7oomd8VLoZVMSkT87M0IRRn6+h3TEYafREUY9fVw5Xc3p9F5tpAJ Qv9n4i2EOqs2iesw30rhc+wu+EftuODPaB7ObO8j7S5cCwTR8zWuwUNYW6WvzjpHqpRiupTCi YWKKhpyzNKB8cuIOmDWnZ4O89vjfT/nHUeJjqOgiDyqHQFHSEz9M99fjqUMMmNoRdGBSLgW86 BSapyB5rB7sGrEQcUgGiMgzGRQny+gj/4/O5RC0k8F11Ls1mJPQroe8Vj9UhAK+OtomalFlYP 86Er/AwVt9mQTdnMZvcCukRVOsDdah//FjljI6+XXxsWypPLH/iJTI+idrzq4bfclwHCgSmFl z2SdqnpErou9leGQuzHy2+oBlACgvnrHkZlG263RqgJYT2gb/s0wmPAGfnRNmMUmefhWnM6ej xsuY/hZERc/AkfPBKnPvdsnsH6nIk+sslpIlkxwB1GP1jgLXDNCkC0btMdU2FBKYjChvzmrmd XSN0FmrU+zZrRY2VypEelEuYcquNPrsZNXOAkE6jPd6YGUQI08I5iJgwudpOoqfHTjQs0N28G 3e2B3iG X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 58109 Cc: christopher.lck@gmail.com, 58109@debbugs.gnu.org, guile-devel@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) Le 01/10/2022 à 15:40, Ludovic Courtès a écrit : > Hi, > > Jean Abou Samra skribis: > >> Uh, at the end of module/ice-9/format.scm, there is >> >> ;; Thanks to Shuji Narazaki >> (module-set! the-root-module 'format format) >> >> which dates back to >> >> commit 14469b7c69feb0f2c5b8a093f19fe2a548b31c5b >> Author: Greg J. Badros >> Date:   Thu Jan 20 20:58:30 2000 +0000 > [...] > >> This probably predates #:replace and could be removed now, right? > Yes, it could be removed, but probably not before the 4.0 series. > > The ‘-Wformat’ warning introduced sometime in the 2.0 or 2.2 series > prepared for that removal by warning about simple-format/format > mismatches, but there’s probably still code out there that assumes > ‘format’ is the full-blown ‘format’, even when (ice-9 format) is not > explicitly imported. OK, understood. How about adding comments and documentation? diff --git a/doc/ref/misc-modules.texi b/doc/ref/misc-modules.texi index 6c899a905..2c00ed859 100644 --- a/doc/ref/misc-modules.texi +++ b/doc/ref/misc-modules.texi @@ -1122,6 +1122,13 @@ you try to use one of them.  The reason for two versions is that the  full @code{format} is fairly large and requires some time to load.  @code{simple-format} is often adequate too. +Beware that when @code{(ice-9 format)} is loaded, it replaces the +binding for @code{format} on the toplevel.  If your module loads +another module that loads @code{(ice-9 format)}, then your module +will see the @code{format} function from @code{(ice-9 format)}, +even if it does not itself import @code{(ice-9 format)}.  This is +legacy behavior and may be removed in a future Guile version. +  @node File Tree Walk  @section File Tree Walk diff --git a/module/ice-9/format.scm b/module/ice-9/format.scm index ee7cba910..026fd9b54 100644 --- a/module/ice-9/format.scm +++ b/module/ice-9/format.scm @@ -32,6 +32,8 @@  (define-module (ice-9 format)    #:autoload (ice-9 pretty-print) (pretty-print truncated-print)    #:autoload (ice-9 i18n)         (%global-locale number->locale-string) +  ;; Actually replaces the global format as soon as loaded; see the end +  ;; of this file.    #:replace (format))  (define format:version "3.0") @@ -83,7 +85,7 @@    ;; format's user error handler    (define (format-error . args)       ; never returns! -    (with-throw-handler #t +    (with-throw-handler #t        (lambda ()          (let ((port (current-error-port)))            (unless (zero? %arg-pos) @@ -1560,5 +1562,10 @@            (close-port port)            str))))) -;; Thanks to Shuji Narazaki +;; Set the format variable in the root module.  This is legacy and +;; no longer necessary.  It means that as soon as (ice-9 format) is +;; loaded somewhere by some module, the predefined binding for format +;; becomes the extended format function, even in modules where (ice-9 format) +;; isn't imported.  Because of this, removing this line should be done +;; when a backwards compatibility break is allowed.  (module-set! the-root-module 'format format) Best, Jean From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 12 16:50:16 2022 Received: (at 58109-done) by debbugs.gnu.org; 12 Oct 2022 20:50:16 +0000 Received: from localhost ([127.0.0.1]:58531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiigC-000739-3U for submit@debbugs.gnu.org; Wed, 12 Oct 2022 16:50:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiig7-00072p-KY for 58109-done@debbugs.gnu.org; Wed, 12 Oct 2022 16:50:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40896) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiig2-0006fI-6S; Wed, 12 Oct 2022 16:50:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Cn8TVau7eOsLpd3keNdueQzvMGaPgN29rgsuR4PoRAA=; b=SMcFttW0/e3Nz7NwMLtp wg3QSop782cyu315ng++arbaPJj2Bd/a6gjAFPGoTS6ClIDgYOpKpKWb4dY+MQVOMIB1qsStYTNNI +iLIrDLSJVLRMxnUUy1b9cfl5vkkuo6SiIwODvPb7EVgYbKWo+SVBxR3o6KXgorRLBza3f9pJBleO qne0JEfUEgf3vpoNOVmcSGkZ3PfoeoWKgdzjuJpJQZYqvA0ft2nu7WI+D+8pRDJgZrmgpHEL9MaFe VolheTP+KXS57pGsBiQQq8l04+sLJIz2RBrxFiF0/uwDKjY2H8DiAoV7/quTuVoXarL+9Lc3c9snJ ZA8WbhDdKO3Zkw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:58645 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiig1-0004uZ-N5; Wed, 12 Oct 2022 16:50:05 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Jean Abou Samra Subject: Re: bug#58109: simple-format vs (ice-9 format) bug in 3.0.7? References: <00542b80-4511-f902-1f8d-a8c5d1645bc3@abou-samra.fr> <6396d555-17fe-dc16-970b-f1075e61131a@abou-samra.fr> <87ill3fyrh.fsf@gnu.org> Date: Wed, 12 Oct 2022 22:50:03 +0200 In-Reply-To: (Jean Abou Samra's message of "Sat, 1 Oct 2022 16:14:17 +0200") Message-ID: <87y1tku5qc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58109-done Cc: christopher.lck@gmail.com, 58109-done@debbugs.gnu.org, guile-devel@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Jean Abou Samra skribis: > OK, understood. How about adding comments and documentation? That=E2=80=99s a good idea. Applied with minor tweaks and a commit log. Thanks! Ludo=E2=80=99. From unknown Sun Jun 22 04:16:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 10 Nov 2022 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator