From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sjoerd van Leent Newsgroups: gmane.lisp.guile.devel Subject: Re: Discussion for %display-auto-compilation-messages (and --no-auto-compilation-messages option) Date: Mon, 03 Mar 2014 16:17:46 +0100 Message-ID: <53149D1A.6090603@gmail.com> References: <53125A46.3010407@gmail.com> <87a9d8tib7.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1393859644 14979 80.91.229.3 (3 Mar 2014 15:14:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Mar 2014 15:14:04 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Mar 03 16:14:13 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WKUZI-0002Aw-Ip for guile-devel@m.gmane.org; Mon, 03 Mar 2014 16:14:12 +0100 Original-Received: from localhost ([::1]:40158 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKUZI-0003SO-4R for guile-devel@m.gmane.org; Mon, 03 Mar 2014 10:14:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKUZ8-0003Ru-7y for guile-devel@gnu.org; Mon, 03 Mar 2014 10:14:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKUYz-0000cY-RK for guile-devel@gnu.org; Mon, 03 Mar 2014 10:14:02 -0500 Original-Received: from mail-ee0-x232.google.com ([2a00:1450:4013:c00::232]:41612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKUYz-0000bm-KA for guile-devel@gnu.org; Mon, 03 Mar 2014 10:13:53 -0500 Original-Received: by mail-ee0-f50.google.com with SMTP id c13so2149990eek.37 for ; Mon, 03 Mar 2014 07:13:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=L9aUF0BV+wEbTK+gpxUmXZ37sNESj/SuwsD8LQNxDns=; b=sKcohgoprORgXncqPLjY48/F9lo3QfGIeJVzFnq4iy4elnNfLRlSFSXanyJByAzZkf pMbj43PHQyAR8Z8KmwC+qXTvCKLKmLFbTkzjKrmVlH29HKfVpAsElJ6N1GZENf9Rm70U +dZgTpfNShBJWhts7K3awc5fFT9+XXKFXFj54CPJUzPJarLw+YvOVAZG60S7uBvrPs3B u9+ydGRnG4T1X2Q8H1lhE7B7rmpiOdUO7bSkSiL17YDp1trkuA+FKH3fdxdx02F+U5Ru kPm1VXXlog5GAks4SNklvDv4jVrT8rPZbqUTRq768JbNPaMh2pFC/zGwVYqyurkU5ItE zCGQ== X-Received: by 10.204.195.80 with SMTP id eb16mr60564bkb.119.1393859632831; Mon, 03 Mar 2014 07:13:52 -0800 (PST) Original-Received: from [172.16.3.33] (5ED2F942.cm-7-3d.dynamic.ziggo.nl. [94.210.249.66]) by mx.google.com with ESMTPSA id bh9sm10240008bkb.16.2014.03.03.07.13.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Mar 2014 07:13:52 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.3.0 In-Reply-To: <87a9d8tib7.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::232 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:16944 Archived-At: I see where you are going and personally, I like the suggestion. In any case, couldn't there be an approach similar to those used with most logging frameworks. In GLib, there are the following options: G_LOG_LEVEL_ERROR G_LOG_LEVEL_CRITICAL G_LOG_LEVEL_WARNING G_LOG_LEVEL_MESSAGE G_LOG_LEVEL_INFO G_LOG_LEVEL_DEBUG I have no clue yet which ports exist, aside from (current-output-port), (current-warning-port) and (current-error-port). I imagine to create 5 virtual ports: (current-debug-port), (current-info-port), (current-message-port), (current-warning-port) and (current-critical-port). These would either be hooked up to the (current-output-port), except for (current-critical-port) which should be hooked up to (current-error-port). The normal guile operation would be to have warning, critical and error messages to be fired. Guile should then get two additional options: --verbosity=, where level should be "debug", "info", "message", "warning", "critical" and "error". --quiet, which suggests to skipp verbosity altogether and to display nothing anymore aside from writes to (current-output-port). Guile should by default function in the "info" verbosity mode. If verbosity is a nice fluid, one could change the verbosity level when deemed necessary. And I would be happy to work this out. On 03/02/14 22:13, Ludovic Courtès wrote: > Hi, > > Sjoerd van Leent skribis: > >> - scm_puts_unlocked (";;; compiling ", scm_current_error_port ()); >> - scm_display (source, scm_current_error_port ()); >> - scm_newline (scm_current_error_port ()); >> + if (scm_is_true (*scm_loc_display_auto_compilation_messages)) >> + { >> + scm_puts_unlocked (";;; compiling ", scm_current_error_port ()); >> + scm_display (source, scm_current_error_port ()); >> + scm_newline (scm_current_error_port ()); >> + } > FWIW, I think the approach should rather be to have a special port (a > fluid) for such things, say, ‘current-notification-port’. We’d simply > replace scm_current_error_port by scm_current_notication_port above. > > The command-line option could be --quiet. It would bind both > current-notification-port and current-warning-port to a void port. > > WDYT? Would you like to adjust the patch accordingly? > > Thanks, > Ludo’. > >