I am trying to help even though I know little: I used the approach in https://plantarum.ca/2021/10/03/emacs-tutorial-rmarkdown/ > The main function you need for this is polymode-export, bound to M-n > e. > > The first time you run this, you’ll be asked which exporter you would > like to use. There are two choices, markdown and markdown-ess.
So, if you choose markdown it will ask for format and then you can type pdf or html, it will weave and then look for pandoc. I have this in my .emacs '(markdown-command (concat "pandoc" " --from=markdown --to=html" " --standalone -- mathjax --highlight-style=pygments")) You can see that it ignores the to=html and asks me every time. It also igonres the title section, where I specify the output format. So, it looks like polymode does not know how to read the title/yaml, but that is not a big deal as you can set that in the dialog after M-n e Cheers Stephen On Wed, 2022-09-07 at 17:03 -0400, Vincent Goulet via ESS-help wrote: > Hi all, > > A large part of my work in Emacs involves editing Sweave (.Rnw) > files. I was very much used to the tried, tested and true ess-noweb > mode for this purpose. > > Now, in the development version of ESS that is required for Emacs 28, > all the noweb stuff was gutted out and we're told to use polymode > instead. For one thing, I think it's a pity that such fundamental > interaction between R and Emacs (wasn't the whole concept of Sweave > based off Emacs functionality?) is no longer part of ESS. I'd > certainly vote for the return of noweb files support. (I understand > that polymode brought improved support for RMarkdown files.) > > I'm probably late to the party, but can anyone give me a primer on > polymode for Rnw files? (Not Rmd files, some oldies like me still > rely on LaTeX and Sweave -- not even knitr!) > > I followed the polymode installation instructions and added the > 'mode: poly-noweb' file variable to a .Rnw file. If I do 'M-n w' or > 'M-n e' (what's the difference?), I'm first asked to select a weaver > or an exporter. What's the answer? Pressing TAB does not offer any > choice. > > What if I just want to compile the LaTeX file? In Emacs 27, ESS was > connected to AUCTeX and the weave step was integrated into the > compilation step (C-c C-c). Anything as streamlined with polymode? > > I also stumble into the following issues. First, as soon as I try to > do anything in a .Rnw file, I get these error messages: > > Error during redisplay: (internal--syntax-propertize 2) signaled > (error "Variable binding depth exceeds max-specpdl-size") > Error running timer ‘show-paren-function’: (error "internal--syntax- > propertize did not move syntax-propertize--done") > > Second, I ended up a few times with the following markers at the end > of the file name in the modeline and in the mode display: HeadTail. > I'm not too sure how to reproduce, but does this ring any bell here? > > System info: > Emacs Modified for macOS 28.1-modified-1, based on > GNU Emacs 28.1 (build 1, aarch64-apple-darwin21.1.0, NS appkit- > 2113.00 Version 12.0.1 (Build 21A559)) of 2022-05-11 > polymode 0.2.2 installed through MELPA > > Thanks in advance! > > v. > ______________________________________________ > ESS-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help ______________________________________________ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help