[ESS] Polymode is on MELPA

Andreas Leha andreas.leha at med.uni-goettingen.de
Thu May 15 00:13:15 CEST 2014

Hi Vitalie,

Vitalie Spinu <spinuvit at gmail.com> writes:

>  >>> Grant Rettke on Tue, 13 May 2014 09:12:01 -0500 wrote:
>  > Thank you!
>  > For folks new to polymode like myself, but coming form org-mode and
>  > literate programming, may you please comment on some of the key
>  > differences and philosophies behind polymode?
> It is a new multiple-modes-in-the-same-buffer-mode and is designed to be
> better and faster than anything else out there :). Still some work
> needed for that, but it already works. The main idea is to use indirect
> buffers for each submode separately. Because of this, polymode doesn't
> re-install the modes each time you switch different code spans.
> The key philosophy is the ease of extensibility. You should be able to
> declare your own polymodes, exporters, weavers etc. in as much as 5
> lines of code. Another "philosophy" is the hierarchical customization
> paradigm. Because all objects (polymodes, submodes, weavers, exporters)
> respect a well defined hierarchy of objects, it is enough to customize
> parent objects and all children will inherit the customization. If you
> are familiar with prototype OO paradigm, this is precisely it. For
> example there is a root noweb polymode and other, more specific, noweb
> polymodes (like poly-noweb+R-mode) that inherits from the root. By
> customizing the root polymode, all children automatically inherit the
> customization.
> Another key feature as compared to other multi-modes is that polymode
> tries to play well with the plethora of literate programming tools out
> there. There are many tools, some more specific, some more generic than
> others. That means that some weavers/exporters must be available only in
> specific polymodes and there will multiple weavers/exporters for each
> polymode. This demands an intricate dependency model, and I think I have
> found a reasonably good paradigm for that. Namely, you first have to
> develop an literate programming tool, say exporter, then you will
> register it with a predefined polymode, say pm-noweb. This exporter then
> will be available to all polymodes inherited from pm-noweb. You can have
> a _default_ weaver/exporter for each polymode and you can also choose
> the weaver/exporter interactively.
> There is much more to it. I am in the process of preparing detailed
> docs.

I am in the same position as Grant.  And I do not want to wait for the
docs ;-)

What is still not obvious to me:  Is it a
'multiple-modes-in-the-same-buffer-mode' or is it a literate programming
tool (with weaving/export functionality).  Or both?

Basically, I also have a more specific follow-up question.  If polymode
tries to play well with 'the plethora of literate programming tools out
there', does it integrate with orgmode?  And if so, to what extent?  Are
the mode switching capabilities available in orgmode documents already?

Thanks for further clarifications in advance.


More information about the ESS-help mailing list