Repository navigation
Fix rough edges in the Asciidoctor integration - #93
Merged
Merged
Conversation
On Emacs master, flymake-diagnostic-text joins the diagnostic's origin, code and message, so a diagnostic with neither starts with spaces and the parse-output spec failed on the snapshot build. The two-argument form that picks the parts doesn't exist before Emacs 31, so trim.
adoc-mode added the `asciidoc' matcher to compilation-error-regexp-alist buffer-locally in the AsciiDoc buffer, but compilation-start doesn't carry that over, so the `*asciidoctor: ...*' export buffer never matched a thing. Exports now run in adoc-asciidoctor-compilation-mode, which sets the alist itself, and the matcher is registered when adoc-asciidoctor is loaded. It accepts `Line' as well as `line', like the Flymake regexp.
adoc-preview writes adoc-preview-XXXXXX.html next to the document, so relative image paths resolve, but only adoc-live-preview-mode installed the hook that deletes it. A one-off preview left the file in the source directory for good. The file is now cleaned up from kill-buffer-hook as soon as it's created, and from kill-emacs-hook, since buffers aren't killed when Emacs exits. adoc--preview-file is permanent-local so revert-buffer doesn't lose track of it.
`auto' chose the xwidget backend whenever xwidget-webkit-browse-url was fboundp, but that function is autoloaded on every build, so a graphical Emacs without xwidgets failed with "Your Emacs was not compiled with xwidgets support". Check (featurep 'xwidget-internal). The pane also looked for a `*xwidget-webkit*' buffer, a name Emacs 28 and later don't use; use xwidget-webkit-last-session-buffer, and keep the source window's buffer like the eww backend does.
Asciidoctor resolves `include::partial$snip.adoc[]' and the like as plain paths, so in an Antora component every such include came back as an "include file not found" error. Inside a component (antora.yml above the file) those diagnostics are dropped. They still count towards the fatal-failure fallback, which would otherwise report the first one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Export errors weren't navigable, a one-off preview left its HTML file next to the document, the
autopreview backend chose xwidgets on builds without them, and Flymake flagged every Antorapartial$/example$include as a missing file. It also fixes the Flymake spec that fails on the snapshot build.The export buffer now has its own compilation mode, rather than
adoc-asciidoctoradding the matcher to the globalcompilation-error-regexp-alist, so a plainM-x compilerunning asciidoctor still won't navigate its errors. That's the same as before.