Complete over buffer anchors in adoc-goto-ref-label#79
Merged
Conversation
C-c C-a asked you to type the anchor id blind; now it offers the buffer's anchors via completing-read (reusing adoc--collect-anchor-ids). It stays permissive so a not-yet-defined id can still be entered, and the xref at point remains the default.
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.
Small ergonomics win:
adoc-goto-ref-label(C-c C-a) used to make you type the anchor id from memory. Now it offers the buffer's anchors viacompleting-read, reusing theadoc--collect-anchor-idscollector from the completion work. It stays permissive (norequire-match), so an id that isn't defined yet can still be entered, and the cross-reference at point is still the default.This came out of a quick survey of which commands read from the minibuffer -
adoc-goto-ref-labelwas the one clear candidate (the only other reads areadoc-insert-link's URL/text, which have no good completion source).eldev test)M-x checkdocwarnings