Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Wed, 17 Sep 2008 16:59:28 +0200 Received: by mail.proteosys.com (8.13.8/8.13.8) with ESMTP id m8HExMce017499 for ; Wed, 17 Sep 2008 16:59:23 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id m8HEqDM8004555 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Sep 2008 16:52:13 +0200 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id m8HE687S010773; Wed, 17 Sep 2008 16:52:11 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 40959 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 17 Sep 2008 16:52:11 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id m8HEqBuu003477 for ; Wed, 17 Sep 2008 16:52:11 +0200 Received: from mailgate5.uea.ac.uk (mailgate5.uea.ac.uk [139.222.130.185]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id m8HEpvOG004098 for ; Wed, 17 Sep 2008 16:52:00 +0200 Received: from [139.222.128.187] (helo=ueams04.uea.ac.uk) by mailgate5.uea.ac.uk with esmtp (Exim 4.50) id 1KfyNo-0000Sx-VR for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 17 Sep 2008 15:51:56 +0100 Received: from [139.222.200.93] by ueams04.uea.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1KfyNo-0006br-UZ for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 17 Sep 2008 15:51:56 +0100 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 References: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <48D1198D.4010604@morningstar2.co.uk> Date: Wed, 17 Sep 2008 15:51:57 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: l3messages To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -2.599 () BAYES_00 X-Scanned-By: MIMEDefang 2.64 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 17 Sep 2008 14:59:28.0798 (UTC) FILETIME=[FBC6CBE0:01C918D5] Status: R X-Status: X-Keywords: X-UID: 5341 Will Robertson wrote: >> - The module prefix \err is not really that helpful, as some of the >> functions are related to information rather than errors: would \msg_ be >> better (at least for the non-error parts)? > > This is a rather sweeping change but I agree. \msg_ is pretty good, I > think. Sorry if I overstated the case. I should add that \msg follows the dtx name, whereas \err isn't related at all. Most of the expl3 modules seem to follow the dtx name to some extent. >> - Saving the error messages to file to save memory is not really relevant >> today, especially as every message needs a tlp in any case. > > AND all my working directories keep being littered with .err files :) Also true (I wondered where the .err file had appeared from, initially). > I highly, highly approve of writing out error messages (and even > warnings) separately. > I think the interface that we currently has suffices for a lower layer, > but like you say we need a better "package author" user interface. > > I'd imagine hypothetical commands like this: (note the first argument of > each) > > ... > \msg_def:Nnnpnn \msg_log: {fontspec/AREA/TAG1} > #1 {Message with arg '#1'}{"Possible Help text"} > > \msg_def:Nnnpnn \msg_info: {fontspec/AREA/TAG2} > #1 {Message with arg '#1'}{"Possible Help text"} > > \msg_def:Nnnpnn \msg_warn: {fontspec/AREA/TAG3} > #1 {Message with arg '#1'}{"Possible Help text"} > > \msg_def:Nnnpnn \msg_err: {fontspec/AREA/TAG4} > #1 {Message with arg '#1'}{"Possible Help text"} > ... > > Used inside the package like this: > > \msg_show:nw {fontspec/AREA/TAG1} {} > \msg_show:nw {fontspec/AREA/TAG2} {} > \msg_show:nw {fontspec/AREA/TAG3} {} > \msg_show:nw {fontspec/AREA/TAG4} {} Nice idea: much clearer all round than either the expl3 or LaTeX2e approaches. > > The next important step is that users would then be able to override the > status of errors. Sick of the warning "fontspec/AREA/TAG3" ? Put this in > your preamble: > > \MessageStatus{fontspec/AREA/TAG3}{log} > > or something like that. Similarly, if you're computing ArcTan{1/0} you > might want > > \MessageStatus{kernel/math/DivideByZero}{ignore} Also a good idea: this is something that it is a pain to have to provide on a per-package basis. > You could also provide generic "verbose" and "quiet" modes to > promote/demote all messages by one level. > > \MessageStatus{warn}{log} > > Or just for particular packages. > > \MessageStatus{fontspec/*/*, warn}{log} > > > (I'm thinking of something like David Kastrup's makematch syntax for > this first argument in all the examples above. Whatever the syntax is, I > think you get the idea.) You could probably miss out the "*", and just have something like: \MessageStatus{info} % info for everything \MessageStatus{fontspec = warn} \MessageStatus{fontspec/AREA = err} \MessageStatus{/kernel/math/DivideByZero = ignore} based on a "keys" approach (for example, I think that my suggested l3keys could probably manage this, or something similar but dedicated). Of course, this still relies on people creating the messages in the correct way, but your proposed system for that should be okay. -- Joseph Wright