Skip to content

knitr::knit a document with plot code opens existing session plot file #271

@renkun-ken

Description

@renkun-ken

Describe the bug

When r.sessionWatcher is on, when user calls knitr::knit() with a Rmd document with plot commands, the existing plot file stored by R session watcher will be open after the function completes.

To Reproduce

  1. Create a Rmd document (e.g. doc1.Rmd) with the following content:
# hello

Hello, world!

```{r}
plot(rnorm(100))
```
  1. Call knitr::knit("doc1.Rmd")
  2. When the function call completes, no plot file appears.
  3. Call plot(rnorm(10)) and the plot file is open. Close this file.
  4. Call knitr::knit("doc1.Rmd") again and the previous plot file is open too.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions