quarto-emacs icon indicating copy to clipboard operation
quarto-emacs copied to clipboard

`M-x quarto-preview` does not refresh

Open shirdekel opened this issue 3 years ago • 7 comments

Running M-x quarto-preview on a .qmd file previews as expected, but does not refresh when the document is changed and saved. The expected behaviour can be seen when running quarto preview file.qmd in a shell.

shirdekel avatar Jul 05 '22 15:07 shirdekel

This is by design, in order to match the behavior of other markdown emacs modes.

Nevertheless, when quarto-preview is running, you can get a refresh by calling quarto-mode-markdown-command, or calling markdown-command (which is the standard way of building markdown files in the markdown polymode). In my configuration of emacs, that's C-c C-c m.

If you want to propose a PR that adds the ability to customize this behavior, I'd be happy to look it over. It'd have to add a customization variable that controls the creation of the command parameter in make-process.

With that said, I won't have time to do this until at least mid-August.

cscheid avatar Jul 05 '22 15:07 cscheid

Perhaps mention this in the main site? According to the current description, "Start a quarto preview server that watches quarto content for changes and automatically refreshes it".

jmburgos avatar Oct 14 '22 07:10 jmburgos

Good catch, that's stale documentation. EDIT: fixed now.

cscheid avatar Oct 14 '22 14:10 cscheid

For me that's M-x markdown-preview or M-x markdown-export. I was also very confused about this issue, until I found this thread.

henningninneh avatar Nov 04 '22 08:11 henningninneh

EDIT

Haha, just noticed this was already mentioned in the original issue. Anyway, might be handy to leave this message here...

END EDIT

I would say a better workaround is to start the quarto preview ... manually from a terminal. Then the preview update works as expected...

But I do not understand this design decision. Why does it have to match the behavior of other markdown modes (b.t.w. also it does not match the behavior of markdown-soma?

Quarto looks otherwise great b.t.w.! Thanks for this nice software...

dalanicolai avatar Nov 15 '22 09:11 dalanicolai

I agree that this behavior should at least be easily customizable. And, of course, I agree with the praise. :)

henningninneh avatar Nov 15 '22 10:11 henningninneh

@henningninneh emacs is no longer my day-to-day editor and we have a ton of other things to work on, so unfortunately this is relatively low-priority right now. But we appreciate pull requests!

cscheid avatar Nov 15 '22 13:11 cscheid