[ESS] Polymode is on MELPA

Thorsten Jolitz tjolitz at gmail.com
Tue Sep 16 16:01:01 CEST 2014

Phillip Lord <phillip.lord at newcastle.ac.uk> writes:

> Thorsten Jolitz <tjolitz at gmail.com> writes:
>> are you aware of outshine [fn:1] / outorg [fn:2]? 
> I know they exist, but I haven't used them heavily. When I wrote
> linked-buffer I was focusing on latex and clojure (which was my driving
> use case). Once I'd written that, org->el isn't that much effort.

Outshine is supposed to be major-mode agnostic, and for simple
(comment-style) cases like lisp, latex or R it tends to work
out-of-the-box (though ESS needed special treatment due to the confusing
return value of M-: major-mode).

>> They let you work permanently in an ESS buffer and create an org buffer
>> (the *outorg-edit-buffer*) whenever you want to edit comment-text (or
>> export to backends or do other Org-mode stuff). Think standard
>> literate-programming turned upside-down - the programming-mode becomes
>> the "master", org-mode (i.e. the text mode) becomes the 'slave' that is
>> only called on demand. This simplifies things quite a bit, and is very
>> convenient when the programming is more important than the writing.

> The el->org support that I am doing at the moment uses the same logic. I
> have it mostly working now.

This is then the third independent realization of this idea I see
(poporg.el, outorg.el and now your linked-buffers), proving that its not
only me who thinks that embedding source-code in text starts to feel
'wrong' once the 'programming' part becomes more important than the
'literate' part.  

>> Outorg treats programming-modes (like R-mode) and org-mode as two
>> different views on the same (org-style structured) file, and makes it
>> easy and fast to switch between both views. Use the git trunk-branches
>> if you want to check it out, they are developed towards a kind of
>> 'org-minor-mode'.
>> You can use Outshine/Outorg in all programming-modes and some other
>> text-modes (like message-mode) too, e.g. I'm writing this email in the
>> *outorg-edit-buffer* to make insertions of footnotes easier.
> I should give it a good go. It's a similar idea. The only difference is
> mine can transform text between views. So, for instance, I can convert
> between 
> ;;; Headers:
> in Emacs-lisp and
> * Headers
> in org-mode.

In general, Outshine headers are outcommented Org-mode headers. So, in
any major-mode of your choice, insert an Org-mode headline and
outcomment it (automatically using the major-mode's comment-syntax),
and you got your Outshine header. 

But since there was no way to convince the Emacs Guru's to switch from 


| ;;; 1st Level Header



| ;; * 1st Level Header

I actually had to implement both styles, so outshine/outorg work with
both styles and know how to do this conversion too ;)

But its a special case, and I try to avoid these (for keeping it
major-mode agnostic). 

> Anyway, this is supposed to be the ESS mailing list and I appear to have
> hijacked it with linked-buffer evangalism. Apologies!

true, and I could not hesitate to do some further library advertising, so
here are my apologies too.

OTOH, I could not imagine to work with ESS[R] buffers anymore that are
not structured like Org-files and don't give access to many of Org's
features, so I think its an important topic, no matter if its polymode,
linked-buffers or outshine (or something else) that is finally used.


More information about the ESS-help mailing list