all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ulf Jasper <ulf.jasper@web.de>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Extending svg.el
Date: Wed, 03 Dec 2014 21:40:44 +0100	[thread overview]
Message-ID: <87fvcw4gc3.fsf@web.de> (raw)
In-Reply-To: <m3lhmo8s91.fsf@stories.gnus.org> (Lars Magne Ingebrigtsen's message of "Wed, 03 Dec 2014 20:09:46 +0100")

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Ulf Jasper <ulf.jasper@web.de> writes:
>
>> However, in the end I only used very few
>> functions from 'svg.el', but wrote a handful of new functions and even
>> "re-invented" some functions (e.g. 'svg-line').  The reason is that many
>> of the functions in 'svg.el' produce side-effects (via 'svg-append' and
>> 'svg-possibly-update-image'). Besides that adding attributes to svg
>> primitives appears to have an effect on the containing xml tree (via
>> 'svg-arguments').
>
> Yes, svg.el is not an immutable functional-type library, but an
> object-oriented one that works on an XML tree.
>
> If you want a function variant of the same, you can just copy the DOM
> before you pass it in.  Perhaps add a `dom-copy' function to dom.el?

Agreed.  Implicitly, without realising it myself, I was expecting a
functional-type library but not an object-oriented one or anything else.
My mistake.

Ulf




      reply	other threads:[~2014-12-03 20:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03 19:05 Extending svg.el Ulf Jasper
2014-12-03 19:09 ` Lars Magne Ingebrigtsen
2014-12-03 20:40   ` Ulf Jasper [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fvcw4gc3.fsf@web.de \
    --to=ulf.jasper@web.de \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.