delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2019/09/02/11:46:39

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=majenko.co.uk; s=key1;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=VqAIDcY60hLlWZCAPAWA9eFQ+qAAidznRaugeno8q0U=;
b=EhcqUSfyCnIC12rhzt7UWuT0PjDRacNwUs29dJ3bT0rT3K0HipmvyWJFrIhXD65Kl4
xQI+977Jf+ECK5K3s5XFeeaMgoSoElj5kHqOJUQnz00Be+mCIdpAZE5oAJHzQN09NTpx
OjqGFeUGicijOUscDw6Dk1Uz7iGqPGluOMtJn4ckf47yOMZT1LdoKB+cLuoeU8AdJcjM
tORbKB/kEHd8QhcE3tA8SfLdQvW6C4xbMHK64UuUh5+BlKUrVDBIF3qzM19j97VMFsvv
8mD2L9wFSc2WiX4bHoZ6et51PoSmprK9QWjHaITQB8dSRNumJUtsoYrGoz0myb1UiDgR
cLoQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=VqAIDcY60hLlWZCAPAWA9eFQ+qAAidznRaugeno8q0U=;
b=AW80ByLchjWbUlzwHqY7AfJeNG94RTEOh1I+9LJ974t91q+LsPQCt/QgQ4XDD9YuuB
FygW0Yx7lKh66D56XtLqkmncpsBbte+Kb6z5wQOqMBvr60axrjdibRpehTIU2JXd1sRq
04BLYzSZGrlE8jfzgPMMWKO3QKLice/u27fk+3JrwKC6WcuFWT+pcQ4CD7kq9U+lTepa
N2sxqF7y4IZRc1Kkw/FnHWY8AdjtkHGrWdc6dXMtfsXEe5zlURfxU2i753izYdZUeDzk
8KRbMW1TZH6hQURoFnkdX//sh/KmLXxkxymlU19itzxX4S+7/M3hw8hjTiGn7+A/SfN/
7fUw==
X-Gm-Message-State: APjAAAX+HUuVopcsZ30MZXq99WMclKL7FQe0+oHctcPRwuOZm5237+6T
ecfRFC1P1U0mwFFOjTRtESGLyzzk1yPR41dKqggn/kaC
X-Google-Smtp-Source: APXvYqw5zuJiAg20kj1BN94DmYUZVmt+zUPRDPMQmrJjnd/b4b/nQQWUN/ZkgLirj9cTKNeiYC5wcSv7V5yQKfTzmYE=
X-Received: by 2002:a19:cb46:: with SMTP id b67mr17687018lfg.154.1567437917798;
Mon, 02 Sep 2019 08:25:17 -0700 (PDT)
MIME-Version: 1.0
References: <CAPp8_DqaZpOpdKFrUF7HC9sbCG2ag0a2iuWQrSkOY76U1kRQ6g AT mail DOT gmail DOT com>
<alpine DOT DEB DOT 2 DOT 20 DOT 1909021356320 DOT 1863 AT nimbus> <CAPp8_DpMmfLQ1MzYkSyXCQ6KiGxf1+TBLz12s0ztRL7qK4sCCw AT mail DOT gmail DOT com>
<alpine DOT DEB DOT 2 DOT 20 DOT 1909021622220 DOT 1424 AT nimbus> <CAPp8_DrAkq+GZr7aXzNBu4+Cvep7K1m81aob5-12JSTOL2BPZA AT mail DOT gmail DOT com>
In-Reply-To: <CAPp8_DrAkq+GZr7aXzNBu4+Cvep7K1m81aob5-12JSTOL2BPZA@mail.gmail.com>
From: "Majenko Technologies (matt AT majenko DOT co DOT uk) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
Date: Mon, 2 Sep 2019 16:25:07 +0100
Message-ID: <CAPp8_DrwsHmjL0OvLzk0qJCrc1+83HeER+19251b4f16bgR-Yg@mail.gmail.com>
Subject: Re: [geda-user] gschem interaction from external processes
To: geda-user AT delorie DOT com
Reply-To: geda-user AT delorie DOT com

--0000000000004c5b2005919394ad
Content-Type: text/plain; charset="UTF-8"

A better scenario would be (since I know the names of the schematic files
already) if I could tell gchem to save and revert just certain files (if
they happen to be open).  That way it wouldn't touch any extra things you
may have open.

On Mon, Sep 2, 2019 at 4:23 PM Majenko Technologies <matt AT majenko DOT co DOT uk>
wrote:

> I often work with schematics that cover multiple pages. I then use
> "refdes_renum --pgskip ..." to number all the components with a page prefix
> (R101, R102, R201, R202, etc). Once that renumbering has been done any
> pages from the design that are open (which would normally be all of them
> with my program) need reverting so they pick up the new refdes numbers.
>
> The sequence is:
>
> 1. "Save all" on gschem
> 2. "Save" on PCB
> 3. refdes_renum
> 4. gsch2pcb
> 5. "Revert all" on gschem
> 6 "Revert" on PCB
>
> And all of that is tied to one "Update PCB from schematics" button on a
> toolbar.
>
> On Mon, Sep 2, 2019 at 4:16 PM Roland Lutz <rlutz AT hedmen DOT org> wrote:
>
>> On Mon, 2 Sep 2019, Majenko Technologies (matt AT majenko DOT co DOT uk) [via
>> geda-user AT delorie DOT com] wrote:
>> > For saving I simply iterate over any open windows (not sure if that's
>> > really needed?)
>>
>> It is.
>>
>> > and then call gschem_action_activate (action_file_save_all, item); on
>> > that window.
>>
>> That's in principle the right thing to do.  The problem is that "Save
>> all"
>> doesn't do the right thing--saving each modified page, asking for a
>> filename if necessary--but calls s_page_save_all which doesn't do any
>> user
>> interaction.
>>
>> That's where the spurious "untitled_1.sch" files come from.  To be more
>> precise, it's a combination of three kinds of undesireable behavior:
>>
>> - If gschem has been invoked without specifying file names on the command
>> line, or all pages have been closed at some point (including reverting a
>> single open page, as you pointed out), an untitled page is created.  This
>> page is still present in the background after other files have been
>> opened.
>>
>> - "Save all" doesn't care if a page has been changed; it simply saved all
>> pages to their internally assigned filename.
>>
>> - For unsaved buffers, "Save all" doesn't ask for a filename like "Save"
>> does but simply uses the auto-generated "untitled_1.sch" filename.
>>
>>
>> > [Reverting is] made even more complex by the fact that you can't modify
>> > the GList of pages whilst iterating that GList of pages - so I just
>> dump
>> > the page pointers into a temporary array first and work from that
>> > instead. It seems to work.
>>
>> In what kind of situation would you use a "Revert all" action?
>>
>
>
> --
> *Matt Jenkins*
> Majenko Technologies
>
>

-- 
*Matt Jenkins*
Majenko Technologies

--0000000000004c5b2005919394ad
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">A better scenario would be (since I know the names of the =
schematic files already) if I could tell gchem to save and revert just cert=
ain files (if they happen to be open).=C2=A0 That way it wouldn&#39;t touch=
 any extra things you may have open.</div><br><div class=3D"gmail_quote"><d=
iv dir=3D"ltr" class=3D"gmail_attr">On Mon, Sep 2, 2019 at 4:23 PM Majenko =
Technologies &lt;<a href=3D"mailto:matt AT majenko DOT co DOT uk">matt AT majenko DOT co DOT uk</=
a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0p=
x 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><d=
iv dir=3D"ltr">I often work with schematics that cover multiple pages. I th=
en use &quot;refdes_renum --pgskip ...&quot; to number all the components w=
ith a page prefix (R101, R102, R201, R202, etc). Once that renumbering has =
been done any pages from the design that are open (which would normally be =
all of them with my program) need reverting so they pick up the new refdes =
numbers.=C2=A0<div><br></div><div>The sequence is:</div><div><br></div><div=
>1. &quot;Save all&quot; on gschem</div><div>2. &quot;Save&quot; on PCB</di=
v><div>3. refdes_renum</div><div>4. gsch2pcb</div><div>5. &quot;Revert all&=
quot; on gschem</div><div>6 &quot;Revert&quot; on PCB</div><div><br></div><=
div>And all of that is tied to one &quot;Update PCB from schematics&quot; b=
utton on a toolbar.</div></div><br><div class=3D"gmail_quote"><div dir=3D"l=
tr" class=3D"gmail_attr">On Mon, Sep 2, 2019 at 4:16 PM Roland Lutz &lt;<a =
href=3D"mailto:rlutz AT hedmen DOT org" target=3D"_blank">rlutz AT hedmen DOT org</a>&gt;=
 wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px =
0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, =
2 Sep 2019, Majenko Technologies (<a href=3D"mailto:matt AT majenko DOT co DOT uk" tar=
get=3D"_blank">matt AT majenko DOT co DOT uk</a>) [via <br>
<a href=3D"mailto:geda-user AT delorie DOT com" target=3D"_blank">geda-user AT delori=
e.com</a>] wrote:<br>
&gt; For saving I simply iterate over any open windows (not sure if that&#3=
9;s <br>
&gt; really needed?)<br>
<br>
It is.<br>
<br>
&gt; and then call=C2=A0gschem_action_activate (action_file_save_all, item)=
; on <br>
&gt; that window.<br>
<br>
That&#39;s in principle the right thing to do.=C2=A0 The problem is that &q=
uot;Save all&quot; <br>
doesn&#39;t do the right thing--saving each modified page, asking for a <br=
>
filename if necessary--but calls s_page_save_all which doesn&#39;t do any u=
ser <br>
interaction.<br>
<br>
That&#39;s where the spurious &quot;untitled_1.sch&quot; files come from.=
=C2=A0 To be more<br>
precise, it&#39;s a combination of three kinds of undesireable behavior:<br=
>
<br>
- If gschem has been invoked without specifying file names on the command<b=
r>
line, or all pages have been closed at some point (including reverting a<br=
>
single open page, as you pointed out), an untitled page is created.=C2=A0 T=
his<br>
page is still present in the background after other files have been<br>
opened.<br>
<br>
- &quot;Save all&quot; doesn&#39;t care if a page has been changed; it simp=
ly saved all<br>
pages to their internally assigned filename.<br>
<br>
- For unsaved buffers, &quot;Save all&quot; doesn&#39;t ask for a filename =
like &quot;Save&quot;<br>
does but simply uses the auto-generated &quot;untitled_1.sch&quot; filename=
.<br>
<br>
<br>
&gt; [Reverting is] made even more complex by the fact that you can&#39;t m=
odify <br>
&gt; the GList of pages whilst iterating that GList of pages - so I just du=
mp <br>
&gt; the page pointers into a temporary array first and work from that <br>
&gt; instead. It seems to work.<br>
<br>
In what kind of situation would you use a &quot;Revert all&quot; action?<br=
>
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
 class=3D"gmail-m_-5110009116288739741gmail_signature"><div dir=3D"ltr"><b>=
Matt Jenkins</b><div>Majenko Technologies</div><div><br></div></div></div>
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
 class=3D"gmail_signature"><div dir=3D"ltr"><b>Matt Jenkins</b><div>Majenko=
 Technologies</div><div><br></div></div></div>

--0000000000004c5b2005919394ad--

- Raw text -


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