* Perhaps missing braces in buff-ini.mkiv?
@ 2016-08-09 8:54 Henri Menke
2016-09-06 7:05 ` Henri Menke
0 siblings, 1 reply; 5+ messages in thread
From: Henri Menke @ 2016-08-09 8:54 UTC (permalink / raw)
To: mailing list for ConTeXt users
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].
Cheers, Henri
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Perhaps missing braces in buff-ini.mkiv?
2016-08-09 8:54 Perhaps missing braces in buff-ini.mkiv? Henri Menke
@ 2016-09-06 7:05 ` Henri Menke
2016-09-06 8:36 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Henri Menke @ 2016-09-06 7:05 UTC (permalink / raw)
To: mailing list for ConTeXt users
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].
>
> Cheers, Henri
>
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Perhaps missing braces in buff-ini.mkiv?
2016-09-06 7:05 ` Henri Menke
@ 2016-09-06 8:36 ` Hans Hagen
2016-09-06 18:45 ` Henri Menke
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2016-09-06 8:36 UTC (permalink / raw)
To: ntg-context
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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Perhaps missing braces in buff-ini.mkiv?
2016-09-06 8:36 ` Hans Hagen
@ 2016-09-06 18:45 ` Henri Menke
2016-09-06 20:03 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Henri Menke @ 2016-09-06 18:45 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 09/06/2016 10:36 AM, Hans Hagen wrote:
> 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]
I'd still recommend adding braces around this #2. Imagine a user does this
\savebuffer[hash][my,file,name,with,commas.txt]
Cheers, Henri
>
> 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
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Perhaps missing braces in buff-ini.mkiv?
2016-09-06 18:45 ` Henri Menke
@ 2016-09-06 20:03 ` Hans Hagen
0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2016-09-06 20:03 UTC (permalink / raw)
To: ntg-context
On 9/6/2016 8:45 PM, Henri Menke wrote:
> On 09/06/2016 10:36 AM, Hans Hagen wrote:
>> 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]
>
> I'd still recommend adding braces around this #2. Imagine a user does this
>
> \savebuffer[hash][my,file,name,with,commas.txt]
such behaviour is true for all kind of things, normally a user will then
add the { }
also, using commas in filenames is not that clever
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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-09-06 20:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-09 8:54 Perhaps missing braces in buff-ini.mkiv? Henri Menke
2016-09-06 7:05 ` Henri Menke
2016-09-06 8:36 ` Hans Hagen
2016-09-06 18:45 ` Henri Menke
2016-09-06 20:03 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).