[ESS] Polymode

David Scott d@@cott @end|ng |rom @uck|@nd@@c@nz
Fri Apr 3 01:04:28 CEST 2015


Yes of course. I should have been able to think of that. Commented out 
the .Rnw and .Snw lines and processing is back to what I have come to 
know and love.

David Scott

On 3/04/2015 2:53 a.m., HaiYing Wang wrote:
> Hi David,
>
> You can comment out the default list for Polymode and then everything 
> will go back to the default for ESS. Find the fold where emacs is 
> installed and then open
> ~\share\emacs\site-lisp\default.el
>
> Comment out the following code, or just the line for .Rnw.
>
> ;; ;;;
> ;; ;;; polymode
> ;; ;;;
> ;; ;; Activation of the R specific bundle and basic configuration.
> ;; (add-to-list 'auto-mode-alist '("\\.Snw" . poly-noweb+r-mode))
> ;; (add-to-list 'auto-mode-alist '("\\.Rnw" . poly-noweb+r-mode))
> ;; (add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode))
> ;; (add-to-list 'auto-mode-alist '("\\.rapport" . poly-rapport-mode))
> ;; (add-to-list 'auto-mode-alist '("\\.Rhtml" . poly-html+r-mode))
> ;; (add-to-list 'auto-mode-alist '("\\.Rbrew" . poly-brew+r-mode))
> ;; (add-to-list 'auto-mode-alist '("\\.Rcpp" . poly-r+c++-mode))
> ;; (add-to-list 'auto-mode-alist '("\\.cppR" . poly-c++r-mode))
> ;; (require 'poly-R)
>
> By the way, if you are using knitr, you may want to put the following 
> in your .emacs file.
> (ess-swv-processor (quote knitr))
>
>
> HaiYing Wang
> Department of Mathematics & Statistics
> University of New Hampshire
> Phone: (603) 862-3212
> http://pubpages.unh.edu/~hw2000/ <http://pubpages.unh.edu/%7Ehw2000/>
>
> On Thu, Apr 2, 2015 at 7:34 AM, David Scott <d.scott using auckland.ac.nz 
> <mailto:d.scott using auckland.ac.nz>> wrote:
>
>     On Windows I have installed Emacs 24.4 and ESS 14.09 using Vince
>     Goulet's distribution. I am having a lot of trouble with
>     processing .Rnw and .Rmd files using knitr. I am aware of the M-n
>     w and M-n e commands (and the related M-n W and M-n E commands). I
>     am able to weave successfully, but exporting (which I understand
>     should use pdfLaTeX for a .Rnw file) just seems to hang showing no
>     output and I have no idea what is going on. This possibly happens
>     when I have a problem in my file (such as a beamer slide which
>     includes verbatim but is not specified as fragile), but I really
>     don't know. For .Rmd files I resorted to a creating a .bat file
>     using render from the rmarkdown package, which was reasonably
>     successful, but was not the best workflow in my view. I would
>     really like to be able to just process .Rnw files as previously
>     with M-n s followed by M-n P, but I am far from that at present.
>
>     Another problem I have at the moment is with M-n w adding
>     '[weaved]' to the name of the file. First of all that causes a
>     proliferation of files, secondly clicking on the icon to view any
>     resulting pdf causes a file not found error because the file name
>     looked for doesn't have '[weaved]' added to it.
>
>     (To be totally unreasonable, the choice of the word 'weaved' to be
>     added to the file name grates on me like finger nails on a
>     blackboard. The appropriate adjective for an object which has been
>     created by weaving is 'woven'.)
>
>     So. Can anyone explain to me how to process a .Rnw file and view
>     the resulting pdf? Also, how to stop the addition of [weaved] to
>     the file name?
>
>     Failing that, can anyone explain how to modify auto-mode-alist so
>     that instead of polymode, it invokes the old noweb where there is
>     a menu and M-n s and M-n P work as before, and I can tangle a
>     file? I am afraid that I just don't get lisp programming, so words
>     of one syllable how to do that would be good.
>
>     Finally, despite what appears above, let me say that I am grateful
>     to Vitalie and all the other ESS developers, and in no way wish to
>     disparage their efforts. ESS with AUCTeX is just *the* best
>     environment for R and TeX and is hugely important to me. Thanks to
>     Vince also for his distribution.
>
>     David Scott
>
>     -- 
>     _________________________________________________________________
>     David Scott     Department of Statistics
>                     The University of Auckland, PB 92019
>                     Auckland 1142,    NEW ZEALAND
>     Phone: +64 9 923 5055 <tel:%2B64%209%20923%205055>, or +64 9 373
>     7599 ext 85055 <tel:%2B64%209%20373%207599%20ext%2085055>
>     Email: d.scott using auckland.ac.nz <mailto:d.scott using auckland.ac.nz>,
>     Fax: +64 9 373 7018 <tel:%2B64%209%20373%207018>
>
>     ______________________________________________
>     ESS-help using r-project.org <mailto:ESS-help using r-project.org> mailing list
>     https://stat.ethz.ch/mailman/listinfo/ess-help
>
>

-- 
_________________________________________________________________
David Scott	Department of Statistics
		The University of Auckland, PB 92019
		Auckland 1142,    NEW ZEALAND
Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055
Email:	d.scott using auckland.ac.nz,  Fax: +64 9 373 7018


	[[alternative HTML version deleted]]




More information about the ESS-help mailing list