From kev|n @end|ng |rom zembower@org Sat Apr 15 21:21:30 2023 From: kev|n @end|ng |rom zembower@org (=?UTF-8?Q?Kevin_Zembower?=) Date: Sat, 15 Apr 2023 19:21:30 +0000 Subject: [ESS] Emacs, ESS and Rmarkdown: Is this the way compile is supposed to work? References: <833f8a62-fc6e-d734-5afc-16830faa9845@zembower.org> Message-ID: <01000187865d8c2f-9d96f6b6-f66d-49fc-b4b8-eca0eddad4b8-000000@email.amazonses.com> I'm trying to get Emacs, ESS and Rmarkdown to work together for the first time. Therefore, the problem might be me, and not the software. I have this program as Prob_11.Rmd: ====================================================== --- title: "Problem 11, Page 414" author: "Kevin" date: "13 Apr 2023" output: html_document --- ### Load the sample data ### Loading the sample data table into two vectors: ``` {r} (age11 <- c(18, 10, 3, 15, 12, 14, 15, 4, 20, 8)) (age16 <- c(6, 7, 14, 5, 14, 12, 3, 9, 4, 7)) ``` ======================================================== I get this as output after choosing Markdown->Preview & Export->Compile: ========================================================= *markdown-output*

Load the sample data

Loading the sample data table into two vectors:


(age11 <- c(18, 10, 3, 15, 12, 14, 15, 4, 20, 8))

(age16 <- c(6, 7, 14, 5, 14, 12, 3, 9, 4, 7))
========================================================== This looks correct, except that I was expecting the last two lines to look like: > (age11 <- c(18, 10, 3, 15, 12, 14, 15, 4, 20, 8)) [1] 18 10 3 15 12 14 15 4 20 8 > (age16 <- c(6, 7, 14, 5, 14, 12, 3, 9, 4, 7)) [1] 6 7 14 5 14 12 3 9 4 7 Am I doing something wrong? Am I misunderstanding what RMarkdown is doing? I tried options like 'echo=TRUE' and 'eval=TRUE' without success. Thanks for any advice or guidance. I posted this request on stackoverflow.com, at https://stackoverflow.com/questions/76014830/emacs-ess-and-rmarkdown-is-this-the-way-compile-is-supposed-to-work, but didn't get any response. -Kevin From edd @end|ng |rom deb|@n@org Sun Apr 16 04:23:17 2023 From: edd @end|ng |rom deb|@n@org (Dirk Eddelbuettel) Date: Sat, 15 Apr 2023 21:23:17 -0500 Subject: [ESS] Emacs, ESS and Rmarkdown: Is this the way compile is supposed to work? In-Reply-To: <01000187865d8c2f-9d96f6b6-f66d-49fc-b4b8-eca0eddad4b8-000000@email.amazonses.com> References: <833f8a62-fc6e-d734-5afc-16830faa9845@zembower.org> <01000187865d8c2f-9d96f6b6-f66d-49fc-b4b8-eca0eddad4b8-000000@email.amazonses.com> Message-ID: <25659.23573.104333.907933@rob.eddelbuettel.com> On 15 April 2023 at 19:21, Kevin Zembower via ESS-help wrote: | I'm trying to get Emacs, ESS and Rmarkdown to work together for the | first time. Therefore, the problem might be me, and not the software. | | I have this program as Prob_11.Rmd: | ====================================================== | --- | title: "Problem 11, Page 414" | author: "Kevin" | date: "13 Apr 2023" | output: html_document | --- | | ### Load the sample data ### | | Loading the sample data table into two vectors: | | ``` {r} | | (age11 <- c(18, 10, 3, 15, 12, 14, 15, 4, 20, 8)) | | (age16 <- c(6, 7, 14, 5, 14, 12, 3, 9, 4, 7)) | | ``` | ======================================================== | | I get this as output after choosing Markdown->Preview & Export->Compile: | ========================================================= | | | | | | | *markdown-output* | | | | | | |

Load the sample data

|

Loading the sample data table into two vectors:

|

| (age11 <- c(18, 10, 3, 15, 12, 14, 15, 4, 20, 8))
| 
| (age16 <- c(6, 7, 14, 5, 14, 12, 3, 9, 4, 7))
| 
| | | | ========================================================== | | This looks correct, except that I was expecting the last two lines to | look like: | | > (age11 <- c(18, 10, 3, 15, 12, 14, 15, 4, 20, 8)) | [1] 18 10 3 15 12 14 15 4 20 8 | > (age16 <- c(6, 7, 14, 5, 14, 12, 3, 9, 4, 7)) | [1] 6 7 14 5 14 12 3 9 4 7 | | Am I doing something wrong? Am I misunderstanding what RMarkdown is | doing? I tried options like 'echo=TRUE' and 'eval=TRUE' without success. | | Thanks for any advice or guidance. I posted this request on | stackoverflow.com, at | https://stackoverflow.com/questions/76014830/emacs-ess-and-rmarkdown-is-this-the-way-compile-is-supposed-to-work, | but didn't get any response. Actually, I did respond with this comment https://stackoverflow.com/questions/76014830/emacs-ess-and-rmarkdown-is-this-the-way-compile-is-supposed-to-work#comment134066087_76014830 I believe you are confusing Markdown (no R) with support from Emacs (but no connection to R) with what you desire for RMarkdown. I responded that I happen to do this differently via M-x compile-command and script to render RMarkdown. Anyway, this is the right list and there likely is a function from ESS too. If so someone will likely offer advice. Good luck, Dirk -- dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org From kev|n @end|ng |rom zembower@org Thu Apr 20 18:11:37 2023 From: kev|n @end|ng |rom zembower@org (=?UTF-8?Q?Kevin_Zembower?=) Date: Thu, 20 Apr 2023 16:11:37 +0000 Subject: [ESS] Fwd: Emacs, ESS and Rmarkdown: Is this the way compile is supposed to work? In-Reply-To: <833f8a62-fc6e-d734-5afc-16830faa9845@zembower.org> References: <833f8a62-fc6e-d734-5afc-16830faa9845@zembower.org> <22e27847-7047-8725-a232-36f4c12c7a38@zembower.org> Message-ID: <010001879f6f7ef4-1fe27b08-2096-4518-9af9-9d9feed3cce7-000000@email.amazonses.com> Thanks to Dirk Eddelbuettel's suggestion of his render.r executable, I was able to boil it down to the commands I need to render the Rmarkdown. I run this _once_ in the R console window of Emacs running ESS: library(rmarkdown) Then, everytime I want to update the document I'm working on, I run: render("working_file.Rmd") For me, that outputs an HTML document, that I view in my browser. I feel certain that there's a better, easier way to do this, in the Emacs/ESS/poly-R/Rmarkdown system, but this is what I needed to get me unstuck, and until I have some time to spare, this is as far as I'm taking it. Thanks, again, for the help. -Kevin -------- Forwarded Message -------- Subject: Emacs, ESS and Rmarkdown: Is this the way compile is supposed to work? Date: Sat, 15 Apr 2023 15:21:26 -0400 From: Kevin Zembower To: ess-help at r-project.org I'm trying to get Emacs, ESS and Rmarkdown to work together for the first time. Therefore, the problem might be me, and not the software. I have this program as Prob_11.Rmd: ====================================================== --- title: "Problem 11, Page 414" author: "Kevin" date: "13 Apr 2023" output: html_document --- ### Load the sample data ### Loading the sample data table into two vectors: ``` {r} (age11 <- c(18, 10, 3, 15, 12, 14, 15, 4, 20, 8)) (age16 <- c(6, 7, 14, 5, 14, 12, 3, 9, 4, 7)) ``` ======================================================== I get this as output after choosing Markdown->Preview & Export->Compile: ========================================================= *markdown-output*

Load the sample data

Loading the sample data table into two vectors:


(age11 <- c(18, 10, 3, 15, 12, 14, 15, 4, 20, 8))

(age16 <- c(6, 7, 14, 5, 14, 12, 3, 9, 4, 7))
========================================================== This looks correct, except that I was expecting the last two lines to look like: > (age11 <- c(18, 10, 3, 15, 12, 14, 15, 4, 20, 8)) [1] 18 10 3 15 12 14 15 4 20 8 > (age16 <- c(6, 7, 14, 5, 14, 12, 3, 9, 4, 7)) [1] 6 7 14 5 14 12 3 9 4 7 Am I doing something wrong? Am I misunderstanding what RMarkdown is doing? I tried options like 'echo=TRUE' and 'eval=TRUE' without success. Thanks for any advice or guidance. I posted this request on stackoverflow.com, at https://stackoverflow.com/questions/76014830/emacs-ess-and-rmarkdown-is-this-the-way-compile-is-supposed-to-work, but didn't get any response. -Kevin From ty|er @end|ng |rom p|@nt@rum@c@ Thu Apr 20 19:55:19 2023 From: ty|er @end|ng |rom p|@nt@rum@c@ (Tyler Smith) Date: Thu, 20 Apr 2023 13:55:19 -0400 Subject: [ESS] Fwd: Emacs, ESS and Rmarkdown: Is this the way compile is supposed to work? In-Reply-To: <010001879f6f7ef4-1fe27b08-2096-4518-9af9-9d9feed3cce7-000000@email.amazonses.com> References: <833f8a62-fc6e-d734-5afc-16830faa9845@zembower.org> <22e27847-7047-8725-a232-36f4c12c7a38@zembower.org> <010001879f6f7ef4-1fe27b08-2096-4518-9af9-9d9feed3cce7-000000@email.amazonses.com> Message-ID: <98fe4222-3e4f-408a-8773-bde2cf87b354@app.fastmail.com> Hi Kevin, You should be able to do what you want directly from the `.Rmd` buffer. I posted a tutorial here: https://plantarum.ca/2021/10/03/emacs-tutorial-rmarkdown/ With the right packages installed, from the .Rmd buffer you can export your file with `M-n e`, select `markdown` and `html` when prompted, and the html will be generated and opened in a web browser. The tutorial walks you through the steps in more detail. Best, Tyler -- plantarum.ca On Thu, Apr 20, 2023, at 12:11 PM, Kevin Zembower via ESS-help wrote: > Thanks to Dirk Eddelbuettel's suggestion of his render.r executable, I > was able to boil it down to the commands I need to render the Rmarkdown. > > I run this _once_ in the R console window of Emacs running ESS: > library(rmarkdown) > > Then, everytime I want to update the document I'm working on, I run: > render("working_file.Rmd") > > For me, that outputs an HTML document, that I view in my browser. > > I feel certain that there's a better, easier way to do this, in the > Emacs/ESS/poly-R/Rmarkdown system, but this is what I needed to get me > unstuck, and until I have some time to spare, this is as far as I'm > taking it. > > Thanks, again, for the help. > > -Kevin > > > -------- Forwarded Message -------- > Subject: Emacs, ESS and Rmarkdown: Is this the way compile is supposed > to work? > Date: Sat, 15 Apr 2023 15:21:26 -0400 > From: Kevin Zembower > To: ess-help at r-project.org > > I'm trying to get Emacs, ESS and Rmarkdown to work together for the > first time. Therefore, the problem might be me, and not the software. > > I have this program as Prob_11.Rmd: > ====================================================== > --- > title: "Problem 11, Page 414" > author: "Kevin" > date: "13 Apr 2023" > output: html_document > --- > > ### Load the sample data ### > > Loading the sample data table into two vectors: > > ``` {r} > > (age11 <- c(18, 10, 3, 15, 12, 14, 15, 4, 20, 8)) > > (age16 <- c(6, 7, 14, 5, 14, 12, 3, 9, 4, 7)) > > ``` > ======================================================== > > I get this as output after choosing Markdown->Preview & Export->Compile: > ========================================================= > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > > > > > *markdown-output* > > > > > > >

Load the sample data

>

Loading the sample data table into two vectors:

>

> (age11 <- c(18, 10, 3, 15, 12, 14, 15, 4, 20, 8))
>
> (age16 <- c(6, 7, 14, 5, 14, 12, 3, 9, 4, 7))
> 
> > > > ========================================================== > > This looks correct, except that I was expecting the last two lines to > look like: > >> (age11 <- c(18, 10, 3, 15, 12, 14, 15, 4, 20, 8)) > [1] 18 10 3 15 12 14 15 4 20 8 >> (age16 <- c(6, 7, 14, 5, 14, 12, 3, 9, 4, 7)) > [1] 6 7 14 5 14 12 3 9 4 7 > > Am I doing something wrong? Am I misunderstanding what RMarkdown is > doing? I tried options like 'echo=TRUE' and 'eval=TRUE' without success. > > Thanks for any advice or guidance. I posted this request on > stackoverflow.com, at > https://stackoverflow.com/questions/76014830/emacs-ess-and-rmarkdown-is-this-the-way-compile-is-supposed-to-work, > but didn't get any response. > > -Kevin > > > ______________________________________________ > ESS-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help From kev|n @end|ng |rom zembower@org Fri Apr 21 16:58:59 2023 From: kev|n @end|ng |rom zembower@org (=?UTF-8?Q?Kevin_Zembower?=) Date: Fri, 21 Apr 2023 14:58:59 +0000 Subject: [ESS] Emacs, ESS and Rmarkdown: Is this the way compile is supposed to work? In-Reply-To: References: <06938e92-181d-4ab5-1ce1-76dea4aea933@zembower.org> Message-ID: <01000187a4535e1a-3ba4c995-c8a0-4e25-bfad-c775343baf5e-000000@email.amazonses.com> Tyler, thanks for your response. I had found your website while searching for a solution to my problem. Currently, I have this in my .emacs.d/init.el file: (setq load-path (append '("~/.emacs.d/polymode/" "~/.emacs.d/polymode/modes") load-path)) (require 'poly-R) (require 'poly-markdown) (add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode)) This has been working for me without error so far. I commented out the last line and added this one: (add-to-list 'auto-mode-alist '("\\.[rR]md\\'" . poly-gfm+r-mode)) When I save my init.el file and restart Emacs with a .Rmd file, I get this error message: File mode specification error: (void-function poly-gfm+r-mode) Package cl is deprecated I'm using GNU Emacs 27.1, with rmarkdown 2.21. I'm not able to install or find a poly-R or polymode package for this version of R Any ideas what I'm doing wrong? Thanks for any help and guidance. -Kevin On 4/21/23 06:00, ess-help-request at r-project.org wrote: > Message: 2 > Date: Thu, 20 Apr 2023 13:55:19 -0400 > From: "Tyler Smith" > To: ESS-help > Subject: Re: [ESS] Fwd: Emacs, ESS and Rmarkdown: Is this the way > compile is supposed to work? > Message-ID:<98fe4222-3e4f-408a-8773-bde2cf87b354 at app.fastmail.com> > Content-Type: text/plain; charset="us-ascii" > > Hi Kevin, > > You should be able to do what you want directly from the `.Rmd` buffer. I posted a tutorial here: > > https://plantarum.ca/2021/10/03/emacs-tutorial-rmarkdown/ > > With the right packages installed, from the .Rmd buffer you can export your file with `M-n e`, select `markdown` and `html` when prompted, and the html will be generated and opened in a web browser. > > The tutorial walks you through the steps in more detail. > > Best, > > Tyler > > -- plantarum.ca From ty|er @end|ng |rom p|@nt@rum@c@ Fri Apr 21 17:09:43 2023 From: ty|er @end|ng |rom p|@nt@rum@c@ (Tyler Smith) Date: Fri, 21 Apr 2023 11:09:43 -0400 Subject: [ESS] Emacs, ESS and Rmarkdown: Is this the way compile is supposed to work? In-Reply-To: <01000187a4535e1a-3ba4c995-c8a0-4e25-bfad-c775343baf5e-000000@email.amazonses.com> References: <06938e92-181d-4ab5-1ce1-76dea4aea933@zembower.org> <01000187a4535e1a-3ba4c995-c8a0-4e25-bfad-c775343baf5e-000000@email.amazonses.com> Message-ID: Hi Kevin, If you have an older version of `poly-R`, the function `poly-gfm+r-mode` might not be present. This was added to `poly-R` dev in July 2021, I'm not sure exactly when it would have been added to the released version. If that's the case, updating to the current version of `poly-R` should fix the problem. Alternatively, you need the following code evaluated *after* `(require 'poly-R)` and *before* `(add-to-list ...)`: ``` (define-polymode poly-gfm+r-mode poly-markdown+r-mode :lighter " PM-Rmd(gfm)" :hostmode 'poly-gfm-hostmode) ``` But that really shouldn't be necessary. Best, Tyler -- plantarum.ca On Fri, Apr 21, 2023, at 10:58 AM, Kevin Zembower via ESS-help wrote: > Tyler, thanks for your response. I had found your website while > searching for a solution to my problem. > > Currently, I have this in my .emacs.d/init.el file: > (setq load-path (append '("~/.emacs.d/polymode/" > "~/.emacs.d/polymode/modes") load-path)) > (require 'poly-R) > (require 'poly-markdown) > (add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode)) > > This has been working for me without error so far. > > I commented out the last line and added this one: > (add-to-list 'auto-mode-alist > '("\\.[rR]md\\'" . poly-gfm+r-mode)) > > When I save my init.el file and restart Emacs with a .Rmd file, I get > this error message: > > File mode specification error: (void-function poly-gfm+r-mode) > Package cl is deprecated > > I'm using GNU Emacs 27.1, with rmarkdown 2.21. I'm not able to install > or find a poly-R or polymode package for this version of R > > Any ideas what I'm doing wrong? Thanks for any help and guidance. > > -Kevin > > > On 4/21/23 06:00, ess-help-request at r-project.org wrote: >> Message: 2 >> Date: Thu, 20 Apr 2023 13:55:19 -0400 >> From: "Tyler Smith" >> To: ESS-help >> Subject: Re: [ESS] Fwd: Emacs, ESS and Rmarkdown: Is this the way >> compile is supposed to work? >> Message-ID:<98fe4222-3e4f-408a-8773-bde2cf87b354 at app.fastmail.com> >> Content-Type: text/plain; charset="us-ascii" >> >> Hi Kevin, >> >> You should be able to do what you want directly from the `.Rmd` buffer. I posted a tutorial here: >> >> https://plantarum.ca/2021/10/03/emacs-tutorial-rmarkdown/ >> >> With the right packages installed, from the .Rmd buffer you can export your file with `M-n e`, select `markdown` and `html` when prompted, and the html will be generated and opened in a web browser. >> >> The tutorial walks you through the steps in more detail. >> >> Best, >> >> Tyler >> >> -- plantarum.ca > > > ______________________________________________ > ESS-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help From kev|n @end|ng |rom zembower@org Sun Apr 23 19:15:52 2023 From: kev|n @end|ng |rom zembower@org (=?UTF-8?Q?Kevin_Zembower?=) Date: Sun, 23 Apr 2023 17:15:52 +0000 Subject: [ESS] Emacs, ESS and Rmarkdown: Is this the way compile is supposed to work? In-Reply-To: References: <7af7053e-bd6b-5892-3d41-ed2d42f6ae4f@zembower.org> Message-ID: <01000187af1d65fd-756b65a1-1444-41ab-8e22-4ddd69696ad8-000000@email.amazonses.com> Tyler, thanks again for your help. I'm sorry to burden you with my problems, but I'm stuck again. I think I have everything installed and up to date. Here's an excerpt from M-x package-list-packages: markdown-mode 20220212.728 installed Major mode for Markdown-formatted text poly-R 20230416.1454 installed Various polymodes for R language poly-markdown 20230202.1210 installed Polymode for markdown-mode poly-noweb 20200316.1315 installed Polymode for noweb polymode 20230317.1218 installed Extensible framework for multiple major modes With the exception of poly-noweb, they're all 2023 packages. Yet, when I open an *.Rmd file, I get this in the Messages buffer: File mode specification error: (error Autoloading file /home/kevin/.emacs.d/polymode/modes/poly-R.el failed to define function poly-gfm+r-mode) Package cl is deprecated I then added your alternative define-polymode section, and the error about poly-gfm+r-mode went away, but I still have this message in the Messages buffer when I start Emacs with an *.Rmd file: File mode specification error: (cl-no-applicable-method clone nil) Package cl is deprecated I can't find a reference to a 'cl' package in my init.el. In addition, the *.Rmd file is in Fundamental mode, and not ESS or poly-R mode. When I try to manually invoke the poly mode, with 'M-x poly-gfm+r-mode', I get the message: cl-no-applicable-method: No applicable method: clone, nil Any ideas what's going on with my system? I'm so worried I'm just making a hash of things with these changes. Thanks for any advice or guidance. -Kevin On 4/22/23 06:00, ess-help-request at r-project.org wrote: > ------------------------------ > > Message: 2 > Date: Fri, 21 Apr 2023 11:09:43 -0400 > From: "Tyler Smith" > To: ESS-help > Subject: Re: [ESS] Emacs, ESS and Rmarkdown: Is this the way compile > is supposed to work? > Message-ID: > Content-Type: text/plain; charset="us-ascii" > > Hi Kevin, > > If you have an older version of `poly-R`, the function `poly-gfm+r-mode` might not be present. This was added to `poly-R` dev in July 2021, I'm not sure exactly when it would have been added to the released version. > > If that's the case, updating to the current version of `poly-R` should fix the problem. > > Alternatively, you need the following code evaluated*after* `(require 'poly-R)` and*before* `(add-to-list ...)`: > > ``` > (define-polymode poly-gfm+r-mode poly-markdown+r-mode > :lighter " PM-Rmd(gfm)" > :hostmode 'poly-gfm-hostmode) > ``` > > But that really shouldn't be necessary. > > Best, > > Tyler > -- plantarum.ca From j@cobk@@per @end|ng |rom gm@||@com Sun Apr 23 19:34:25 2023 From: j@cobk@@per @end|ng |rom gm@||@com (Jacob Kasper) Date: Sun, 23 Apr 2023 17:34:25 +0000 Subject: [ESS] Emacs, ESS and Rmarkdown: Is this the way compile is supposed to work? In-Reply-To: <01000187af1d65fd-756b65a1-1444-41ab-8e22-4ddd69696ad8-000000@email.amazonses.com> References: <7af7053e-bd6b-5892-3d41-ed2d42f6ae4f@zembower.org> <01000187af1d65fd-756b65a1-1444-41ab-8e22-4ddd69696ad8-000000@email.amazonses.com> Message-ID: For package cl is depreciated you can read this thread. I don't think this is causing any issues with markdown. https://www.reddit.com/r/emacs/comments/zslyem/package_cl_is_deprecated_debugging/ On Sun, Apr 23, 2023, 17:16 Kevin Zembower via ESS-help < ess-help at r-project.org> wrote: > Tyler, thanks again for your help. > > I'm sorry to burden you with my problems, but I'm stuck again. > > I think I have everything installed and up to date. Here's an excerpt > from M-x package-list-packages: > markdown-mode 20220212.728 installed Major mode for > Markdown-formatted text > poly-R 20230416.1454 installed Various > polymodes for R language > poly-markdown 20230202.1210 installed Polymode for > markdown-mode > poly-noweb 20200316.1315 installed Polymode for > noweb > polymode 20230317.1218 installed Extensible > framework for multiple major modes > > With the exception of poly-noweb, they're all 2023 packages. > > Yet, when I open an *.Rmd file, I get this in the Messages buffer: > > File mode specification error: (error Autoloading file > /home/kevin/.emacs.d/polymode/modes/poly-R.el failed to define function > poly-gfm+r-mode) > Package cl is deprecated > > I then added your alternative define-polymode section, and the error > about poly-gfm+r-mode went away, but I still have this message in the > Messages buffer when I start Emacs with an *.Rmd file: > > File mode specification error: (cl-no-applicable-method clone nil) > Package cl is deprecated > > I can't find a reference to a 'cl' package in my init.el. In addition, > the *.Rmd file is in Fundamental mode, and not ESS or poly-R mode. > > When I try to manually invoke the poly mode, with 'M-x poly-gfm+r-mode', > I get the message: > > cl-no-applicable-method: No applicable method: clone, nil > > Any ideas what's going on with my system? I'm so worried I'm just making > a hash of things with these changes. > > Thanks for any advice or guidance. > > -Kevin > > On 4/22/23 06:00, ess-help-request at r-project.org wrote: > > ------------------------------ > > > > Message: 2 > > Date: Fri, 21 Apr 2023 11:09:43 -0400 > > From: "Tyler Smith" > > To: ESS-help > > Subject: Re: [ESS] Emacs, ESS and Rmarkdown: Is this the way compile > > is supposed to work? > > Message-ID: > > Content-Type: text/plain; charset="us-ascii" > > > > Hi Kevin, > > > > If you have an older version of `poly-R`, the function `poly-gfm+r-mode` > might not be present. This was added to `poly-R` dev in July 2021, I'm not > sure exactly when it would have been added to the released version. > > > > If that's the case, updating to the current version of `poly-R` should > fix the problem. > > > > Alternatively, you need the following code evaluated*after* `(require > 'poly-R)` and*before* `(add-to-list ...)`: > > > > ``` > > (define-polymode poly-gfm+r-mode poly-markdown+r-mode > > :lighter " PM-Rmd(gfm)" > > :hostmode 'poly-gfm-hostmode) > > ``` > > > > But that really shouldn't be necessary. > > > > Best, > > > > Tyler > > -- plantarum.ca > > > ______________________________________________ > ESS-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help > [[alternative HTML version deleted]] From kev|n @end|ng |rom zembower@org Sun Apr 23 20:11:17 2023 From: kev|n @end|ng |rom zembower@org (=?UTF-8?Q?Kevin_Zembower?=) Date: Sun, 23 Apr 2023 18:11:17 +0000 Subject: [ESS] Emacs, ESS and Rmarkdown: Is this the way compile is supposed to work? In-Reply-To: References: <7af7053e-bd6b-5892-3d41-ed2d42f6ae4f@zembower.org> <01000187af1d65fd-756b65a1-1444-41ab-8e22-4ddd69696ad8-000000@email.amazonses.com> Message-ID: <01000187af502287-d4939dca-d5db-4683-bf13-bc928d9ca9d6-000000@email.amazonses.com> Jacob, thanks for your help. Here's the output. I don't understand much of it, but the first mention of anything which seems germane is of "poly-markdown-+r-mode": =============================================== Debugger entered--Lisp error: "Package cl is deprecated" message("%s" "Package cl is deprecated") #f(compiled-function (msg) #)("Package cl is deprecated") apply(#f(compiled-function (msg) #) "Package cl is deprecated") timer-event-handler([t 0 0 0 nil #f(compiled-function (msg) #) ("Package cl is deprecated") idle 0]) recursive-edit() debug(error (cl-no-applicable-method clone nil)) signal(cl-no-applicable-method (clone nil)) cl-no-applicable-method(#s(cl--generic :name clone :dispatches ((0 #s(cl--generic-generalizer :name eieio--generic-generalizer :priority 50 :tagcode-function cl--generic-struct-tag :specializers-function #f(compiled-function (tag &rest _) #)) #s(cl--generic-generalizer :name cl--generic-t-generalizer :priority 0 :tagcode-function #f(compiled-function (name &rest _) #) :specializers-function #f(compiled-function (tag &rest _) #)))) :method-table (#s(cl--generic-method :specializers (eieio-named) :qualifiers nil :uses-cnm t :function #f(compiled-function (obj &rest params) "Clone OBJ, initializing `:parent' to OBJ.\nAll slots are unbound, except those initialized with PARAMS." #)) #s(cl--generic-method :specializers (eieio-instance-inheritor) :qualifiers nil :uses-cnm t :function #f(compiled-function (obj &rest params) "Clone OBJ, initializing `:parent' to OBJ.\nAll slots are unbound, except those initialized with PARAMS." #)) #s(cl--generic-method :specializers (eieio-default-superclass) :qualifiers nil :uses-cnm nil :function #f(compiled-function (obj &rest params) "Make a copy of OBJ, and then apply PARAMS." #))) :options nil) nil) apply(cl-no-applicable-method #s(cl--generic :name clone :dispatches ((0 #s(cl--generic-generalizer :name eieio--generic-generalizer :priority 50 :tagcode-function cl--generic-struct-tag :specializers-function #f(compiled-function (tag &rest _) #)) #s(cl--generic-generalizer :name cl--generic-t-generalizer :priority 0 :tagcode-function #f(compiled-function (name &rest _) #) :specializers-function #f(compiled-function (tag &rest _) #)))) :method-table (#s(cl--generic-method :specializers (eieio-named) :qualifiers nil :uses-cnm t :function #f(compiled-function (obj &rest params) "Clone OBJ, initializing `:parent' to OBJ.\nAll slots are unbound, except those initialized with PARAMS." #)) #s(cl--generic-method :specializers (eieio-instance-inheritor) :qualifiers nil :uses-cnm t :function #f(compiled-function (obj &rest params) "Clone OBJ, initializing `:parent' to OBJ.\nAll slots are unbound, except those initialized with PARAMS." #)) #s(cl--generic-method :specializers (eieio-default-superclass) :qualifiers nil :uses-cnm nil :function #f(compiled-function (obj &rest params) "Make a copy of OBJ, and then apply PARAMS." #))) :options nil) nil) #f(compiled-function (&rest args) #)(nil) apply(#f(compiled-function (&rest args) #) nil nil) clone(nil) (let ((config (clone poly-markdown+r-mode))) (eieio-oset config ':minor-mode 'poly-gfm+r-mode) (pm-initialize config)) (if pm/polymode nil (let ((config (clone poly-markdown+r-mode))) (eieio-oset config ':minor-mode 'poly-gfm+r-mode) (pm-initialize config))) (let ((last-message (current-message))) (if pm/polymode nil (let ((config (clone poly-markdown+r-mode))) (eieio-oset config ':minor-mode 'poly-gfm+r-mode) (pm-initialize config))) (setq poly-gfm+r-mode t) (run-hooks 'poly-gfm+r-mode-hook) (if (and (called-interactively-p 'any) (or (null (current-message)) (not (equal last-message (current-message))))) (progn (message "gfm+r polymode enabled"))) (force-mode-line-update)) (if poly-gfm+r-mode nil (let ((last-message (current-message))) (if pm/polymode nil (let ((config (clone poly-markdown+r-mode))) (eieio-oset config ':minor-mode 'poly-gfm+r-mode) (pm-initialize config))) (setq poly-gfm+r-mode t) (run-hooks 'poly-gfm+r-mode-hook) (if (and (called-interactively-p 'any) (or (null (current-message)) (not (equal last-message (current-message))))) (progn (message "gfm+r polymode enabled"))) (force-mode-line-update))) poly-gfm+r-mode() set-auto-mode-0(poly-gfm+r-mode nil) set-auto-mode() normal-mode(t) after-find-file(nil t) find-file-noselect-1(# "~/Documents/Dan/Math_Stats/Prob_17_Page_295.Rmd" nil nil "~/Documents/Dan/Math_Stats/Prob_17_Page_295.Rmd" (69338481 2067)) find-file-noselect("/home/kevin/Documents/Dan/Math_Stats/Prob_17_Page_...") #f(compiled-function (displayable-buffers dir line column name) #)((nil) "~/Documents/Dan/Math_Stats/" (0) (0) "Prob_17_Page_295.Rmd") command-line-1(("Prob_17_Page_295.Rmd")) command-line() normal-top-level() ======================================== Thanks for any ongoing advice. -Kevin On 4/23/23 13:34, Jacob Kasper wrote: > For package cl is depreciated you can read this thread. I don't think > this is causing any?issues with markdown. > https://www.reddit.com/r/emacs/comments/zslyem/package_cl_is_deprecated_debugging/ > > On Sun, Apr 23, 2023, 17:16 Kevin Zembower via ESS-help > > wrote: > > Tyler, thanks again for your help. > > I'm sorry to burden you with my problems, but I'm stuck again. > > I think I have everything installed and up to date. Here's an excerpt > from M-x package-list-packages: > ? ?markdown-mode? ? ? 20220212.728? installed? ? ? ? ? ? ?Major > mode for > Markdown-formatted text > ? ?poly-R? ? ? ? ? ? ?20230416.1454 installed? ? ? ? ? ? ?Various > polymodes for R language > ? ?poly-markdown? ? ? 20230202.1210 installed? ? ? ? ? ? ?Polymode for > markdown-mode > ? ?poly-noweb? ? ? ? ?20200316.1315 installed? ? ? ? ? ? ?Polymode > for noweb > ? ?polymode? ? ? ? ? ?20230317.1218 installed? ? ? ? ? ? ?Extensible > framework for multiple major modes > > With the exception of poly-noweb, they're all 2023 packages. > > Yet, when I open an *.Rmd file, I get this in the Messages buffer: > > File mode specification error: (error Autoloading file > /home/kevin/.emacs.d/polymode/modes/poly-R.el failed to define function > poly-gfm+r-mode) > Package cl is deprecated > > I then added your alternative define-polymode section, and the error > about poly-gfm+r-mode went away, but I still have this message in the > Messages buffer when I start Emacs with an *.Rmd file: > > File mode specification error: (cl-no-applicable-method clone nil) > Package cl is deprecated > > I can't find a reference to a 'cl' package in my init.el. In addition, > the *.Rmd file is in Fundamental mode, and not ESS or poly-R mode. > > When I try to manually invoke the poly mode, with 'M-x > poly-gfm+r-mode', > I get the message: > > cl-no-applicable-method: No applicable method: clone, nil > > Any ideas what's going on with my system? I'm so worried I'm just > making > a hash of things with these changes. > > Thanks for any advice or guidance. > > -Kevin > > On 4/22/23 06:00, ess-help-request at r-project.org > wrote: > > ------------------------------ > > > > Message: 2 > > Date: Fri, 21 Apr 2023 11:09:43 -0400 > > From: "Tyler Smith"> > > To: ESS-help> > > Subject: Re: [ESS] Emacs, ESS and Rmarkdown: Is this the way compile > >? ? ? ?is supposed to work? > > Message-ID: > > > Content-Type: text/plain; charset="us-ascii" > > > > Hi Kevin, > > > > If you have an older version of `poly-R`, the function > `poly-gfm+r-mode` might not be present. This was added to `poly-R` > dev in July 2021, I'm not sure exactly when it would have been added > to the released version. > > > > If that's the case, updating to the current version of `poly-R` > should fix the problem. > > > > Alternatively, you need the following code evaluated*after* > `(require 'poly-R)` and*before*? `(add-to-list ...)`: > > > > ``` > > (define-polymode poly-gfm+r-mode poly-markdown+r-mode > >? ? :lighter " PM-Rmd(gfm)" > >? ? :hostmode 'poly-gfm-hostmode) > > ``` > > > > But that really shouldn't be necessary. > > > > Best, > > > > Tyler > > -- plantarum.ca > > > ______________________________________________ > ESS-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help > > From teoten @end|ng |rom gm@||@com Mon Apr 24 08:45:31 2023 From: teoten @end|ng |rom gm@||@com (Manuel Teodoro) Date: Mon, 24 Apr 2023 08:45:31 +0200 Subject: [ESS] Emacs, ESS and Rmarkdown: Is this the way compile is supposed to work? In-Reply-To: <01000187af502287-d4939dca-d5db-4683-bf13-bc928d9ca9d6-000000@email.amazonses.com> References: <7af7053e-bd6b-5892-3d41-ed2d42f6ae4f@zembower.org> <01000187af1d65fd-756b65a1-1444-41ab-8e22-4ddd69696ad8-000000@email.amazonses.com> <01000187af502287-d4939dca-d5db-4683-bf13-bc928d9ca9d6-000000@email.amazonses.com> Message-ID: Hi Kevin, I also get sometimes the problem with "cl" library but it is never a critical error that stops me from using Rmd. I think the main question is, what is in your emacs configuration file? Probably the problem comes from there. For example, for R markdown I have simply the following lines, maybe you can try them and see if the error persist. ;; R markdown (use-package polymode) (use-package poly-R) (use-package poly-markdown) ;; MARKDOWN (add-to-list 'auto-mode-alist '("\\.md" . poly-markdown-mode)) ;; R modes (add-to-list 'auto-mode-alist '("\\.Snw" . poly-noweb+r-mode)) (add-to-list 'auto-mode-alist '("\\.Rnw" . poly-noweb+r-mode)) (add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode)) ; I just noticed, this is just in case you have installed use-package. If not, change the first 3 lines for something like (require 'polymode) (require 'poly-R) (require 'poly-markdown) Although probably require could also give you trouble, in which case simply remove the 3 lines. The most important are the following lines that are telling emacs to recognize *.Rmd files as markdown. If you already have this lines then it would be helpful to see your whole config file because maybe something there is conflicting with markdown or with r markdown. Cheers Manuel On Sun, Apr 23, 2023, 20:11 Kevin Zembower via ESS-help < ess-help at r-project.org> wrote: > Jacob, thanks for your help. > > Here's the output. I don't understand much of it, but the first mention > of anything which seems germane is of "poly-markdown-+r-mode": > =============================================== > Debugger entered--Lisp error: "Package cl is deprecated" > message("%s" "Package cl is deprecated") > #f(compiled-function (msg) #)("Package cl is > deprecated") > apply(#f(compiled-function (msg) #) "Package > cl is deprecated") > timer-event-handler([t 0 0 0 nil #f(compiled-function (msg) > #) ("Package cl is deprecated") idle 0]) > recursive-edit() > debug(error (cl-no-applicable-method clone nil)) > signal(cl-no-applicable-method (clone nil)) > cl-no-applicable-method(#s(cl--generic :name clone :dispatches ((0 > #s(cl--generic-generalizer :name eieio--generic-generalizer :priority 50 > :tagcode-function cl--generic-struct-tag :specializers-function > #f(compiled-function (tag &rest _) #)) > #s(cl--generic-generalizer :name cl--generic-t-generalizer :priority 0 > :tagcode-function #f(compiled-function (name &rest _) # 0x1fd0c5305c27>) :specializers-function #f(compiled-function (tag &rest > _) #)))) :method-table (#s(cl--generic-method > :specializers (eieio-named) :qualifiers nil :uses-cnm t :function > #f(compiled-function (obj &rest params) "Clone OBJ, initializing > `:parent' to OBJ.\nAll slots are unbound, except those initialized with > PARAMS." #)) #s(cl--generic-method > :specializers (eieio-instance-inheritor) :qualifiers nil :uses-cnm t > :function #f(compiled-function (obj &rest params) "Clone OBJ, > initializing `:parent' to OBJ.\nAll slots are unbound, except those > initialized with PARAMS." #)) > #s(cl--generic-method :specializers (eieio-default-superclass) > :qualifiers nil :uses-cnm nil :function #f(compiled-function (obj &rest > params) "Make a copy of OBJ, and then apply PARAMS." # 0x155db7503511>))) :options nil) nil) > apply(cl-no-applicable-method #s(cl--generic :name clone :dispatches > ((0 #s(cl--generic-generalizer :name eieio--generic-generalizer > :priority 50 :tagcode-function cl--generic-struct-tag > :specializers-function #f(compiled-function (tag &rest _) # 0x155db7511469>)) #s(cl--generic-generalizer :name > cl--generic-t-generalizer :priority 0 :tagcode-function > #f(compiled-function (name &rest _) #) > :specializers-function #f(compiled-function (tag &rest _) # 0x1fd0c5305c17>)))) :method-table (#s(cl--generic-method :specializers > (eieio-named) :qualifiers nil :uses-cnm t :function #f(compiled-function > (obj &rest params) "Clone OBJ, initializing `:parent' to OBJ.\nAll slots > are unbound, except those initialized with PARAMS." # 0x155db755ec35>)) #s(cl--generic-method :specializers > (eieio-instance-inheritor) :qualifiers nil :uses-cnm t :function > #f(compiled-function (obj &rest params) "Clone OBJ, initializing > `:parent' to OBJ.\nAll slots are unbound, except those initialized with > PARAMS." #)) #s(cl--generic-method > :specializers (eieio-default-superclass) :qualifiers nil :uses-cnm nil > :function #f(compiled-function (obj &rest params) "Make a copy of OBJ, > and then apply PARAMS." #))) :options nil) nil) > #f(compiled-function (&rest args) #)(nil) > apply(#f(compiled-function (&rest args) #) > nil nil) > clone(nil) > (let ((config (clone poly-markdown+r-mode))) (eieio-oset config > ':minor-mode 'poly-gfm+r-mode) (pm-initialize config)) > (if pm/polymode nil (let ((config (clone poly-markdown+r-mode))) > (eieio-oset config ':minor-mode 'poly-gfm+r-mode) (pm-initialize config))) > (let ((last-message (current-message))) (if pm/polymode nil (let > ((config (clone poly-markdown+r-mode))) (eieio-oset config ':minor-mode > 'poly-gfm+r-mode) (pm-initialize config))) (setq poly-gfm+r-mode t) > (run-hooks 'poly-gfm+r-mode-hook) (if (and (called-interactively-p 'any) > (or (null (current-message)) (not (equal last-message > (current-message))))) (progn (message "gfm+r polymode enabled"))) > (force-mode-line-update)) > (if poly-gfm+r-mode nil (let ((last-message (current-message))) (if > pm/polymode nil (let ((config (clone poly-markdown+r-mode))) (eieio-oset > config ':minor-mode 'poly-gfm+r-mode) (pm-initialize config))) (setq > poly-gfm+r-mode t) (run-hooks 'poly-gfm+r-mode-hook) (if (and > (called-interactively-p 'any) (or (null (current-message)) (not (equal > last-message (current-message))))) (progn (message "gfm+r polymode > enabled"))) (force-mode-line-update))) > poly-gfm+r-mode() > set-auto-mode-0(poly-gfm+r-mode nil) > set-auto-mode() > normal-mode(t) > after-find-file(nil t) > find-file-noselect-1(# > "~/Documents/Dan/Math_Stats/Prob_17_Page_295.Rmd" nil nil > "~/Documents/Dan/Math_Stats/Prob_17_Page_295.Rmd" (69338481 2067)) > > find-file-noselect("/home/kevin/Documents/Dan/Math_Stats/Prob_17_Page_...") > #f(compiled-function (displayable-buffers dir line column name) > #)((nil) "~/Documents/Dan/Math_Stats/" (0) (0) > "Prob_17_Page_295.Rmd") > command-line-1(("Prob_17_Page_295.Rmd")) > command-line() > normal-top-level() > ======================================== > > Thanks for any ongoing advice. > > -Kevin > > On 4/23/23 13:34, Jacob Kasper wrote: > > For package cl is depreciated you can read this thread. I don't think > > this is causing any issues with markdown. > > > https://www.reddit.com/r/emacs/comments/zslyem/package_cl_is_deprecated_debugging/ > < > https://www.reddit.com/r/emacs/comments/zslyem/package_cl_is_deprecated_debugging/ > > > > > > On Sun, Apr 23, 2023, 17:16 Kevin Zembower via ESS-help > > > wrote: > > > > Tyler, thanks again for your help. > > > > I'm sorry to burden you with my problems, but I'm stuck again. > > > > I think I have everything installed and up to date. Here's an excerpt > > from M-x package-list-packages: > > markdown-mode 20220212.728 installed Major > > mode for > > Markdown-formatted text > > poly-R 20230416.1454 installed Various > > polymodes for R language > > poly-markdown 20230202.1210 installed Polymode > for > > markdown-mode > > poly-noweb 20200316.1315 installed Polymode > > for noweb > > polymode 20230317.1218 installed Extensible > > framework for multiple major modes > > > > With the exception of poly-noweb, they're all 2023 packages. > > > > Yet, when I open an *.Rmd file, I get this in the Messages buffer: > > > > File mode specification error: (error Autoloading file > > /home/kevin/.emacs.d/polymode/modes/poly-R.el failed to define > function > > poly-gfm+r-mode) > > Package cl is deprecated > > > > I then added your alternative define-polymode section, and the error > > about poly-gfm+r-mode went away, but I still have this message in the > > Messages buffer when I start Emacs with an *.Rmd file: > > > > File mode specification error: (cl-no-applicable-method clone nil) > > Package cl is deprecated > > > > I can't find a reference to a 'cl' package in my init.el. In > addition, > > the *.Rmd file is in Fundamental mode, and not ESS or poly-R mode. > > > > When I try to manually invoke the poly mode, with 'M-x > > poly-gfm+r-mode', > > I get the message: > > > > cl-no-applicable-method: No applicable method: clone, nil > > > > Any ideas what's going on with my system? I'm so worried I'm just > > making > > a hash of things with these changes. > > > > Thanks for any advice or guidance. > > > > -Kevin > > > > On 4/22/23 06:00, ess-help-request at r-project.org > > wrote: > > > ------------------------------ > > > > > > Message: 2 > > > Date: Fri, 21 Apr 2023 11:09:43 -0400 > > > From: "Tyler Smith" >> > > > To: ESS-help ess-help at r-project.org>> > > > Subject: Re: [ESS] Emacs, ESS and Rmarkdown: Is this the way > compile > > > is supposed to work? > > > Message-ID: > > > > > Content-Type: text/plain; charset="us-ascii" > > > > > > Hi Kevin, > > > > > > If you have an older version of `poly-R`, the function > > `poly-gfm+r-mode` might not be present. This was added to `poly-R` > > dev in July 2021, I'm not sure exactly when it would have been added > > to the released version. > > > > > > If that's the case, updating to the current version of `poly-R` > > should fix the problem. > > > > > > Alternatively, you need the following code evaluated*after* > > `(require 'poly-R)` and*before* `(add-to-list ...)`: > > > > > > ``` > > > (define-polymode poly-gfm+r-mode poly-markdown+r-mode > > > :lighter " PM-Rmd(gfm)" > > > :hostmode 'poly-gfm-hostmode) > > > ``` > > > > > > But that really shouldn't be necessary. > > > > > > Best, > > > > > > Tyler > > > -- plantarum.ca > > > > > > ______________________________________________ > > ESS-help at r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/ess-help > > > > > > > ______________________________________________ > ESS-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help > [[alternative HTML version deleted]] From kev|n @end|ng |rom zembower@org Thu Apr 27 19:32:48 2023 From: kev|n @end|ng |rom zembower@org (=?UTF-8?Q?Kevin_Zembower?=) Date: Thu, 27 Apr 2023 17:32:48 +0000 Subject: [ESS] Emacs, ESS and Rmarkdown: Is this the way compile is supposed to work? In-Reply-To: References: <7af7053e-bd6b-5892-3d41-ed2d42f6ae4f@zembower.org> <01000187af1d65fd-756b65a1-1444-41ab-8e22-4ddd69696ad8-000000@email.amazonses.com> <01000187af502287-d4939dca-d5db-4683-bf13-bc928d9ca9d6-000000@email.amazonses.com> <87ea6067-eb9b-298b-2ce7-88fe6d549d27@zembower.org> Message-ID: <01000187c3c65735-ab9b6f55-2369-42d5-b760-a251d2258182-000000@email.amazonses.com> Hi, Manuel, thanks for your advice and help. Here's the section of my ~/.emacs.d/init.el file that I think pertains to R and Rmarkdown: =========================================================== ;; Next two sections for editing manpages in markdown (duplicates ;; sections below it, regarding RMarkdown in ESS?) (autoload 'markdown-mode "markdown-mode" "Major mode for editing Markdown files" t) (add-to-list 'auto-mode-alist '("\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'" . markdown-mode)) (autoload 'gfm-mode "markdown-mode" "Major mode for editing GitHub Flavored Markdown files" t) (add-to-list 'auto-mode-alist '("README\\.md\\'" . gfm-mode)) ;; For working in Markdown (RMarkdown in ESS): (setq load-path (append load-path (list "/usr/share/emacs23/site-lisp/emacs-goodies-el"))) ;; (autoload 'markdown-mode "markdown-mode" ;; "Major mode for editing Markdown files" t) ;; (add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode)) ;; (add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode)) ;; (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) ;; For working with RMarkdown (polymode): ;; Commented out, to update to poly-R (setq load-path (append '("~/.emacs.d/polymode/" "~/.emacs.d/polymode/modes") load-path)) (require 'poly-R) ;; Below from email at https://stat.ethz.ch/pipermail/ess-help/2023-April/013190.html (define-polymode poly-gfm+r-mode poly-markdown+r-mode :lighter " PM-Rmd(gfm)" :hostmode 'poly-gfm-hostmode) (require 'poly-markdown) (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)) ;; uses braces around code block language strings: ;; (setq markdown-code-block-braces t) ========================================================= I've also attached the whole file to this message. Thanks, again, for any advice or guidance you can offer. -Kevin On 4/24/23 02:45, Manuel Teodoro wrote: > Hi Kevin, > > I also get sometimes the problem with "cl" library but it is never a > critical error that stops me from using Rmd. > > I think the main question is, what is in your emacs configuration file? > Probably the problem comes from there. > > For example, for R markdown I have simply the following lines, maybe you > can try them and see if the error persist. > > ;; R markdown > (use-package polymode) > (use-package poly-R) > (use-package poly-markdown) > > ;; MARKDOWN > (add-to-list 'auto-mode-alist '("\\.md" . poly-markdown-mode)) > > ;; R modes > (add-to-list 'auto-mode-alist '("\\.Snw" . poly-noweb+r-mode)) > (add-to-list 'auto-mode-alist '("\\.Rnw" . poly-noweb+r-mode)) > (add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode)) > ; > > I just noticed, this is just in case you have installed use-package. If > not, change the first 3 lines for something like > > (require 'polymode) > (require 'poly-R) > (require 'poly-markdown) > > Although probably require could also give you trouble, in which case > simply remove the 3 lines. The most important are the following lines > that are telling emacs to recognize *.Rmd files as markdown. > > If you already have this lines then it would be helpful to see your > whole config file because maybe something there is conflicting with > markdown or with r markdown. > > Cheers > Manuel > > On Sun, Apr 23, 2023, 20:11 Kevin Zembower via ESS-help > > wrote: > > Jacob, thanks for your help. > > Here's the output. I don't understand much of it, but the first mention > of anything which seems germane is of "poly-markdown-+r-mode": > =============================================== > Debugger entered--Lisp error: "Package cl is deprecated" > ? ?message("%s" "Package cl is deprecated") > ? ?#f(compiled-function (msg) #)("Package > cl is > deprecated") > ? ?apply(#f(compiled-function (msg) #) > "Package > cl is deprecated") > ? ?timer-event-handler([t 0 0 0 nil #f(compiled-function (msg) > #) ("Package cl is deprecated") idle 0]) > ? ?recursive-edit() > ? ?debug(error (cl-no-applicable-method clone nil)) > ? ?signal(cl-no-applicable-method (clone nil)) > ? ?cl-no-applicable-method(#s(cl--generic :name clone :dispatches ((0 > #s(cl--generic-generalizer :name eieio--generic-generalizer > :priority 50 > :tagcode-function cl--generic-struct-tag :specializers-function > #f(compiled-function (tag &rest _) #)) > #s(cl--generic-generalizer :name cl--generic-t-generalizer :priority 0 > :tagcode-function #f(compiled-function (name &rest _) # 0x1fd0c5305c27>) :specializers-function #f(compiled-function (tag &rest > _) #)))) :method-table (#s(cl--generic-method > :specializers (eieio-named) :qualifiers nil :uses-cnm t :function > #f(compiled-function (obj &rest params) "Clone OBJ, initializing > `:parent' to OBJ.\nAll slots are unbound, except those initialized with > PARAMS." #)) #s(cl--generic-method > :specializers (eieio-instance-inheritor) :qualifiers nil :uses-cnm t > :function #f(compiled-function (obj &rest params) "Clone OBJ, > initializing `:parent' to OBJ.\nAll slots are unbound, except those > initialized with PARAMS." #)) > #s(cl--generic-method :specializers (eieio-default-superclass) > :qualifiers nil :uses-cnm nil :function #f(compiled-function (obj &rest > params) "Make a copy of OBJ, and then apply PARAMS." # 0x155db7503511>))) :options nil) nil) > ? ?apply(cl-no-applicable-method #s(cl--generic :name clone > :dispatches > ((0 #s(cl--generic-generalizer :name eieio--generic-generalizer > :priority 50 :tagcode-function cl--generic-struct-tag > :specializers-function #f(compiled-function (tag &rest _) # 0x155db7511469>)) #s(cl--generic-generalizer :name > cl--generic-t-generalizer :priority 0 :tagcode-function > #f(compiled-function (name &rest _) #) > :specializers-function #f(compiled-function (tag &rest _) # 0x1fd0c5305c17>)))) :method-table (#s(cl--generic-method :specializers > (eieio-named) :qualifiers nil :uses-cnm t :function > #f(compiled-function > (obj &rest params) "Clone OBJ, initializing `:parent' to OBJ.\nAll > slots > are unbound, except those initialized with PARAMS." # 0x155db755ec35>)) #s(cl--generic-method :specializers > (eieio-instance-inheritor) :qualifiers nil :uses-cnm t :function > #f(compiled-function (obj &rest params) "Clone OBJ, initializing > `:parent' to OBJ.\nAll slots are unbound, except those initialized with > PARAMS." #)) #s(cl--generic-method > :specializers (eieio-default-superclass) :qualifiers nil :uses-cnm nil > :function #f(compiled-function (obj &rest params) "Make a copy of OBJ, > and then apply PARAMS." #))) :options nil) nil) > ? ?#f(compiled-function (&rest args) #)(nil) > ? ?apply(#f(compiled-function (&rest args) #) > nil nil) > ? ?clone(nil) > ? ?(let ((config (clone poly-markdown+r-mode))) (eieio-oset config > ':minor-mode 'poly-gfm+r-mode) (pm-initialize config)) > ? ?(if pm/polymode nil (let ((config (clone poly-markdown+r-mode))) > (eieio-oset config ':minor-mode 'poly-gfm+r-mode) (pm-initialize > config))) > ? ?(let ((last-message (current-message))) (if pm/polymode nil (let > ((config (clone poly-markdown+r-mode))) (eieio-oset config ':minor-mode > 'poly-gfm+r-mode) (pm-initialize config))) (setq poly-gfm+r-mode t) > (run-hooks 'poly-gfm+r-mode-hook) (if (and (called-interactively-p > 'any) > (or (null (current-message)) (not (equal last-message > (current-message))))) (progn (message "gfm+r polymode enabled"))) > (force-mode-line-update)) > ? ?(if poly-gfm+r-mode nil (let ((last-message (current-message))) (if > pm/polymode nil (let ((config (clone poly-markdown+r-mode))) > (eieio-oset > config ':minor-mode 'poly-gfm+r-mode) (pm-initialize config))) (setq > poly-gfm+r-mode t) (run-hooks 'poly-gfm+r-mode-hook) (if (and > (called-interactively-p 'any) (or (null (current-message)) (not (equal > last-message (current-message))))) (progn (message "gfm+r polymode > enabled"))) (force-mode-line-update))) > ? ?poly-gfm+r-mode() > ? ?set-auto-mode-0(poly-gfm+r-mode nil) > ? ?set-auto-mode() > ? ?normal-mode(t) > ? ?after-find-file(nil t) > ? ?find-file-noselect-1(# > "~/Documents/Dan/Math_Stats/Prob_17_Page_295.Rmd" nil nil > "~/Documents/Dan/Math_Stats/Prob_17_Page_295.Rmd" (69338481 2067)) > > find-file-noselect("/home/kevin/Documents/Dan/Math_Stats/Prob_17_Page_...") > ? ?#f(compiled-function (displayable-buffers dir line column name) > #)((nil) "~/Documents/Dan/Math_Stats/" (0) (0) > "Prob_17_Page_295.Rmd") > ? ?command-line-1(("Prob_17_Page_295.Rmd")) > ? ?command-line() > ? ?normal-top-level() > ======================================== > > Thanks for any ongoing advice. > > -Kevin > > On 4/23/23 13:34, Jacob Kasper wrote: > > For package cl is depreciated you can read this thread. I don't > think > > this is causing any?issues with markdown. > > > https://www.reddit.com/r/emacs/comments/zslyem/package_cl_is_deprecated_debugging/ > > > > > On Sun, Apr 23, 2023, 17:16 Kevin Zembower via ESS-help > > > >> wrote: > > > >? ? ?Tyler, thanks again for your help. > > > >? ? ?I'm sorry to burden you with my problems, but I'm stuck again. > > > >? ? ?I think I have everything installed and up to date. Here's an > excerpt > >? ? ?from M-x package-list-packages: > >? ? ? ? ?markdown-mode? ? ? 20220212.728? installed? ? ? ? ? ? ?Major > >? ? ?mode for > >? ? ?Markdown-formatted text > >? ? ? ? ?poly-R? ? ? ? ? ? ?20230416.1454 installed > ?Various > >? ? ?polymodes for R language > >? ? ? ? ?poly-markdown? ? ? 20230202.1210 installed > ?Polymode for > >? ? ?markdown-mode > >? ? ? ? ?poly-noweb? ? ? ? ?20200316.1315 installed > ?Polymode > >? ? ?for noweb > >? ? ? ? ?polymode? ? ? ? ? ?20230317.1218 installed > ?Extensible > >? ? ?framework for multiple major modes > > > >? ? ?With the exception of poly-noweb, they're all 2023 packages. > > > >? ? ?Yet, when I open an *.Rmd file, I get this in the Messages > buffer: > > > >? ? ?File mode specification error: (error Autoloading file > >? ? ?/home/kevin/.emacs.d/polymode/modes/poly-R.el failed to > define function > >? ? ?poly-gfm+r-mode) > >? ? ?Package cl is deprecated > > > >? ? ?I then added your alternative define-polymode section, and > the error > >? ? ?about poly-gfm+r-mode went away, but I still have this > message in the > >? ? ?Messages buffer when I start Emacs with an *.Rmd file: > > > >? ? ?File mode specification error: (cl-no-applicable-method clone > nil) > >? ? ?Package cl is deprecated > > > >? ? ?I can't find a reference to a 'cl' package in my init.el. In > addition, > >? ? ?the *.Rmd file is in Fundamental mode, and not ESS or poly-R > mode. > > > >? ? ?When I try to manually invoke the poly mode, with 'M-x > >? ? ?poly-gfm+r-mode', > >? ? ?I get the message: > > > >? ? ?cl-no-applicable-method: No applicable method: clone, nil > > > >? ? ?Any ideas what's going on with my system? I'm so worried I'm just > >? ? ?making > >? ? ?a hash of things with these changes. > > > >? ? ?Thanks for any advice or guidance. > > > >? ? ?-Kevin > > > >? ? ?On 4/22/23 06:00, ess-help-request at r-project.org > > >? ? ? > wrote: > >? ? ? > ------------------------------ > >? ? ? > > >? ? ? > Message: 2 > >? ? ? > Date: Fri, 21 Apr 2023 11:09:43 -0400 > >? ? ? > From: "Tyler Smith" >> > >? ? ? > To: ESS-help >> > >? ? ? > Subject: Re: [ESS] Emacs, ESS and Rmarkdown: Is this the > way compile > >? ? ? >? ? ? ?is supposed to work? > >? ? ? > > Message-ID: > >? ? ? >> > >? ? ? > Content-Type: text/plain; charset="us-ascii" > >? ? ? > > >? ? ? > Hi Kevin, > >? ? ? > > >? ? ? > If you have an older version of `poly-R`, the function > >? ? ?`poly-gfm+r-mode` might not be present. This was added to > `poly-R` > >? ? ?dev in July 2021, I'm not sure exactly when it would have > been added > >? ? ?to the released version. > >? ? ? > > >? ? ? > If that's the case, updating to the current version of > `poly-R` > >? ? ?should fix the problem. > >? ? ? > > >? ? ? > Alternatively, you need the following code evaluated*after* > >? ? ?`(require 'poly-R)` and*before*? `(add-to-list ...)`: > >? ? ? > > >? ? ? > ``` > >? ? ? > (define-polymode poly-gfm+r-mode poly-markdown+r-mode > >? ? ? >? ? :lighter " PM-Rmd(gfm)" > >? ? ? >? ? :hostmode 'poly-gfm-hostmode) > >? ? ? > ``` > >? ? ? > > >? ? ? > But that really shouldn't be necessary. > >? ? ? > > >? ? ? > Best, > >? ? ? > > >? ? ? > Tyler > >? ? ? > -- plantarum.ca > > > > > > >? ? ?______________________________________________ > > ESS-help at r-project.org > > > mailing list > > https://stat.ethz.ch/mailman/listinfo/ess-help > > >? ? ? > > > > > > ______________________________________________ > ESS-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help > >