From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81257 Path: news.gmane.org!not-for-mail From: Jonathan Barchi Newsgroups: gmane.comp.tex.context Subject: Re: etexshow and generation of cont-en.xlm (cont-XX.xml)? Date: Wed, 20 Mar 2013 12:22:55 -0400 Message-ID: References: <5147A05B.7000406@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1363796602 3463 80.91.229.3 (20 Mar 2013 16:23:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Mar 2013 16:23:22 +0000 (UTC) Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Wed Mar 20 17:23:47 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UILnl-0000sG-Uv for gctc-ntg-context-518@m.gmane.org; Wed, 20 Mar 2013 17:23:46 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6C8D0101EF; Wed, 20 Mar 2013 17:23:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Dex+augC05Uo; Wed, 20 Mar 2013 17:23:20 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 9FCAC101EA; Wed, 20 Mar 2013 17:23:20 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 78216101EA for ; Wed, 20 Mar 2013 17:23:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Yvo6z2VOpwvz for ; Wed, 20 Mar 2013 17:23:18 +0100 (CET) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 47B91101E3 for ; Wed, 20 Mar 2013 17:23:18 +0100 (CET) Original-Received: from mail-ob0-x233.google.com (mail-ob0-x233.google.com [IPv6:2607:f8b0:4003:c01::233]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r2KGNGa4026807 for ; Wed, 20 Mar 2013 17:23:17 +0100 Original-Received: by mail-ob0-f179.google.com with SMTP id un3so1827780obb.10 for ; Wed, 20 Mar 2013 09:23:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=NIoRVbE7bqJPa+E810byLED54ID31a7R1SNMtMzlCNU=; b=FmWXrJDIDorQNbJORdQpPGdFNs/phd3nRhMOjl3nE8HZRAju6JEz7PtgKGB0d0hl05 R4NGp0v9Le53s8GbFDMmDLr/yscenxsJzYCusk0CdyldPwzHDcibhyqujNmSksIhtpqx 4fSIhTrMe+BvgyI6UQl5rzcw3PFX7TWTZxbhXHVDbgZaUNcOngft0NSU9MNAxxr5PitD M2VoruQtrTCQqBL1BWjKpCcOZ13lPUfYSUAXSDtcsbHKsGEdPc5FMcvUTAiKtgfoQtnp JkRfzMvlPAd4AWZ5L1RRxB9R02HlRBqAsRWl811Q6qSwFAdoHnclcPgM/xHreZXUhN/7 +1yg== X-Received: by 10.60.13.162 with SMTP id i2mr4537474oec.121.1363796595731; Wed, 20 Mar 2013 09:23:15 -0700 (PDT) Original-Received: by 10.60.144.226 with HTTP; Wed, 20 Mar 2013 09:22:55 -0700 (PDT) In-Reply-To: <5147A05B.7000406@wxs.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2607:f8b0:4003:c01::233; country=US X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07JdQngzv - 965ff1eb039c - 20130320 X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:81257 Archived-At: On Mon, Mar 18, 2013 at 7:16 PM, Hans Hagen wrote: > On 3/18/2013 11:35 PM, Jonathan Barchi wrote: >> >> Hi all, >> >> I'm using the emacs package etexshow to provide a quick ConTeXt >> command reference in EMACS. This utility parses the interface file >> cont-en.xml (for english, in my case) and uses the contents to provide >> a basic dictionary of available commands. >> >> In the documentation for etexshow, there is a reference to being able >> to generate a complete interface description (the aforementioned xml >> file) like so: >> >> ";; There is still an xml-file shipped with this code. Usually you would >> ;; generate the xml-file with 'texexec'ing the file setupe.tex. Then you >> ;; will get the cont-en.xml file that can (could) be used as an input for >> ;; this etexshow. But for now, this won't work. It will work rsn." >> >> It is not clear whether that file (setupe.tex or setup.tex) is/was >> supposed to be shipped with etexshow or was supposed to be a part of >> context. I've searched and found a few references to this problem, but >> never a definitive answer, so if anyone knows the answer to these >> questions I would love to know!! >> >> 1. Is the referenced setup(e).tex a file that was previously shipped >> with ConTeXt - presumably mkii since the author refers to texexec - or >> would this be something the author would have included with etexshow >> itself? >> >> 2. Is the interface file, e.g. cont-en.xml, auto-generated from all of >> the defined macros in ConTeXt, or is that file hand-written as >> metadata to accompany the source-code definitions? > > > the xml file is the master file (but I admit that it's a bit behind) > > if you only need the commands then the mult-def.lua files are better, also > because they contain low level commands and primitives (it's what I use to > generate files for scite where we have a rather advanced lexer) I'll take a look at those files, thanks! Is that scite code free software? I'd love to take a look at how you generate the files for it, and/or how its lexer is implemented. >> 3. Since self-documentation is a goal of the project, is it possible >> to generate something akin to the interface file that presents a >> snapshot of all commands known to context at a given time, for use in >> things like etexshow or other tools? If so, is it possible to do this >> with modules loaded to see what they additionally define? > > > we can add a --emacs to mtx-interfaces.lua if something other than xml is > needed .. so, what does emacs need? I'm still figuring this part out. Emacs is quite modular, so I'm not sure what the best approach is yet. AUCTEX implements syntax highlighting internally, in a sub-package called font-latex (that does work reasonably well for ConTeXt too), but there is also more sophisticated support for LaTeX that doesn't cross over to context. There are more general solutions for lexing, like semantic, which might be the better way to go. Semantic has an internal port of bison that can use BNF grammar descriptions, but some reading suggests that this can't be done for *TeX. It can also be fed tags by a regexp parser or an external utility like ctags. I'm quite new to all this, so if anyone out on the mailing list with more experience wants to jump in with advice or corrections I'm all ears! I'm also working on my dissertation, so time is limited (at least for the next couple months). - Jon >> Thanks in advance for any help! I'm hoping to use any information I >> get to update etexshow, if possible, and maybe update the ConTeXt >> support in AUCTEX as well. I think it would be really cool if AUCTEX >> could reach out at compile or run time and pull in macro definitions >> from the installed environment, for example. > > > Hans > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > ----------------------------------------------------------------- ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________