Mail Archives: geda-user/2015/07/15/19:39:52
--001a113cd1f4b388d9051af277ca
Content-Type: text/plain; charset=UTF-8
For me gschem is a bit of a black box. If the existing material on scheme
use in gschem could be expanded and enhanced, we are more likely to lure
potential developers into enhancing and extending it, i.e. it'd be great if
we could add more examples to
http://wiki.geda-project.org/geda:gnetlist_scheme_tutorial
http://wiki.geda-project.org/geda:gschem_ug:extensions
So, please do go into further detail, it would be of interest to me and to
others I am sure.
Similarly, if more examples of modules for PCB were available, it would
probably encourage peeople to have a go.
Cheers,
Erich.
On Thu, Jul 16, 2015 at 5:58 AM, Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via
geda-user AT delorie DOT com] <geda-user AT delorie DOT com> wrote:
> On Wed, Jul 15, 2015 at 10:50:14AM +0200, Richard Rasker (
> rasker AT linetec DOT nl) [via geda-user AT delorie DOT com] wrote:
> >
> > I don't know if this is the right time for some small stuff with regard
> > to gschem/PCB, but as I found a veritable mountain of new list messages
> > after a few days' absence, I reckon this is as good a time as any.
> >
> > I haven't read through all the new messages yet, but I generally agree
> > that gEDA/gschem/PCB is quite a mature project, leaving only very few
> > things to be desired in my opinion. I use it on an almost weekly basis,
> > and frankly, I wouldn't want anything else.
> >
> >
> > The only issues that I can think of are some very minor things with
> > regard to gschem's workflow:
> >
> > - When adding an attribute to an element, the 'Edit Attribute' dialog
> > has 'Visible - Show name and value' selected by default. Now I don't
> > know about other people's preferences, but I literally *never* want the
> > attribute's Name to show. Yes, it's simply a matter of one extra mouse
> > click to select 'Show value only' or untick the checkbox in the list
> > window, but it's slightly annoying all the same. So perhaps the default
> > selection could be 'Visible - Show value only'.
> Please file a bug report on launchpad.
>
> >
> > - Copying already defined elements is how I place most elements. Until
> > some time ago, the new copy was automatically selected, which I consider
> > the desired behavior: with the attribute editing window open, I could
> > change the new element's attributes right away.
> > Now, however, the original element stays selected, and I have to
> > explicitly click the copy to select it. Again no big deal, but slightly
> > annoying as a small change can make for an even smoother workflow.
>
> It's probably a chance to make an example of scripting in guile for
> gschem.
>
> Put the following code into your gschemrc:
>
> --------------------8<----------------------
> (use-modules (geda page))
> (use-modules (gschem selection))
> (use-modules (gschem hook))
>
> (define copied-objects '())
>
> (define (get-copied-objects)
> copied-objects)
>
> (define (set-copied-objects! ls)
> (set! copied-objects ls))
>
> (define my-selection-hook (make-hook))
>
> (add-hook! my-selection-hook
> (lambda ()
> (for-each select-object! (get-copied-objects))))
>
> (add-hook! copy-objects-hook
> (lambda (ls)
> (begin
> (for-each deselect-object! (page-selection (active-page)))
> (set-copied-objects! ls))))
>
> (add-hook! paste-objects-hook
> (lambda (ls)
> (run-hook my-selection-hook)))
> -------------------->8----------------------
>
> or into, say, ~/.gEDA/myselection.scm
> and put into gschemrc just
> (load "myselection.scm")
>
> This code is for selecting only copied objects. If you want select all
> pasted objects (even if you paste them using shortcut) it would even be
> simpler.
>
> It works in gschem 1.9.1 with guile 2.0, but probably will work with
> other combinations as well.
>
> If anybody is interested how all this works, I could make clear some
> details.
>
> Cheers,
> Vladimir
>
--001a113cd1f4b388d9051af277ca
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>For me gschem is a bit of a black box. If the existin=
g material on scheme use in gschem could be expanded and enhanced, we are m=
ore likely to lure potential developers into enhancing and extending it, i.=
e. it'd be great if we could add more examples to</div><div>=C2=A0</div=
><div><a href=3D"http://wiki.geda-project.org/geda:gnetlist_scheme_tutorial=
">http://wiki.geda-project.org/geda:gnetlist_scheme_tutorial</a></div><div>=
<a href=3D"http://wiki.geda-project.org/geda:gschem_ug:extensions">http://w=
iki.geda-project.org/geda:gschem_ug:extensions</a></div><div>=C2=A0</div><d=
iv>So, please do go into further detail, it would be of interest to me and =
to others I am sure.</div><div>=C2=A0</div><div>Similarly, if more examples=
of modules for PCB were available, it would probably encourage peeople to =
have a go.</div><div>=C2=A0</div><div>Cheers,</div><div>=C2=A0</div><div>Er=
ich.</div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">O=
n Thu, Jul 16, 2015 at 5:58 AM, Vladimir Zhbanov (<a href=3D"mailto:vzhbano=
v AT gmail DOT com">vzhbanov AT gmail DOT com</a>) [via <a href=3D"mailto:geda-user AT delor=
ie.com">geda-user AT delorie DOT com</a>] <span dir=3D"ltr"><<a href=3D"mailto:=
geda-user AT delorie DOT com" target=3D"_blank">geda-user AT delorie DOT com</a>></spa=
n> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex"><span>On Wed, Jul 15, 2015 at 1=
0:50:14AM +0200, Richard Rasker (<a href=3D"mailto:rasker AT linetec DOT nl">raske=
r AT linetec DOT nl</a>) [via <a href=3D"mailto:geda-user AT delorie DOT com">geda-user AT d=
elorie.com</a>] wrote:<br>
><br>
> I don't know if this is the right time for some small stuff with r=
egard<br>
> to gschem/PCB, but as I found a veritable mountain of new list message=
s<br>
> after a few days' absence, I reckon this is as good a time as any.=
<br>
><br>
> I haven't read through all the new messages yet, but I generally a=
gree<br>
> that gEDA/gschem/PCB is quite a mature project, leaving only very few<=
br>
> things to be desired in my opinion. I use it on an almost weekly basis=
,<br>
> and frankly, I wouldn't want anything else.<br>
><br>
><br>
> The only issues that I can think of are some very minor things with<br=
>
> regard to gschem's workflow:<br>
><br>
> - When adding an attribute to an element, the 'Edit Attribute'=
dialog<br>
> has 'Visible - Show name and value' selected by default. Now I=
don't<br>
> know about other people's preferences, but I literally *never* wan=
t the<br>
> attribute's Name to show. Yes, it's simply a matter of one ext=
ra mouse<br>
> click to select 'Show value only' or untick the checkbox in th=
e list<br>
> window, but it's slightly annoying all the same. So perhaps the de=
fault<br>
> selection could be 'Visible - Show value only'.<br>
</span>Please file a bug report on launchpad.<br>
<span><br>
><br>
> - Copying already defined elements is how I place most elements. Until=
<br>
> some time ago, the new copy was automatically selected, which I consid=
er<br>
> the desired behavior: with the attribute editing window open, I could<=
br>
> change the new element's attributes right away.<br>
> Now, however, the original element stays selected, and I have to<br>
> explicitly click the copy to select it. Again no big deal, but slightl=
y<br>
> annoying as a small change can make for an even smoother workflow.<br>
<br>
</span>It's probably a chance to make an example of scripting in guile =
for<br>
gschem.<br>
<br>
Put the following code into your gschemrc:<br>
<br>
--------------------8<----------------------<br>
=C2=A0 (use-modules (geda page))<br>
=C2=A0 (use-modules (gschem selection))<br>
=C2=A0 (use-modules (gschem hook))<br>
<br>
=C2=A0 (define copied-objects '())<br>
<br>
=C2=A0 (define (get-copied-objects)<br>
=C2=A0 =C2=A0 copied-objects)<br>
<br>
=C2=A0 (define (set-copied-objects! ls)<br>
=C2=A0 =C2=A0 (set! copied-objects ls))<br>
<br>
=C2=A0 (define my-selection-hook (make-hook))<br>
<br>
=C2=A0 (add-hook! my-selection-hook<br>
=C2=A0 =C2=A0 (lambda ()<br>
=C2=A0 =C2=A0 =C2=A0 (for-each select-object! (get-copied-objects))))<br>
<br>
=C2=A0 (add-hook! copy-objects-hook<br>
=C2=A0 =C2=A0 (lambda (ls)<br>
=C2=A0 =C2=A0 =C2=A0 (begin<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (for-each deselect-object! (page-selection (act=
ive-page)))<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (set-copied-objects! ls))))<br>
<br>
=C2=A0 (add-hook! paste-objects-hook<br>
=C2=A0 =C2=A0 (lambda (ls)<br>
=C2=A0 =C2=A0 =C2=A0 (run-hook my-selection-hook)))<br>
-------------------->8----------------------<br>
<br>
or into, say, ~/.gEDA/myselection.scm<br>
and put into gschemrc just<br>
=C2=A0 (load "myselection.scm")<br>
<br>
This code is for selecting only copied objects. If you want select all<br>
pasted objects (even if you paste them using shortcut) it would even be<br>
simpler.<br>
<br>
It works in gschem 1.9.1 with guile 2.0, but probably will work with<br>
other combinations as well.<br>
<br>
If anybody is interested how all this works, I could make clear some<br>
details.<br>
<br>
Cheers,<br>
=C2=A0 Vladimir<br>
</blockquote></div><br></div>
--001a113cd1f4b388d9051af277ca--
- Raw text -