[ESS] polymode/ess-mode interaction

chris warth cswarth at gmail.com
Fri Apr 17 02:16:07 CEST 2015


I noticed that polymode behaves differently after visiting *.R files than
it does before visiting a *.R file.
The difference is caused by ess-mode defining the symbol 'r-mode' which
polymode tries to use.  If ESS hasn't been loaded yet, 'r-mode' is not
defined and polymode falls back to using Fundamental mode instead (after a
warning).

How can I ensure that r-mode from ESS is always defined and available
before loading a *.Rmd file with polymode?

I'm trying to do this in a hook to avoid loading ESS unless I really need
it.
I tried this without success,

     (add-hook 'poly-markdown+r-mode-hook
   (lambda ()
 (message "in poly-markdown+r-mode-hook")
 (require 'ess)))

Also requiring the more specific 'ess-r-d in the poly-markdown+r-mode-hook
does not seem to help.

Ideas?  Thanks in advance!
-- 
Chris Warth
Fred Hutchinson Cancer Research Center
1100 Fairview Ave N.
Seattle, WA 98109-1924

	[[alternative HTML version deleted]]



More information about the ESS-help mailing list