[ESS] polymode, tangentially related to ESS

Vitalie Spinu spinuvit at gmail.com
Fri Mar 14 22:24:08 CET 2014


 >>>  (Phillip Lord)on Fri, 14 Mar 2014 11:17:47 +0000 wrote:

[...]
 > Out of curiosity how do you stop this being a problem with polymode? In
 > my experience, if I have two indirect buffers in two different modes the
 > currently active one "wins" the syntax highlighting because of the text
 > properties.

Font lock operates on narrowed region all the time. And region is
narrowed to the chunk. I also syntactically comment everything before
the chunk. This improves C-like modes which disregard a lot of newer
emacs conventions like font-lock-dont-widen.

 > With linked-buffers you could share some (or all, or none) of the text
 > properties, as you choose. By default I share text and no properties.

Can you share text properties per region? That is in latex block use
properties from latex-mode in *all* the buffers? If so that might be
interesting, but it comes very closely to what I have done with indirect
buffers then.

Polymode is not hardwired with indirect buffers. If your
"linked-buffers" allow a better alternative, I would be happy to modify
polymode to use linked-buffers instead.

[...]

 > I've written a long post describing this, which will go live as soon as
 > I've kicked people to kick the webserver!

Looking forward to that. 

 > I want to do literate programming. Or perhaps more accurately
 > programmed literature, as I expect in many cases there will be a lot
 > more text than program. The tool set I want to integrate (Clojure and
 > Latex) does not easily allow this combination, mostly because Clojure
 > doesn't have block comments, nor can they be coded in at a user
 > level. 

I thought #_() is a block comment.  Is there a standard syntax for
clojure literate programming?

 > So I have two buffers which are *views* of the same information but
 > not exactly the same content.

 > I also want to get it working with Markdown -- I get really frustrated
 > that I cannot run the code snippets in my documentation; they are a pain
 > in the ass to maintain.

Markdown works well with polymode. It works for lisp. It works with
clojure-mode also, not so much with cider for evaluation. That should be
fixable. I am interested in developing for clojure and I would be happy
to add support for clojure literate programming and inline
documentation.

  Vitalie



More information about the ESS-help mailing list