Skip to content

History: Insert into Quarto document prose should create a cell #12737

@jmcphers

Description

@jmcphers

System details:

Positron and OS details:

Positron Version: 2026.04.0 build 217
Code - OSS Version: 1.109.2
Commit: c87af6bdec1f7cb6057b76a4b8e30280bb584ae7
Date: 2026-03-27T07:46:17.689Z
Electron: 39.3.0
Chromium: 142.0.7444.265
Node.js: 22.21.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.3.0

Session details:

Any

Steps to reproduce the issue:

  1. Run some commands in an R or Python console
  2. Open a Quarto document
  3. Place the cursor in a prose section
  4. Open the History pane
  5. Click a statement
  6. Click the "To Source" button, or right-click and choose "Send to Editor"
Image

The R or Python code is inserted as prose instead of code.

Expected or desired behavior:

Inserting history entries into the editor as-is makes sense if you're inserting into an R or Python file, but for Quarto we could do better.

  • Cursor is already in a code cell -> text is inserted as is
  • Cursor is outside a code cell -> a new code cell is created with the language matching the history entry

From a conversation with @cwickham at work week.

Metadata

Metadata

Assignees

Labels

area: quartoIssues related to working with Quarto i.e. bundling or integrating Quarto CLI or extensions
No fields configured for Enhancement.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions