From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/48258 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: die if a module is missing Date: Thu, 12 Mar 2009 11:38:35 -0400 (EDT) Message-ID: References: <87mybqesxv.fsf@cordelia.devereux.me.uk> <87iqmeepil.fsf@cordelia.devereux.me.uk> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1236872749 21815 80.91.229.12 (12 Mar 2009 15:45:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Mar 2009 15:45:49 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Mar 12 16:47:02 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1Lhn2C-0008VE-R6 for gctc-ntg-context-518@m.gmane.org; Thu, 12 Mar 2009 16:41:24 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8035F1FB77; Thu, 12 Mar 2009 16:39:56 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16569-04; Thu, 12 Mar 2009 16:39:24 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 632801FB29; Thu, 12 Mar 2009 16:39:24 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EC74E1FB29 for ; Thu, 12 Mar 2009 16:39:22 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 22552-02-3 for ; Thu, 12 Mar 2009 16:39:15 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by ronja.ntg.nl (Postfix) with ESMTP id A1C7B1FA4C for ; Thu, 12 Mar 2009 16:39:15 +0100 (CET) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.93.161]) by filter3-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n2CFdD6C022940 for ; Thu, 12 Mar 2009 16:39:14 +0100 Original-Received: FROM [192.168.2.8] (c-71-234-195-113.hsd1.ct.comcast.net [71.234.195.113]) BY tombraider.mr.itd.umich.edu ID 49B92C9F.89CEA.13209 ; 12 Mar 2009 11:39:11 -0400 In-Reply-To: <87iqmeepil.fsf@cordelia.devereux.me.uk> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.93.161; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 192673435 - af3c67f954a1 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:48258 Archived-At: On Thu, 12 Mar 2009, John Devereux wrote: > Wolfgang Schuster writes: > >> Am 12.03.2009 um 15:06 schrieb John Devereux: >> >>> Michael Bynum writes: >>> >>>> This has burned me too. It would be nice if the errors were more >>>> prominent, perhaps repeated at the end of the output? >>>> Mike >>> >>> While we are on the subject, is it possible to make it "die" when >>> incorrect (non-existent) options are passed to a context command? Is >>> there any way at all of knowing if the option did anything (even by >>> examining the log?) >> >> No, this is not possible and even such a feature would increase >> the compile time a lot, e.g. I used list with valid names in a earlier >> version of my letter module and it was 30% slower than the current >> version and now imagine what happens if you check each key in a >> assignment list. > > OK. It seems strange (coming from a programming background). TeX is no ordinary language. Currently, all keys that you pass are simply stored as macros. When a particular option is needed, ConTeXt checks the value of the corresponding macro, and decides what to do. If you want to check the keys, you need that while storing the options as macros. This means an extra check for each value for each ConTeXt command. Since ConTeXt uses an extensive key-value configuration system, this means a lot of extra time. The same argument holds for stripping white spaces from key-value pairs. You can use \setupsomething[key=value] but not \setupsomething[ key = value ]. For module and environments, this problem can be solved by using \unprotect ... \setupsomething[\c!key=\v!value] ... \protect > If it is only the compile time, then a command line switch might be an > option. (But it sounds like it is inherently hard to do, now). Perhaps with luatex there may be an easier solution. But that would mean rewriting how options are handled internally --- a big and error-prone task. Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________