delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2018/05/24/12:22:15

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6
X-Exmh-Isig-CompType: repl
X-Exmh-Isig-Folder: inbox
From: karl AT aspodata DOT se
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] Re: New config
In-reply-to: <20180524161257.7a97d82f@demon>
References: <20180523005748 DOT 793A180F49D7 AT turkos DOT aspodata DOT se> <20180523143620 DOT 1ad55aab AT demon> <20180523150428 DOT 6A70C80F49D9 AT turkos DOT aspodata DOT se> <20180523203925 DOT 072b918c AT demon> <20180523224732 DOT 9489580F49E2 AT turkos DOT aspodata DOT se> <20180524161257 DOT 7a97d82f AT demon>
Comments: In-reply-to "(graahnul DOT grom AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
message dated "Thu, 24 May 2018 16:12:57 +0300."
Mime-Version: 1.0
Message-Id: <20180524161933.98C7C80F49E4@turkos.aspodata.se>
Date: Thu, 24 May 2018 18:19:33 +0200 (CEST)
X-Virus-Scanned: ClamAV using ClamSMTP
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019