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
       (require 'poly-R)
       (require 'poly-markdown)
       (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")
  (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?

  • 1
    Have you installed the package poly-R?
    – Tyler
    Feb 15, 2019 at 15:45
  • 1
    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. Feb 15, 2019 at 16:06

1 Answer 1


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 Feb 15, 2019 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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