On Mon, Jul 15, 2013 at 12:26 PM, Harshad RJ <[email protected]> wrote:
> > For example, SVG <https://en.wikipedia.org/wiki/Scalable_Vector_Graphics>is a > declarative language. It allows me to write: > > <circle r="10px" cx="20px" cy="20px" /> I forgot to elaborate further. There is an interactive editor for SVG graphics called Inkscape <http://inkscape.org>. It reads and writes standard compliant SVG files and allows the user to edit them interactively. Advanced users can also directly edit SVG attributes of an element (through Inkscape's XML interface). This is very useful in a pinch, say for example, when the GUI hasn't yet implemented some part of the spec, but it can render it nevertheless. Or when you want to understand how SVG works, you can play with the attributes and see how it reflects in the render. In all I have used SVGs in three ways: - Directly writing SVGs by hand. - Creating SVGs using a script to visualise some data, for example. - Interactively editing them via tools such as Inkscape. So, here we have an example of a language that is also a file format and I think it has a very clear parallel to how the ledger language is (or could be). About your question of how comments could be handled in an interactive editor for ledger, well I am not able to see the challenge there, but broadly speaking, I have two ideas of how such an editor would look like: - The editor could understand the structure of the input file. It would be like a database editor, but instead of just rows and columns of data, we have a richer hierarchy of data. Comments would be part of the recognized structure. - Alternatively, the editor could be just a plain text editor integrated into the reporting system. For certain users, this would be more convenient than editing in a separate program. Comments are again not a problem because to the editor, they are just another part of the input text. Both of these editors could be made aware of the link between input fields and output fields. I suspect Emacs / Org mode does something like this already. Unfortunately, I haven't tried it out yet. If these things are possible in Emacs, would be great if someone can point me to a quick demo / screencast of it. best, -- *Harshad RJ <http://lavadip.com>* -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
