Polymode weaving with knitr-ess - don't want "woven" in tex filename

Viewed 218

I am pretty new to emacs and have been used to using Sweave in earlier releases. Now I have been using polymode and weaving using knitr-ess. However, I would like to do two customisations.

  1. I want the name of the resulting weaving to be the same as the file name - i.e. not "filename_woven.tex"
  2. I do not want the output tex file to pop up in a separat buffer in emacs.

I started to look for changing the polymode-weave.el file, but that did not work. Any ideas?

1 Answers

In general, you can customize Polymode options interactively via M-x customize-groups RET polymode. This will take you to the parent group for all Polymode options which includes the "Polymode Export" and "Polymode Weave" groups.

  1. You can navigate to the "Polymode Weave" options and change the default option in "Polymode Weaver Output File Format" from %s-woven to simply %s to get rid of the "woven" bit. Alternatively, you can add the following line to your .emacs file:
  (setq polymode-weaver-output-file-format "%s")

If you want to get rid of the "exported" bit as well, you can make a similar change as above in the "Polymode Export" group option "Polymode Exporter Output File Format", or add the following to your .emacs:

  (setq polymode-exporter-output-file-format "%s")
  1. The parent Polymode options group includes an option called "Polymode Display Output File" which you can change to nil to not display the output file. As before, you can just add a line to your .emacs as an alternative:
  (setq polymode-display-output-file nil)
Related