quarto-dev / quarto-dev/quarto-cli
Running quarto render on a doc with an embed shortcode under a different profile/metadata settings requires manual deletion of the .quarto/embed directory between renders
@cscheid is already working on this.
Since Jul 8, 2025.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
I think I have come across a little edge case.
I am rendering a document which uses the embed shortcode, however each render is under a different Quarto profile, e.g.
quarto render --profile combined-questions
quarto render --profile combined-solutions
One of the differences is that under one profile I have
execute:
eval: false
and under the other
execute:
eval: true
Quarto fails to detect this difference and hence doesn't rerun the embedded qmd files on the second render.
At first I thought this was related to caching or freezing but I find that none of those options make a difference. So I went digging in the .quarto directory. I find that manually deleting the ipynb files in .quarto/embed gives me the rendering results I expect (as then they are regenerated during the second render).
rm -rf .quarto/embed
quarto render --profile combined-questions
rm -rf .quarto/embed
quarto render --profile combined-solutions
My example repo is https://github.com/remlapmot/tutorial-quarto-profiles.
The correct combined-solutions output document is: https://remlapmot.github.io/tutorial-quarto-profiles/tutorial-combined-solutions.html
whereas the incorrect one is https://remlapmot.github.io/tutorial-quarto-profiles/tutorial-combined-solutions-incorrect.html (it's the three code chunks for Python, Stata, Julia which should have output at the bottom which are wrong/were not re-executed).
So I think you need to store the profile/metadata arguments along with the embedded ipynb files and check if those change, and if so automatically regenerate the ipynb files in .quarto/embed.
I'm on Quarto 1.7.32.
Steps to reproduce
Example in linked repo.
Actual behavior
quarto render doesn't apply the different profile/metadata settings to the generated ipynb files for embedding in the second render.
Expected behavior
quarto render should apply the different profile/metadata settings to the generated ipynb files for embedding in the second render.
Your environment
- macOS 15.5
Quarto check output
% quarto check
Quarto 1.7.32
[✓] Checking environment information...
Quarto cache location: /Users/tom/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.6.3: OK
Dart Sass version 1.85.1: OK
Deno version 1.46.3: OK
Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.7.32
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/tom/Library/TinyTeX/bin/universal-darwin
Version: 2025
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Source: MacOS known location
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.13.5
Path: /Users/tom/Documents/GitHub/tutorial-quarto-profiles/.venv/bin/python3
Jupyter: 5.8.1
Kernels: python3, nbstata, ark
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.5.1
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
knitr: 1.50
rmarkdown: 2.29
[✓] Checking Knitr engine render......OK
Simpler reprex
I made a simpler example with just R and Python
uv sync
source .venv/bin/activate
# Example with just R and Python
## correct second render
rm -rf .quarto/embed
quarto render --profile combined2-questions
rm -rf .quarto/embed
quarto render --profile combined2-solutions
## incorrect second render
rm -rf .quarto/embed
quarto render --profile combined2-questions
quarto render --profile combined2-solutions
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.