aboutsummaryrefslogtreecommitdiff
path: root/modules/custom-datetime.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-04-22 07:43:41 -0500
committerCraig Jennings <c@cjennings.net>2026-04-22 07:43:41 -0500
commitaa033b1ea9707dda78e9cb75dfe1b13b78db11b5 (patch)
tree16699e222053fb465947534d429ddbffdf55f0d6 /modules/custom-datetime.el
parentde72468d1fe8e15354f398dc22d7469093e7ef65 (diff)
downloaddotemacs-aa033b1ea9707dda78e9cb75dfe1b13b78db11b5.tar.gz
dotemacs-aa033b1ea9707dda78e9cb75dfe1b13b78db11b5.zip
fix(hugo): defer browser until server ready, report crashes
Two gaps in cj/hugo-preview surfaced during manual testing. First, the browser opened one second after start-process returned. On any non-trivial site, Hugo takes several seconds to finish its initial build before it binds port 1313. The browser requested the page before the server existed and got ERR_CONNECTION_REFUSED. Replaced the fixed one-second run-at-time with a process filter that watches Hugo's output for "Web Server is available at" — the line Hugo prints once it has actually bound the port. The browser now opens at the right moment regardless of build time. The filter clears itself after firing so subsequent output does not re-open tabs. Second, if Hugo exited on its own (for example a template error in the theme), the preview command went silent with no indication that anything was wrong. Added a process sentinel that clears cj/hugo--preview-process on any exit and prints "hugo server crashed (exit N) — see *hugo-server* buffer" when the exit status is non-zero. User-initiated stops arrive as signal status and remain silent because cj/hugo-preview already prints its own stop message.
Diffstat (limited to 'modules/custom-datetime.el')
0 files changed, 0 insertions, 0 deletions