delorie.com/archives/browse.cgi   search  
Mail Archives: geda-help/2016/02/29/03:29:28

X-Authentication-Warning: delorie.com: mail set sender to geda-help-bounces using -f
X-Recipient: geda-help AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to;
bh=rspuLSXlkljr0yO1lWZp7G2nf7KCLpcoS54bHbKOvGM=;
b=aIU+BQfRaxxgy1cmejRD6anDMnzV5uVnuicXTWe/sjBtQe/J30Pr6lZOxhs2hi+Qtf
eBsY3CzS243XOSchZ18lI1/AZMwqQ4WHxUX/RbKC6U2ryNzrYxfA+G0WPOyZ821Ciz/+
i2yMfYhJAnM+AyxRaW7FOih2LcqOx1s6MpyLcdVzhB3CUsY2PSculYUA8NtUXypLn4Fm
344tY0OC3gUbehgTwUQ9Md2QpDbMCRXyedGr8O9dOGBM39EcMRcycsXIZ3ARa9Y3YyAI
fX7n5zgMaHcI2f4llIk7OSa6aIsv0PzbU1uJUpkHtk0mL7IGSlbx/5bLQQ5gq2x9iD1P
4zkA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-gm-message-state:mime-version:in-reply-to:references:date
:message-id:subject:from:to;
bh=rspuLSXlkljr0yO1lWZp7G2nf7KCLpcoS54bHbKOvGM=;
b=J3tL3UGNfv0jANQGhpXxG5KVtyPauLKFkezxzAccCxWPNDmOMLD5kxgWo+tMHHNmfF
rxBaL+v8GnrrJt5of+tJGeXBWnXsaT6y2kANt/T8382LfJd0rbYj026n5wwEIPOC0psX
SQ5KGalD7GQzZEmKMddDfZEKes750vBtxUJXn6UaBe078kYnNc/7LwnJi9Jn3VPOmv9S
7HjyDuNK9svrnik4wk1gqirMIXDsOQd8dXeVATxJrqM92Ai1Na12fFq5myaEkxurjkLm
5Inb2G7ak4obtWwI8bzu3yWmJ9B58Rb21tXsjtpxc51PQwDfc0GhDpkPF4k0UlhQmzVE
ZVzw==
X-Gm-Message-State: AD7BkJIKo2aA8QM2ie2YFyrHlgG3PlHTDB9vxuImjfHDZfzia1fSphistUutpno2ZfTVtX8rFyJF1Zx0KxFhuw==
MIME-Version: 1.0
X-Received: by 10.194.143.82 with SMTP id sc18mr13118727wjb.14.1456734529959;
Mon, 29 Feb 2016 00:28:49 -0800 (PST)
In-Reply-To: <20160226172744.d17641d40219170f83b5c9c8@aol.com>
References: <20160226172744 DOT d17641d40219170f83b5c9c8 AT aol DOT com>
Date: Mon, 29 Feb 2016 11:28:49 +0300
Message-ID: <CAMvDHVBbgcNyeZSjruYOxa4L8J8_wv9txXAvGMVLkEM1FW22xw@mail.gmail.com>
Subject: Re: [geda-help] auto update a date in gschem
From: "Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-help AT delorie DOT com]" <geda-help AT delorie DOT com>
To: geda-help AT delorie DOT com
Reply-To: geda-help AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-help AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

--089e011823a030bd9c052ce4703f
Content-Type: text/plain; charset=UTF-8

On 2/26/16, Davide Hug (d_hug AT aol DOT com) [via geda-help AT delorie DOT com]
<geda-help AT delorie DOT com> wrote:
> Hello.
>
> What is the best way to keep a date up to date in a gschem title block?  I
> wrote a guile function that updates all attributes
> "modification-date=<date>"
> to the current date. Is it possible to automate the call to this function
> when
> the file is saved or when it is modified?

You could use something like save-page-hook! if such a hook would
exist :) However, since there are no appropriate hook, you can
redefine the file save action(s). The attached script does just
that.

To load it automatically, place it in your ~/.gEDA and add the
following line in your ~/.gEDA/gschemrc:

  (load "moddate.scm")

This should work for 1.8.2 and later versions (though I didn't
test it for anything but the latest git version).

HTH,
  Vladimir

--089e011823a030bd9c052ce4703f
Content-Type: application/octet-stream; name="moddate.scm"
Content-Disposition: attachment; filename="moddate.scm"
Content-Transfer-Encoding: base64
X-Attachment-Id: file0

KHVzZS1tb2R1bGV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KCjs7OyBTYXZl
IGFjdGlvbiBwcm9jZWR1cmVzIHRvIHVzZSB0aGVtIGxhdGVyIAooZGVmaW5lICZzdG9jay1maWxl
LXNhdmUgJmZpbGUtc2F2ZSkKKGRlZmluZSAmc3RvY2stZmlsZS1zYXZlLWFzICZmaWxlLXNhdmUt
YXMpCgo7OzsgUmVkZWZpbmUgdGhlbQooZGVmaW5lICgmZmlsZS1zYXZlKQogIDs7IHVwZGF0ZSBk
YXRlLXRpbWUgYXR0cmlidXRlKHMpIGlmIG9ubHkgdGhlIGFjdGl2ZSBwYWdlIGhhcwogIDs7IGJl
ZW4gY2hhbmdlZAogIChhbmQgKHBhZ2UtZGlydHk/IChhY3RpdmUtcGFnZSkpCiAgICAgICAodXBk
YXRlLW1vZGlmaWNhdGlvbi1kYXRlISAoYWN0aXZlLXBhZ2UpKSkKICAoJnN0b2NrLWZpbGUtc2F2
ZSkpCgooZGVmaW5lICgmZmlsZS1zYXZlLWFzKQogIDs7IHVuY29uZGl0aW9uYWxseSB1cGRhdGUg
ZGF0ZS10aW1lIGF0dHJpYnV0ZShzKQogICh1cGRhdGUtbW9kaWZpY2F0aW9uLWRhdGUhIChhY3Rp
dmUtcGFnZSkpCiAgKCZzdG9jay1maWxlLXNhdmUtYXMpKQo=
--089e011823a030bd9c052ce4703f--

- Raw text -


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