-
-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Welcome to the sketch-mode wiki!
In this wiki you find develop notes.
I started this mode because I wanted to draw some simple lens diagram. As I love working with Emacs and org-mode, I started writing some sketches in source blocks (trying different languages, like asymptote, tikz and svg). Immediately I realized that writing was really not the way to go. For sure drawing interactively is much quicker, but although Inkscape and Geogebra are both great software, they are a little overkill, and cumbersome, for creating very simple sketches (like simple lens diagrams). So I imagined drawing sketches on an svg shown below an org source block, and seeing the code added within the source block. This certainly is possible (I already did some successful experiments), but we should start simple.
When starting with this package I first created all kinds of variables, that could be set to configure the element ‘properties’. Then I quickly realized that Emacs has the amazing transient package for this kind of functionality. So I added the transient.
I started first to create everything as a single drawing, but then I wanted to be able to toggle the grid. So I separated the single drawing in different elements (a canvas, a grid, and the objects).
Subsequently I wanted to be able to remove elements, so I’ve added a labels
element to the drawing (and added id's
to the objects), so we can remove an
element by selecting its label (that is easier than selecting elements via
mouse clicks).