Comment 4 for bug 1086522

Revision history for this message
Peter TB Brett (peter-b) wrote :

> As for -s and -m option arguments (as well as -a), I'd prefer
> using commas between values since they actually form a list. They
> are not so much tied together as the --scale option arguments
> (which I'll try to make clear below).

Unfortunately, using a comma as a separator just won't work. As you mentioned below:

> comma substitutes for decimal point in my locale

In such a locale, "--margins=0,3cm,0,4mm" cannot be parsed consistently if a comma is permitted as a field separator for --margins, because it could either mean --margins="0 3cm 0 4mm" or --margins="0,3cm 0,4mm". So I'm sorry, but we cannot use ',' as a field separator for --size or --margins. Using ';' is also problematic, because if it's not quoted then /bin/sh interprets it as end-of-command. So I think that using ':' is probably the best option... :-/ WDYT?

> [snip]

Okay, I understand better now! Really, gschem units could be considered arbitrary -- they don't strictly need to be interpreted as 0.001 in, it's just a "legacy" interpretation. How about this: have "--scale=FACTOR", where FACTOR is the real-world distance that one gschem unit corresponds to. (And then "--size=auto" is equivalent to "--scale=0.001in"). Is that what your proposed "another way" was? I think it might be easier to understand/explain.

In the long run, I would like gschem's "Write image..." function to call out to gaf export. But that depends on bug 1085990.

Thanks again for working on this!