delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2018/05/24/14:49:37

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20161025;
h=date:from:to:subject:message-id:mail-followup-to:references
:mime-version:content-disposition:content-transfer-encoding
:in-reply-to:user-agent;
bh=U4q0B/SBSa4eCVXWAFQfs4uVfX+LL5mYrIUG+TFSbZY=;
b=IgZRRiEU8GPcGWfNPFC+puHCLQylyMKthsm2pw1cjmX3goooADbwYXataL2WSBJJuk
/wl/3u2T1daqrDLlZuUdVD8gLg7SV2VEyZsnYcvWqUqVJssYLGps8WO/wv6wYgkrkAIY
ACSl7KnucSDzYUft7EDZBT0uAXRGLmwEmO+pxqaTp1B1zfOaabA0Hji/AstqTCYXysvv
HU+3LLZCZXWURg8IlaAOMDbOKtL1azfiFqnRzjKvXwGD+R6sLGn6FG1zk+pxmYA7SPsZ
vsUxoO2L3nMQoHvCgS03FTjPlulVpFdUW5IlRX753Gug/IH/4U/iCmZdLq3jvIPqXsU4
zE5A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to
:references:mime-version:content-disposition
:content-transfer-encoding:in-reply-to:user-agent;
bh=U4q0B/SBSa4eCVXWAFQfs4uVfX+LL5mYrIUG+TFSbZY=;
b=jA+av1rTZV92JKiJQgTdRqWO+gba3ZQJNW2EgnKN+WNljcLBC5I0S/QKm4c1YHj72f
wRIlIeduUsDCO7a8T9Hzuzv82DG0xXn1FPpDJ8jvoVISJ8dU2U5OFlbgi8d7wPVbPx6Q
27mI3WVodMwE79E4FHIm5cFkYNBRtYq1HrutsxicyfivxkLFsbwyZIxZ1uEr77dpsQHM
P/CK7N5nJY2dbqBlrFEwmtIByyZGn0VIjQmYXwYCRaN9A9lKKqfdVroQW7y4d11ScnzH
MJzPIMr3/pGg9GiZNZ0bLse6L8L1irhcCIwXp+qMUlwWemsild0vfENMxKi4kekJiXW5
+zqg==
X-Gm-Message-State: ALKqPwfxRTetl33zf5xgiKSkMJwK5FZR/YNwn0wsIPNjC2/6vrsqp2Vk
c0pX9ydlqa+DjusvBW8OEbonWw==
X-Google-Smtp-Source: AB8JxZo2oeZZil65fpNENli5vGXOZgYH+O/KnX1Yq7JHzKqDDy9WrkO+sAdEy+dijtuOs8peE6qnWg==
X-Received: by 2002:a19:9e12:: with SMTP id h18-v6mr5064752lfe.101.1527187626540;
Thu, 24 May 2018 11:47:06 -0700 (PDT)
Date: Thu, 24 May 2018 21:47:03 +0300
From: "Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] Re: New config
Message-ID: <20180524184702.75hvlkrnj2g7fvct@localhost.localdomain>
Mail-Followup-To: geda-user AT delorie DOT com
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>
<20180524161933 DOT 98C7C80F49E4 AT turkos DOT aspodata DOT se>
MIME-Version: 1.0
In-Reply-To: <20180524161933.98C7C80F49E4@turkos.aspodata.se>
User-Agent: NeoMutt/20170113 (1.7.2)
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

On Thu, May 24, 2018 at 06:19:33PM +0200, karl AT aspodata DOT se wrote:
> 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 ?

Not sure that I wholly understand your question, though I'll try
to answer.

The reason for introducing this API were several requests from
some users who wanted "simple configuration" for the tools in
geda-gaf. Then one of the admins of the project decided which
format to use and nobody objected to.  (JFYI, the format is
similar to INI-files used in M$-Windows).

The reason for introducing several various separators used on
command line is that different users use different environments
(different shells, languages, etc.), which led to different
requirements. There was a discussion on launchpad about this, and
I participated in it, and we found a consensus on it (as we
thought) because the initial version had only one separator, IIRC.

I don't think the api is the best thing we could ever get, though
nobody suggested (read, implemented for our suite) something
better yet ;-)

> 
> > > > 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.

Agreed.

> 
> > > 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.

Yes, agreed.

> 
> > > 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.

We fully agree here, I believe. We need more feedback, especially
assisted with some new better code ;-)

The idea is to use XDG specs, though we should split up things
related to window system and our tools things. And XDG just has
some handles for this.

> Do you need help making config files work again ?

Always yes.

> 
> > 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
> 
> 

-- 
  Vladimir

- Raw text -


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