[ESS] github flavor
Stephen Bond
@tephen@cbond @end|ng |rom y@hoo@com
Mon Feb 14 04:20:08 CET 2022
Jeremie,
Thank you for the tip. I need to create something like a light-weight statistical paper for my vetting department and I am already deep enough in using rmarkdown. The gfm is a very minor thing, but I was puzzled that following the tutorial did not work and decided to ask the question. The author is responding.
Cheers
S.
On Sunday, February 13, 2022, 03:42:33 AM EST, Jeremie Juste <jeremiejuste using gmail.com> wrote:
Hello Stephen,
I'm not sure if I'll be of any help, and forgive me if I failed to
understand the context in which you want to use polymode. Have you
considered org-mode as an alternative to poly-mode?
Org-mode is very easy to setup and your documents can easily be exported to
github flavored mark-down should you need to do that.
Greg Minshall [0] has a good introduction to ESS and Org-mode.
The github flavoured md is called ox-gfm and is available on
melpa. Although it might seem old, it is still fully functional.
[0] https://ess-intro.github.io/
[1] https://github.com/larstvei/ox-gfm
Hope this helps,
Jeremie
On Saturday, 12 Feb 2022 at 17:56, Stephen Bond via ESS-help wrote:
> Hello,
>
> I am trying to activate the github flavor by:
>
> (add-to-list 'auto-mode-alist
> '("\\.[rR]md\\'" . poly-gfm+r-mode))
>
> as described in
> https://plantarum.ca/2021/10/03/emacs-tutorial-rmarkdown/
>
> and get an error:
> File mode specification error: (void-function poly-gfm+r-mode)
>
> I have the following in my .emacs
>
> (defun rmd-mode ()
> "ESS Markdown mode for rmd files"
> (interactive)
> ;; (setq load-path
> ;; (append (list "path/to/polymode/" "path/to/polymode/modes/")
> ;; load-path))
> (require 'poly-R)
> (require 'poly-markdown)
> (poly-markdown+r-mode))
> (add-to-list 'auto-mode-alist '("\\.md" . poly-markdown-mode))
> (add-to-list 'auto-mode-alist '("\\.Snw" . poly-noweb+r-mode))
> (add-to-list 'auto-mode-alist '("\\.Rnw" . poly-noweb+r-mode))
> ;; I commented out to emable gfm, markdown+r works
> ;;(add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode))
> ;; associate the new polymode to Rmd files:
> (add-to-list 'auto-mode-alist
> '("\\.[rR]md\\'" . poly-gfm+r-mode))
>
> (custom-set-variables
> '(markdown-command
> (concat "pandoc" " --from=markdown --to=html" " --standalone --
> mathjax --highlight-style=pygments"))
> '(org-agenda-files '("~/1.org"))
> '(package-selected-packages '(markdown-mode poly-R poly-markdown poly-
> org polymode ess))
> '(poly-pandoc-exporter
> #s(pm-shell-exporter unbound "pandoc" nil nil nil pm-default-shell-
> export-function pm-default-shell-export-sentinel nil)))
>
> I am afraid there is a conflict somewhere.
> Please, advise how to cleanup my setup.
> Thanks
> Stephen
>
> ______________________________________________
> ESS-help using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
[[alternative HTML version deleted]]
More information about the ESS-help
mailing list