From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/41288 Path: news.gmane.org!not-for-mail From: "Wolfgang Schuster" Newsgroups: gmane.comp.tex.context Subject: Re: Buffers and commands with optional arguments Date: Sat, 31 May 2008 12:51:51 +0200 Message-ID: <115224fb0805310351h63e4e952r31812cd1c9ddfc80@mail.gmail.com> References: <115224fb0805310309w5b33be83h1e9b915c96cba174@mail.gmail.com> <48412967.1020500@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1212231315 30938 80.91.229.12 (31 May 2008 10:55:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 May 2008 10:55:15 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Sat May 31 12:55:56 2008 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 1K2Okd-0007e0-KN for gctc-ntg-context-518@m.gmane.org; Sat, 31 May 2008 12:55:55 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0066E1FC98; Sat, 31 May 2008 12:55:07 +0200 (CEST) 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 24889-04-7; Sat, 31 May 2008 12:54:32 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4C49F1FC11; Sat, 31 May 2008 12:53:56 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7879B1FBA8 for ; Sat, 31 May 2008 12:53:54 +0200 (CEST) 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 24889-04-5 for ; Sat, 31 May 2008 12:53:20 +0200 (CEST) Original-Received: from yw-out-1718.google.com (yw-out-1718.google.com [74.125.46.154]) by ronja.ntg.nl (Postfix) with ESMTP id B23021FCB0 for ; Sat, 31 May 2008 12:51:52 +0200 (CEST) Original-Received: by yw-out-1718.google.com with SMTP id 5so199027ywm.74 for ; Sat, 31 May 2008 03:51:51 -0700 (PDT) Original-Received: by 10.150.191.10 with SMTP id o10mr8308194ybf.56.1212231111411; Sat, 31 May 2008 03:51:51 -0700 (PDT) Original-Received: by 10.150.96.3 with HTTP; Sat, 31 May 2008 03:51:51 -0700 (PDT) In-Reply-To: <48412967.1020500@wxs.nl> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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:41288 Archived-At: Hi Hans, On Sat, May 31, 2008 at 12:33 PM, Hans Hagen wrote: > Wolfgang Schuster wrote: > >> \doifsomething{#1} >> {\tmpblockstartedtrue >> %\immediate\write\tmpblocks{\string#1}}% >> \immediate\write\tmpblocks{#1}}% > > i have no problem with the \long but changing the \string ... it's there > for a reason so i need to look into it I removed it because the output from \startletter text \stopletter was written as "\partext" to the temp file and I got "\par text" after I removed the \string. >> \convertargument#1\to\ascii >> %\doifsomething{#1} >> \doifsomething\ascii >> {\tmpblockstartedtrue >> %\immediate\write\tmpblocks{\string#1}}% >> %\immediate\write\tmpblocks{#1}}% >> \immediate\write\tmpblocks{\ascii}}% > > this may introduce spaces after \cs and therefore renders buffers > useless for verbatim usage This hack is not so importand because a empty line before the \dorecurse did help. >> because I won't force users of my letter module to put a \relax >> after \startletter only because they use MkII. > > did you try > > \definebuffer[letter] Seems to be work in my example, I will try it later with my module but it looks good for the moment. Thanks Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________