Skip to content

No sign of Citation interface after opening README.Rmd template and similar files in visual mode #11198

Closed

Description

@Robinlovelace

System details

RStudio Edition : Desktop
RStudio Version : 2022.06.0-daily-396-amd64
OS Version      : Ubuntu 20.04
R Version       : 4.2.0

Steps to reproduce the problem

Try adding citations either by entering @ when in visual editor mode or with the insert below:

image

Describe the problem in detail

There is no evidence of the citations interface that I know (knew) and love (loved)!

The raw text that appears after trying is like this: \@test_2022

Describe the behavior you expected

I should be able to add citations.

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

A bit more context: I have a large Zotero database and {rbbt} installed.

Activity

  1. Robinlovelace commented on May 12, 2022

    @Robinlovelace
    Author

    Interestingly I get citations when creating a new Quarto project. Will try creating a new R project now, guess it may be due to previous session info from previous project sessions.

    image

  2. changed the title [-]No sign of Citation interface[/-] [+]No sign of Citation interface in some projects[/+] on May 12, 2022
  3. Robinlovelace commented on May 12, 2022

    @Robinlovelace
    Author

    Update: I tried removing all files in .Rproj.user and re-opening the project. That didn't fix it.

  4. changed the title [-]No sign of Citation interface in some projects[/-] [+]No sign of Citation interface in some projects/files[/+] on May 12, 2022
  5. Robinlovelace commented on May 12, 2022

    @Robinlovelace
    Author

    There is definitely some weird inconsistent behaviour going on here. I create a new .Rmd document and citations pop-up fine. But when editing the file in which the citations failed previously there seems to be no way to add citations. Reporting here in case of use/interest.

  6. added
    visual markdown
    on May 13, 2022
  7. Robinlovelace commented on May 20, 2022

    @Robinlovelace
    Author

    Heads-up @ronblum I have just managed to reproduce this in the following environment:

    RStudio Workbench
    2022.06.0 Build 431.pro2
    © 2009-2022 RStudio, PBC
    "Spotted Wakerobin" Daily (4bc37c6a, 2022-05-20) for Ubuntu Bionic
    Mozilla/5.0 (X11; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0
    

    Reprex in following comment.

  8. Robinlovelace commented on May 20, 2022

    @Robinlovelace
    Author
    1. Create a new package project with the command usethis::create_package("testpkg")
    2. Open a new .Rmd file, e.g. with the command usethis::use_readme_rmd() inside the new project
    3. Start editing the RMarkdown file and try to add references to check if this issue is reproducible on other installations
  9. Robinlovelace commented on May 20, 2022

    @Robinlovelace
    Author
    vokoscreenNG-2022-05-20_21-51-13.mp4

    Illustration of this.

  10. Robinlovelace commented on May 20, 2022

    @Robinlovelace
    Author

    Update: other .Rmd files in the same project have the same issue.

  11. Robinlovelace commented on May 20, 2022

    @Robinlovelace
    Author

    When creating a new project the citation options are there in a totally blank .Rmd doc:

    image

  12. Robinlovelace commented on May 20, 2022

    @Robinlovelace
    Author

    OK progress: exactly the same file and project prevent citations being added when the contents of README.Rmd are overwritten by usethis::use_readme_rmd().

  13. Robinlovelace commented on May 20, 2022

    @Robinlovelace
    Author

    Bingo, Pretty sure I've found the cause of this bug. Either the comments or the code chunk in the first 20 lines of this file mess with the citations dialogue making it fail for some reason:

    
    ---
    output: github_document
    ---
    
    <!-- README.md is generated from README.Rmd. Please edit that file -->
    
        ```{r, include = FALSE}
    knitr::opts_chunk$set(
      collapse = TRUE,
      comment = "#>",
      fig.path = "man/figures/README-",
      out.width = "100%"
    )
        ```
    
    # test2
    
    <!-- badges: start -->
    
    <!-- badges: end -->
    
    The goal of test2 is to ...
    
    
  14. changed the title [-]No sign of Citation interface in some projects/files[/-] [+]No sign of Citation interface after opening README.Rmd template and similar files in visual mode[/+] on May 20, 2022
  15. 8 remaining items

  16. ronblum commented on May 24, 2022

    @ronblum
    Contributor

    Created #11279 for the second issue (which is related to #10075).

  17. jjallaire commented on Jun 14, 2022

    @jjallaire
    Member

    There was an issue where there are no citations available in README files. This has been addressed here: 36db347

  18. self-assigned this
    on Jun 14, 2022
  19. Robinlovelace commented on Jun 14, 2022

    @Robinlovelace
    Author

    I can give it a spin. Thanks JJ!

  20. ronblum commented on Jun 15, 2022

    @ronblum
    Contributor

    FWIW, this now works in RStudio Desktop 2022.06.0-daily+528 on MacOS 12.5.

    I'm marking this as verified, but @Robinlovelace it would be great let us know if it works for you, as well!

  21. Robinlovelace commented on Jun 15, 2022

    @Robinlovelace
    Author

    Good news: this edge-case but important bug fixed in the latest daily version. Great job. A similarly important and annoying bug that is not yet fixed is #11313. I will comment on that as I see it as a major regression that for sure is reproducible and will bite lots of people.

  22. ronblum commented on Jun 16, 2022

    @ronblum
    Contributor

    @Robinlovelace Thank you for checking! Glad to hear it's working. I've also updated the other issue, and reached out internally for some more help. ("I don't know what I'm doing" is implied, so I won't say so outright.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugvisual markdown

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions