From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dalanicolai Newsgroups: gmane.emacs.devel Subject: Re: new package: sketch-mode Date: Mon, 30 Aug 2021 16:20:25 +0200 Message-ID: References: <2F22AA60-BE0C-4FC2-BC97-B368C618E685@mit.edu> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000083452705cac789a3" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21233"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "larsi@gnus.org" , Emacs Devel To: Qiantan Hong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 30 16:21:28 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKiAB-0005Fn-S4 for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Aug 2021 16:21:27 +0200 Original-Received: from localhost ([::1]:43028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKiAA-0003tO-7d for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Aug 2021 10:21:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKi9R-0002Vq-Cq for emacs-devel@gnu.org; Mon, 30 Aug 2021 10:20:41 -0400 Original-Received: from mail-vs1-xe35.google.com ([2607:f8b0:4864:20::e35]:41654) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKi9P-0003pA-Ar for emacs-devel@gnu.org; Mon, 30 Aug 2021 10:20:41 -0400 Original-Received: by mail-vs1-xe35.google.com with SMTP id i1so10652968vsk.8 for ; Mon, 30 Aug 2021 07:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zz90H7cMZTspYH/NdUNoeq88itc+8liU/DdQkDmK2WI=; b=VJSscKqoGl4H9ejylo/HSDXam43mHjO3dEYtJRyLe4WvEEy+KiX0Z32IxrFfFM9mkT sef2Bl0Jhr8TgVRZ1TWyjsS7+hIGGl/TDqhVd+rsQMyIZjzO40T+JYoA6aeZGppwspjJ FmPejRwCtocRZdMo0362H5t/PagW1sYYeweTdSYztLitxIBJy1spmjqtY6L5wsTDyP9E 3B5jAjqq9gLq4whhT7gflkVCSndgdONjfVHSXF18cMnj3HzgaKvb9lNkNVy+RhwVngy4 buDQRTnRVYqG9OENigKTLxFbStKP9eBPsqlnhN5T1q8Zx3AUpTqIC9qu/XZhgN4ANU8X cBQQ== 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:cc; bh=zz90H7cMZTspYH/NdUNoeq88itc+8liU/DdQkDmK2WI=; b=a6KcLPtPydgg04QVZ1pWwqjrijLN4vECACddxcnG3NZ0wPvivTu5xPai8Cin8v2NYz dly97j/7TSZ/dJFOM5G0r/caDjNqkWzSTYWbyMvKst7hq7DdHfbdvcfVR28nx37MGa0a NcUGikg7Zlr8YaDFQDVYjv9f4H3w+vMsZGvIYLUMR23kZblCL9N+ZywOSQ5u9hq/hEnx vbuOy+BLqrOAj4iNLrn6sbnsmTY248hxffNotoHEBKtSjnHu8pPE7k76CVLVkpe0rf4t V6JmZVUqcH+sFNSCzjUbWQDiXEs1mMOcsOsHNEybp4qlK8oKhtA1QPRvdhmdk46H7lxf MmQw== X-Gm-Message-State: AOAM530UCMD5qK13E8LwwHUSVN5A4RSpzh7gB0IH3ko4K/HYBwCgeiAj dfjkc1eUlly62i3BFq6Y1YeXGLR6l2L4X2/9t+w= X-Google-Smtp-Source: ABdhPJyk4KcFkDj3t2Zh4xnWmR8sy+yhzK2cdBN6z+zP3ZgCval/WcZKH9jL6HwwkP8pHhjw1QRGM3RhT9BhJVeL00o= X-Received: by 2002:a67:b447:: with SMTP id c7mr14440150vsm.41.1630333237936; Mon, 30 Aug 2021 07:20:37 -0700 (PDT) In-Reply-To: <2F22AA60-BE0C-4FC2-BC97-B368C618E685@mit.edu> Received-SPF: pass client-ip=2607:f8b0:4864:20::e35; envelope-from=dalanicolai@gmail.com; helo=mail-vs1-xe35.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:273499 Archived-At: --00000000000083452705cac789a3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ah, I remember that I linked to the package in my original message, but indeed I do not find any link there (let me see if this works, otherwise the package can be found at: https://github.com/dalanicolai/sketch-mode). Anyway, although I do not immediately see any big advantage of having the image overlayed on a 'semantically corresponding text', it sounds like an interesting idea. Maybe you can explain the advantages in a little more detail. I was thinking of creating a togglable side-window that can show various 'levels` of definitions (layers, objects etc.). It is not very useful to get the full definition of the svg image, as it is 'polluted' with the definitions of the grid and the object's labels. So a sketch-mode image is build up modularly using svg-groups, where the grid and labels and the different layers are added as different modules/groups. So when I overlay the image on semantically corresponding text, I would not immediately know which part of the definition best to use for the text (the svg definition, the full elisp image definition, only the layers?) Indeed, the package is only an isolated editor emulated in Emacs, but it ha= s certain advantages over more specialized software especially for simple svg images; i.e. it is in Emacs, sketches can be created really quick and finally it is an Emacs package and therefore ultimately/easily hackable. So users can implement whatever they like, e.g. snippets, and use elisp functions for drawing certain patterns etc. I have written a little motivation and vision in the sketch-mode wiki (https://github.com/dalanicolai/sketch-mode/wiki). Furthermore, if you would like to contribute/join in development then you are very welcome. Finally, I think we should move further discussions to either a github issue or to the discussions board ( https://github.com/dalanicolai/sketch-mode/discussions). Daniel On Mon, 30 Aug 2021 at 08:00, Qiantan Hong wrote: > > I am writing primarily to notify you about a package, sketch-mode, I am > working on. It provides a handy interface to quickly draw svg's using, we= ll > Emacs, but in particular svg.el and transient.el. > > It is handy in particular for creating svg sketches really fast, while > of course, it has the advantage over other svg drawing applications that = it > is very hackable in your favorite langauge :) > > This looks very exciting! Is the code available somewhere? > > One important question I have is, do you implement it by putting an SVG > overlay/property over a single dummy character, > or do you put it on a range of text that *semantically* correspond the SV= G > being displayed? > I strongly recommend the latter model because it makes it possible to > blend in Emacs, > e.g. you can get cursor movement, selection, copy/yank etc relatively > easily. > Just for a started, suppose underlying text is structured as one word > correspond to and SVG element, > then one can use forward-word backward-word to move between elements. > And there=E2=80=99s much more to explore using other existing structural = editing > command. > On the other hand, overlaying over a single dummy character just sounds > like inventing > a different, isolated editor emulated in Emacs. > > I posted some more in-depth discussion over such issue here > http://lambda-the-ultimate.org/node/5630#comment-96710 > > If you find the above proposals compelling, I=E2=80=99m happy to collabor= ate on it > if that=E2=80=99s helpful! > I once experimented building a music notation software using the above > discipline > (character -> note head, word -> chord, sentence -> beamed note, paragrap= h > -> bar) > but eventually I abandoned it and get away with MuseScore. > > Best, > Qiantan > > --00000000000083452705cac789a3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ah, I remember that I linked to the package in my ori= ginal
message, but indeed I do not find any link there (let me see ifthis works, oth= erwise the package can be found at:
https://github.com/dalanicolai/sketch-mode).

= Anyway, although I do not immediately see any big advantage of
having th= e image overlayed on a 'semantically corresponding
text', it sou= nds like an interesting idea. Maybe you can explain the
advantage= s in a little more detail.

I was thinking of creating a togglable si= de-window that can show various
'levels` of definitions (layers, obj= ects etc.). It is not very useful to get the
full definition of the svg = image, as it is 'polluted' with the definitions of
the grid and = the object's labels. So a sketch-mode image is build up modularly
us= ing svg-groups, where the grid and labels and the different layers are adde= d
as different modules/groups. So when I overlay the image on semantical= ly
corresponding text, I would not immediately know which part of the de= finition
best to use for the text (the svg definition, the full elisp im= age definition,
only the layers?)

Indeed, the package is only an = isolated editor emulated in Emacs, but it has
certain advantages over mo= re specialized software especially for simple svg
images; i.e. it is in = Emacs, sketches can be created really quick and finally it
is an Emacs p= ackage and therefore ultimately/easily hackable. So users can
implement = whatever they like, e.g. snippets, and use elisp functions for
drawing certain patterns etc.

I have written a little motivation = and vision in the sketch-mode wiki
(https://github.com/dalanicolai/sketch-mode/wiki= ).

Furthermore, if you would like to contribute/join in development = then you are
very welcome.

Finally, I think we should move furthe= r discussions to either a github issue or
to the discussions board (https://github.= com/dalanicolai/sketch-mode/discussions).

Dani= el

On Mon, 30 Aug 2021 at 08:00, Qiantan Hong <qhong@mit.edu> wrote:
> I am writing primarily to notify you abo= ut a package, sketch-mode, I am working on. It provides a handy interface t= o quickly draw svg's using, well Emacs, but in particular svg.el and tr= ansient.el.
> It is handy in particular for creating svg sketches really fast, while= of course, it has the advantage over other svg drawing applications that i= t is very hackable in your favorite langauge :)

This looks very exciting! Is the code available somewhere?

One important question I have is, do you implement it by putting an SVG ove= rlay/property over a single dummy character,
or do you put it on a range of text that *semantically* correspond the SVG = being displayed?
I strongly recommend the latter model because it makes it possible to blend= in Emacs,
e.g. you can get cursor movement, selection, copy/yank etc relatively easil= y.
Just for a started, suppose underlying text is structured as one word corre= spond to and SVG element,
then one can use forward-word backward-word to move between elements.
And there=E2=80=99s much more to explore using other existing structural ed= iting command.
On the other hand, overlaying over a single dummy character just sounds lik= e inventing
a different, isolated editor emulated in Emacs.

I posted some more in-depth discussion over such issue here http://lambda-the-ultimate.org/node/5630#comment-96710
If you find the above proposals compelling, I=E2=80=99m happy to collaborat= e on it if that=E2=80=99s helpful!
I once experimented building a music notation software using the above disc= ipline
(character -> note head, word -> chord, sentence -> beamed note, p= aragraph -> bar)
but eventually I abandoned it and get away with MuseScore.

Best,
Qiantan

--00000000000083452705cac789a3--