From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: How can I tell guile to shut up? ;) Date: Thu, 30 Jun 2011 23:37:22 +0200 Message-ID: <87pqlvyp9p.fsf@gnu.org> References: <99db88be1896528082d33a77ec4cadbe.squirrel@webmail.kapsi.fi> <87y60lsjx5.fsf@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1309469916 20770 80.91.229.12 (30 Jun 2011 21:38:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 30 Jun 2011 21:38:36 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jun 30 23:38:32 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QcOwR-000300-0u for guile-devel@m.gmane.org; Thu, 30 Jun 2011 23:38:31 +0200 Original-Received: from localhost ([::1]:55725 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcOwP-0000Zl-UG for guile-devel@m.gmane.org; Thu, 30 Jun 2011 17:38:30 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcOva-0000Oy-CP for guile-devel@gnu.org; Thu, 30 Jun 2011 17:37:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcOvY-0001lj-3A for guile-devel@gnu.org; Thu, 30 Jun 2011 17:37:38 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:47684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcOvX-0001lQ-P7 for guile-devel@gnu.org; Thu, 30 Jun 2011 17:37:36 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QcOvV-0002fN-II for guile-devel@gnu.org; Thu, 30 Jun 2011 23:37:33 +0200 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Jun 2011 23:37:33 +0200 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Jun 2011 23:37:33 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 49 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 12 Messidor an 219 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.110017 (No Gnus v0.17) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:4mJGO5o3j1FRYVHJyVt+hfdZPak= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12613 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi Andy, Andy Wingo skribis: > After some thinking, the base thing to do is just to add a warning port, > and make warnings (non-fatal informative messages) write to that port. > I have done this in the attached patches. Any objections? Ideally I’d preferred to keep current-warning-port in (system base message), but since it’s needed in boot-9, we may have to make it global. Or would the following work? --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 1ddb0ff..e1582a3 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -3767,6 +3767,7 @@ module '(ice-9 q) '(make-q q-length))}." ;; Set filename to #f to prevent reload. (define-module (guile-user) #:autoload (system base compile) (compile compile-file) + #:autoload (system base message) (%current-warning-port) #:filename #f) ;; Remain in the `(guile)' module at compilation-time so that the --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Besides, it would be great if ‘*current-warning-prefix*’ were handled consistently, too. All this could certainly be factorized in a Scheme/C function that takes care of using the right port and prefix. WDYT? Thanks, Ludo’. --=-=-=--