delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/07/15/16:28:49

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=20120113;
h=date:from:to:subject:message-id:mail-followup-to:references
:mime-version:content-type:content-disposition:in-reply-to
:user-agent;
bh=IDlWHEtPB4K9d/44/SFT1lD5E3NG0E5sl4sQwe/soPg=;
b=zs3nO8yxSDzRhHTX2nXXILYKQbcW3At5UA8za2goZ7SAmmx/4FLBsGB1wTppXw6Flt
mcEUZqdV2u1YevOQOVHbMlgxufkQu+X52LOmU21RzQ4m7yDkeAKwEXgkFfDGbrWTxgyf
6R7g+seQxuzeojxcbX7981X7LZAMrnjhchPrusjxFc86uzySAeeQ7X+wPtjLLwH3WdHK
4Z5ViQrjqPtD13xBxrIRmYPAkpiQqZNsreKiDqzJlowpmKgdvsPnQmhX1Ltg0y310EXa
a7M64vizAi8MjrKlAEuFpam5F17BEi3TXWepBAWofaBgr/k67L0xxpEJrQUxiMdT1o94
vfmw==
X-Received: by 10.112.180.201 with SMTP id dq9mr6128042lbc.78.1436992111796;
Wed, 15 Jul 2015 13:28:31 -0700 (PDT)
Date: Wed, 15 Jul 2015 23:28:28 +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: developer excitement?
Message-ID: <20150715202828.GA17392@localhost.localdomain>
Mail-Followup-To: geda-user AT delorie DOT com
References: <559edcfa DOT 440d460a DOT 72d9 DOT 29cf AT mx DOT google DOT com>
<201507092128 DOT t69LSc2j001777 AT envy DOT delorie DOT com>
<CAM2RGhQUmZ9Wz9gWNtGs22gRD-zFwq6504rcfhWBSNYft+9MPw AT mail DOT gmail DOT com>
<CAM2RGhQNdDJH6NRDOF1mEY6kxajRBESwr5HZ7eRJ0UpJfA5=Dw AT mail DOT gmail DOT com>
<201507120012 DOT t6C0CfnW014811 AT envy DOT delorie DOT com>
<CAM2RGhSM+iSS8Ysw+esVM=AGsWL=L3KMgKCjw+Ham_nYQ0pUWA AT mail DOT gmail DOT com>
<CAM2RGhSHaBjVM1D_6ZX_A4DeMuAo01X6BXpgzJnxq9w+CGfC9A AT mail DOT gmail DOT com>
<201507120145 DOT t6C1jnc8020051 AT envy DOT delorie DOT com>
<1436950214 DOT 2876 DOT 57 DOT camel AT linetec>
MIME-Version: 1.0
In-Reply-To: <1436950214.2876.57.camel@linetec>
User-Agent: Mutt/1.5.23 (2014-03-12)
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 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

- Raw text -


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