[ESS] Emacs, ESS and Rmarkdown: Is this the way compile, is supposed to work?
Manuel Teodoro
teoten @end|ng |rom gm@||@com
Thu May 11 08:55:21 CEST 2023
Hi Kevin,
I was trying to reproduce your error but somehow, I cannot manage. Thus, I
did a quick search and found the following link
https://github.com/polymode/poly-markdown/issues/2
They report some kind of similar error. The suggestion is the following:
>>>
I solve it by installing polymode. Please check whether polymode is
installed correctly.
1. M+x package-list-packages
2. C+s search polymode and check if it's installed correctly.
If it doesn't solve the problem, try to Install poly-markdown through
github:
git clone https://github.com/polymode/poly-markdown
Add following to your .emacs
;;poly-markdown
(setq load-path
(append '("path/to/vc/dir/polymode/" "path/to/vc/dir/poly-markdown/")
load-path))
(require 'poly-markdown)
(add-to-list 'auto-mode-alist '("\.md" . poly-markdown-mode))
Hope this help!
<<<
So, maybe you can try to check if this issue, or some other similar issue
in the github repo can help you solve your problem. You could also try to
open an issue directly there, in the repo, since your problem is more
related to polymode than to ESS you might find more useful advice there.
Unfortunately, I don't think I can help you more, on one hand I don't fully
understand the error and on the other I cannot reproduce it to try and
debug it.
Good luck!
Manuel
On Mon, May 8, 2023 at 5:08 PM Kevin Zembower via ESS-help <
ess-help using r-project.org> wrote:
> Hi, Manuel, thanks, again for your patience and help.
>
> I made the changes that you suggested, but it generated an error. This
> appeared in the Backtrace window when I tried to create a non-existant
> (new) markdown file called test.md as soon as I started Emacs:
>
> Debugger entered--Lisp error: (invalid-slot-name "#<pm-polymode
> latex-root>" :lighter)
> signal(invalid-slot-name ("#<pm-polymode latex-root>" :lighter))
> slot-missing(#<pm-polymode latex-root> :lighter oref)
> eieio-oref(#<pm-polymode latex-root> :lighter)
>
>
> byte-code("\302\303!\210\304\305\306\1J\307\"\304\310\4!\204X\0\3\262\1\2J\304\211\2\203V\0\311\3\312\"\205(\0\306\3\312\"\262\2\19\203@\0\310\2J..."
>
> [polymode-mode-map poly-noweb-mode-map make-variable-buffer-local
> poly-noweb-mode nil poly-latex-root-polymode eieio-oref :lighter keymapp
> slot-boundp :map :parent-instance append (lambda (def-tmp-var) (defvar
> poly-noweb-mode-map def-tmp-var "Keymap for noweb polymode."))
> easy-mmode-define-keymap :inherit defalias #f(compiled-function
> (&optional arg) "noweb polymode.\n\n\\{poly-noweb-mode-map}"
> (interactive nil) #<bytecode 0x157a7241f2b5>) add-minor-mode] 11)
> require(poly-noweb)
>
> byte-code("\300\301!\210\300\302!\210\300\303\304\305#\210\306\307\304\310\311\301%\210\312\313\314\315\316DD\317\311\307\320\321&\7\210\300\322!\210\323\324\325\304#\210\326\211\203..."
>
> [require polymode ess-mode ess-r-mode nil t custom-declare-group poly-R
> "Settings for poly-R polymodes" :group custom-declare-variable
> poly-r-root-polymode funcall function #f(compiled-function () #<bytecode
> 0x157a72385f7d>) "Root polymode with R host intended to be inherited..."
> :type object poly-noweb defvaralias pm-inner/noweb-R
> poly-r-noweb-innermode (saved-value saved-variable-comment) put
> make-obsolete-variable "v0.2" makunbound] 8)
> require(poly-R)
> eval-buffer(#<buffer *load*> nil "/home/kevin/.emacs.d/init.el" nil
> t) ; Reading at buffer position 3377
> load-with-code-conversion("/home/kevin/.emacs.d/init.el"
> "/home/kevin/.emacs.d/init.el" t t)
> load("/home/kevin/.emacs.d/init" noerror nomessage)
> startup--load-user-init-file(#f(compiled-function () #<bytecode
> 0x157a7235af89>) #f(compiled-function () #<bytecode 0x157a7235afa1>) t)
> command-line()
> normal-top-level()
>
> Thanks for your advice with this. No worries about timely replies; I'm
> juggling a part-time retirement job with family activities, so I don't
> get a chance to play frequently with R.
>
> -Kevin
>
> On 5/6/23 06:00, ess-help-request using r-project.org wrote:
> > Message: 1
> > Date: Fri, 5 May 2023 16:50:07 +0200
> > From: Manuel Teodoro<teoten using gmail.com>
> > To: Kevin Zembower<kevin using zembower.org>
> > Cc:"ess-help using r-project.org" <ess-help using r-project.org>
> > Subject: Re: [ESS] Emacs, ESS and Rmarkdown: Is this the way compile
> > is supposed to work?
> > Message-ID:
> > <
> CAEPjrYEymE3TCQbemNiXYs7YtcKNC5H8Yvbrd-BDh5Ay698J2A using mail.gmail.com>
> > Content-Type: text/plain; charset="utf-8"
> >
> > Hi Kevin,
> >
> > First of all, sorry for the late reply, I was OOO for a couple of weeks
> and
> > I didn't have my laptop with me.
> >
> > Anyway, I was trying to follow up with your init file but it has a couple
> > of things that, in my opinion, might be redundant or not necessary, and I
> > am not sure if silly mistakes there could not be conflicting with the
> > proper function of poly-R and markdown.
> >
> > For starters, could you comment all the part of the init file that
> relates
> > to RMarkdown (what you shared above) and add instead the following few
> > lines:
> >
> > ===
> > (require 'polymode)
> > (require 'poly-R)
> > (require 'poly-markdown)
> >
> > ;; MARKDOWN
> > (add-to-list 'auto-mode-alist '("\\.md" . poly-markdown-mode))
> >
> > ;; R modes
> > (add-to-list 'auto-mode-alist '("\\.Rnw" . poly-noweb+r-mode))
> > (add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode))
> > ===
> >
> > Then, try opening and working with an ".Rmd" file but please, also test
> > with an ".md" file, plain markdown. If both work, congratulations.
> > Otherwise, let me know what kind of errors you get with each type of
> file.
> > We want to identify first if the problem is Rmd or markdown as a whole.
> > Long time ago I got the problem that one of my Linux systems did not have
> > any markdown parser installed and that was giving me problems, of course
> > external to emacs but hard to identify.
> >
> > Let me know and, since I'm back in the office, I'll try to reply faster
> > this time.
> >
> > All the best
> > Manuel
>
>
> ______________________________________________
> 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