# [NTG-context] Perhaps missing braces in buff-ini.mkiv?

Hans Hagen pragma at wxs.nl
Tue Sep 6 10:36:00 CEST 2016

On 9/6/2016 9:05 AM, Henri Menke wrote:
> Bump
>
> On 08/09/2016 10:54 AM, Henri Menke wrote:
>> Dear list,
>>
>> it seems as if there are braces missing in the definition of \buff_save around #2.
>>
>> \def\buff_save[#1][#2]%
>>   {...
>>     {\setupcurrentsavebuffer[\c!list={#1},\c!file=#2]}%
>>   ...}
>>
>> I think they are missing, because it makes the following work, even though arguments and key-value arguments shouldn't be mixed up.
>>
>> \startbuffer[hash]
>> foo
>> \stopbuffer
>> \savebuffer[hash][hello.txt,prefix=no]
>> \starttext
>> \stoptext
>>
>> I think you should either make a third argument for a key-value list or just make the second argument the key-value list.  Then users could input \savebuffer[hash][file=hello.txt,prefix=no].

the first argument can be a key/value list in which case the second one
is ignored

\savebuffer[list=hash,file=hello.txt,prefix=no]

Hans

-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------