[ESS] polymode, tangentially related to ESS

Mathieu Basille basille.web at ase-research.org
Tue Mar 11 20:20:37 CET 2014


Le 03/11/2014 02:51 PM, Warth, Christopher S a écrit :
> I want to reiterate - I admire and appreciate the ingenuity of Vitalie¹s
> solution.  It is wonderful having ESS mode active in portions of my knitr
> document.  I just wonder whether it is possible for emacs to associate a
> major mode with any finer granularity than an entire buffer.
>
> Maybe my experience is unusual, but three things make the current polymode
> experience less than seamless for me.   The most obvious is perhaps the
> least annoying, and that is the visual pollution of three buffer tabs
> along the top of my emacs window - Foo.Rmd, Foo.Rmd[r], and
> Foo.Rmd[fundamental].

Ah, yes. I don't have tabs on my Emacs, but I do have the three buffers in 
the buffer ring, which is slightly confusing when I cycle through it (using 
iflipb, I did not find a way to 'exclude' them).

> More annoying is a jarring visual shift when I move the cursor from one
> region to another - from markdown into an R region or vice versa.  It
> looks like different font faces are set in the two modes and the switch is
> quite evident when the buffers swap.  This is an example of the larger
> visual shifts that happen as I use a thumb wheel to scroll through the
> buffer.  Not only is the font face changing as the cursor is forced into
> different regions, but the tabs at the top do a distracting dance as
> different buffers become activated.  Maybe I can fix the font swapping by
> judicious selection of major mode options?

Weird, I don't have the font problem on my system. Could it be different 
configurations for Markdown vs. ESS? I understand that it is annoying. This 
actually reminds me editing .Rnw files years ago, with a somewhat similar 
problem, which does not appear any more. And this is also why I love 
polymode (so far!) because this does not appear on my system! :)

> And finally, under certain circumstances I have found it impossible to do
> a sweep selection from one region to another.  This is very rare, and now
> when I try to identify a specific scenario where this happens I cannot
> reproduce it so maybe that one is all in my head.   Perhaps someone else
> has seen that too?

This also reminds me editing .Rnw files years ago, when selecting (with the 
keyboard) through LaTeX and R chunks would reinitialize the selection every 
time you switch modes, so that you'd have to use the mouse instead (but who 
wants to do that??).

Anyway, sorry I'm not more useful, but at least you have another opinion 
with a somewhat different experience... Bottom line is that I'm sure it can 
work better for you, at the exception of the multiple buffer issue. And 
maybe others will have a solution for this one too!

Mathieu.


>
> - Chris
>    cwarth at fhcrc.org
>
> Aquamacs 3.0 GNU Emacs 24.3.50.2
> (x86_64-apple-darwin13.0.0, NS apple-appkit-1265.00)
>   of 2014-01-19 (Aquamacs-3.0) on watson
>

-- 

~$ whoami
Mathieu Basille, PhD

~$ locate --details
University of Florida \\
Fort Lauderdale Research and Education Center
(+1) 954-577-6314
http://ase-research.org/basille

~$ fortune
« Le tout est de tout dire, et je manque de mots
Et je manque de temps, et je manque d'audace. »
  -- Paul Éluard



More information about the ESS-help mailing list