1

I am trying to setup ESS with polymode and poly-markdown

I have the following in my myinit.org file which becomes compiled into init.el

;; https://polymode.github.io/installation/
     (use-package poly-markdown
       :ensure t)

;; https://github.com/vspinu/polymode
(use-package polymode
       :diminish (poly-org-mode
              poly-markdown-mode
              poly-noweb+r-mode
              poly-noweb+r-mode
              poly-markdown+r-mode
              poly-rapport-mode
              poly-html+r-mode
              poly-brew+r-mode
              poly-r+c++-mode
              poly-c++r-mode)
       :init
       (require 'poly-R)
       (require 'poly-markdown)
       :config
       (add-to-list 'auto-mode-alist '("\\.md$" . poly-markdown-mode))
       (add-to-list 'auto-mode-alist '("\\.Rmd$" . poly-markdown+r-mode))
       (add-to-list 'auto-mode-alist '("\\.Rcpp$" . poly-r+c++-mode))
       (add-to-list 'auto-mode-alist '("\\.cppR$" . poly-c++r-mode))
       )

When restarting and loading my emacs I keep getting the error:

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "poly-R")
  require(poly-R)
  (progn (require 'poly-R) (require 'poly-markdown))
  (condition-case err (progn (require 'poly-R) (require 'poly-markdown)) ((debug error) (funcall use-package--warning73 :init err)))
  (progn (condition-case err (progn (require 'poly-R) (require 'poly-markdown)) ((debug error) (funcall use-package--warning73 :init err))) (if (not (require 'polymode nil t)) (display-warning 'use-package (format "Cannot load %s" 'polymode) :error) (condition-case err (progn (add-to-list 'auto-mode-alist '("\\.md$" . poly-markdown-mode)) (add-to-list 'auto-mode-alist '("\\.Rmd$" . poly-markdown+r-mode))

There is more to the error message, but not sure why the issue is occurring with poly-R.

Could anyone please assist to resolve this issue?

  • Have you installed the package poly-R? – Tyler Feb 15 at 15:45
  • Ah, adding in ` (use-package poly-R :ensure t)` worked! I thought it was being installed in the above statement but did not realize that I had to install it separately like the polymarkdown package. Thanks for your help. If you put this as an answer I can mark it correct as it helped me. – user4687531 Feb 15 at 16:06
0

Installing polymode doesn't automatically install all the related modes that it uses to support different languages. The error message you see, "No such file or directory" "poly-R")" is a clue that the poly-R package doesn't exist on your system, so you need to install is before you can require it.

  • Thanks - I appreciate the details here as a newbie into the emacs world – user4687531 Feb 15 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.