Filter extensions fail to load if source file is in a folder that begins with underscore
@cscheid is already working on this.
Since Sep 2, 2023.
Assessment
This issue has not been assessed yet.
Description
Bug description
If a .qmd source file is in a project subfolder that begins with an underscore (e.g. ./_folder/file.qmd), then quarto filter extensions do not load because quarto looks for the extensions in the wrong place. If the folder name is changed, the file does render properly. If extensions are omitted in the qmd file, then rendering occurs normally. The failure does not seem to depend on which extension is being loaded.
quarto render ./_folder/file.qmd
To obvious workaround is to change the folder name, but I'm using the underscore to prevent the contents of that specific folder from rendering during a batch render of the whole project.
Steps to reproduce
- Put the file below in the project subfolder
_folder.
---
title: "Doesn't render"
format: pdf
filters:
- latex-environment
environments:
- center
---
:::{.center}
This file does not render if located in a folder whose name begins with _.
:::
- Install the
latex-environmentfilter from the project base folder:quarto add quarto-ext/latex-environment - Attempt to render using CLI:
quarto render ./_folder/file.qmd
Expected behavior
The file should render to file.pdf
Actual behavior
The following error message (picking out the relevant part after the "pandoc" and "metadata" blocks)
Error running filter /opt/quarto/share/filters/main.lua:
Error running filter ~/project/_folder/latex-environment:
Could not find executable ~/project/_folder/latex-environment
stack traceback:
/opt/quarto/share/filters/main.lua:4030: in function </opt/quarto/share/filters/main.lua:4009>
[C]: in ?
[C]: in method 'walk'
/opt/quarto/share/filters/main.lua:171: in function 'run_emulated_filter'
/opt/quarto/share/filters/main.lua:449: in local 'callback'
/opt/quarto/share/filters/main.lua:454: in upvalue 'run_emulated_filter_chain'
/opt/quarto/share/filters/main.lua:495: in function </opt/quarto/share/filters/main.lua:476>
stack traceback:
/opt/quarto/share/filters/main.lua:171: in function 'run_emulated_filter'
/opt/quarto/share/filters/main.lua:449: in local 'callback'
/opt/quarto/share/filters/main.lua:454: in upvalue 'run_emulated_filter_chain'
/opt/quarto/share/filters/main.lua:495: in function </opt/quarto/share/filters/main.lua:476>
Note in the second line of the error message that its looking in the wrong folder for the filter.
- Looking in
~/project/_folder/latex-environment - Should look in
~/project/_extensions/quarto-ext/latex-environment
To reiterate, if the .qmd file is moved to a different subfolder the rendering succeeds (e.g. ./folder instead of ./_folder).
Your environment
- IDE: none
- OS: Ubuntu 22.04.3 LTS (jammy) in WSL
- LaTeX: XeLaTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023)
Quarto check output
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.3.450
Path: /opt/quarto/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.11.4 (Conda)
Path: ~/project/env/bin/python
Jupyter: 5.3.1
Kernels: python3
(-) Checking Jupyter engine render....0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........(None)
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
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.
More from quarto-dev/quarto-cli
-
binder bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
quarto-dev/quarto-cli#14907 · 3 comments ·
-
brand bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
quarto-dev/quarto-cli#14891 ·
-
brand bug html revealjs
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14882 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
quarto-dev/quarto-cli#14875 ·
-
Percent scripts: accept raw-string (r""") and '''-delimited markdown cells, as jupytext writes them Openengines-jupyter enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14850 · 2 comments ·
All issues in quarto-dev/quarto-cli
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bevyengine/bevy-website#2595 ·