Mail Archives: geda-user/2018/05/24/12:22:15
Dmitri:
> On Thu, 24 May 2018 00:47:32 +0200 (CEST)
> karl AT aspodata DOT se wrote:
> > > > margins="0:0:0:0"
> > > Should be semicolon-separated in the configuration
> > > file.
> I was misled by the man page. Looking through source code,
> I found that values for --size, --margins and --align
> command line options are parsed using
> g_strsplit_set ( ":; " ).
> Thus, values can be separated either by colon, semicolon or
> white space. Man page update:
> https://github.com/lepton-eda/lepton-eda/pull/207
Strange, this works
[export]
paper=iso_a4
margins=0;0;0;0
but not this:
[export]
paper=iso_a4
margins=0:0:0:0
But on the command line either of theese works
-m "0 0 0 0"
-m "0:0:0:0"
-m "0:0;0:0"
-m "0:0 0:0"
-m "0;0:0 0"
so that strsplit must be, as you write, for command line arguments only.
My guess is that the lib handling the
https://github.com/lepton-eda/lepton-eda/blob/master/docs/specifications/config-api.txt
api isn't up to par.
What is it that is soo good about this api that you are willing to let
it blow up in the face of the users ?
> > > And it's easier to use 'gaf config --user' to edit that
> > > file.
> >
> > Why is that (I just need proper docs) ?
>
> man lepton-cli
> (Accessing Configuration section)
> https://github.com/lepton-eda/lepton-eda/wiki/Configuration-Settings
> (Overview section; also, Resources)
Yes, I can can understand that it is nice to have an api to handle
configuration and cached data. But thoose two things shouldn't be mixed.
A program should never ever overwrite a config unless instructed by the
user to do so. If the program wants to save something to remember state,
it is best for the program to use another file, else the program risks
beeing terminated by the user, especially if that user is me.
The current mixed config/cache file system is just broken, please don't
go that route.
> > I just experienced that when I closed gschem, my changes
> > were erased.
>
> I think it's not a good idea, in general, to edit
> configuration files while application is running (any
> application), unless you know for sure that it's allowed
> (e.g. it is explicitly stated in application's
> documentation).
A config file is generally read upon program start or at some reload
event, typically sighup. The program should treat the config file as
read-only. In that scenario, I can edit the config file at will.
To treat config files otherwise is a big just-don't-do-that.
> > A config file req. is that I should be able to put it in
> > a svn/git/... repository, share it with friends etc.
> > Entries like: [gschem.dialog-geometry.hotkeys]
> > x=1073
> > y=39
> > width=382
> > height=973
> > are troublesome and shouldn't be in config files.
>
> Agree. I keep my geda-user.conf in git repository and do
> not like that irrelevant 'dialog-geometry' stuff to be
> there. Most likely, this issue will be addressed after
> release 1.9.4 is out.
So, we kind of agree on something.
Do you need help making config files work again ?
> Thank you for testing and feedback, Karl!
Thank you for your polite answers and good luck with lepton.
Regards,
/Karl Hammar
-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57
- Raw text -