[ESS] github flavor
Ahmadou Dicko
d|cko@@hm@dou @end|ng |rom gm@||@com
Sun Feb 13 17:41:37 CET 2022
Hi Stephen,
I got some issues as well, I don't recall exactly the error messages.
I finally decided to markdown-mode used by polymode instead of polymode
directly.
I have something like that for markdown
(use-package markdown-mode
:ensure t
:config
(setq markdown-enable-math t)
(setq markdown-code-block-braces t)
(setq markdown-gfm-use-electric-backquote nil)
(setq markdown-fontify-code-blocks-natively t)
(setq markdown-asymmetric-header t)
(setq markdown-header-scaling t)
(setq markdown-header-scaling-values '(1.73 1.44 1.2 1.0 1.0 1.0))
(markdown-update-header-faces markdown-header-scaling
markdown-header-scaling-values)
(add-hook 'gfm-mode-hook 'variable-pitch-mode)
(add-hook 'markdown-mode-hook 'outline-minor-mode)
:mode (("\\.markdown\\'" . gfm-mode)
("\\.md\\'" . gfm-mode)))
I hope it works for you too and would love to see if there's another
approach.
Best,
Ahmadou
On Sat, Feb 12, 2022 at 10:56 PM Stephen Bond via ESS-help <
ess-help using r-project.org> 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
>
--
Ahmadou H. DICKO, PhD
Statistical consultant
Mobile: (+221) 77 123 81 69
Skype: dicko.ahmadou.h
Twitter : @dickoah
Gitlab: gitlab/dickoa
Github: github/dickoa
[[alternative HTML version deleted]]
More information about the ESS-help
mailing list