Add new text-inserter with transform-hook and -context#127
Merged
Conversation
929df9d to
fda99b9
Compare
The new functions don't just pick text or bounds but rather insert text and prepare the buffer to a final state. Making the text useable for a speed-type session. No call to (buffer-string) is needed expect when preparing a string. Introduce an initial version of speed-type-transform-context to be used by transform-hook. From this context various rules can be defined, when to apply a function-hook. Add text-type and repsective insert-functions: + transform-text => speed-type-insert-text + random-wordlist => speed-type-insert-wordlist + continue-text-section, random-text-section => speed-type-insert-text-section + quote => speed-type-insert-quote Migrate existing tranformation-functions to transform-hook: + downcase + replace-strings + fill-region + filter-stop-words + trimming + delete-trailing-whitespace Migrate speed-type--setup-calls to use quadruple instead of text: content-buffer, start, end, text-type Handle empty buffer case on speed-type--setup Add new transformation-functions: + replace-regex-hook + left-align Refactoring: + Rename speed-type--replace-map-adjust-properties to speed-type--forward-replace-map-adjust-properties and remove save-excursion and don't go to (point-min). Documentation: + New Chapter: Text-Inserter / Text-Picker Tests: + Adjust string-trim-test to use buffer + Add minimal and error cases for speed-type-prepare-buffer + Add for each text-type a default and transform empty case + Add edge case provoking endless loop in insert-wordlist + Add test and handle "random 0" in insert-wordlist Package: + Increment version
fda99b9 to
9d63d9f
Compare
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.
Fixes #106
Fixes #86