Consistent condition evaluation with multiple prefixes and abbrev support#201
Consistent condition evaluation with multiple prefixes and abbrev support#201martenlienen wants to merge 3 commits intominad:mainfrom
Conversation
This ensures that :when conditions are evaluated at consistent positions between prefix expansion and template insertion with ~tempel-insert~.
a38e700 to
4b94ae2
Compare
4b94ae2 to
483ff18
Compare
483ff18 to
d4f65c3
Compare
|
@minad I am sorry for sending such a large pull request. Is there anything I can do to help the review? I have been running this for two weeks now without any hiccups. The force-pushes a few minutes ago were just to update the readme and ensure backwards compatibility with sources that directly evaluate to a list of templates. (Because this PR implements the split source -> filter -> maybe select, sources are now expected to return lists |
|
Hi Marten, sorry for letting you wait for so long, and thanks for the PRs. You could try to reduce the diff as much as possible, splitting changes in logical commits, which could also be applied separately, but you likely already tried that, I guess? The problem is really that I cannot sink more and more time and effort into my package maintenance without additional appreciation from the community. A lot of time is already taken by answering questions on the bug trackers or discussion boards, fixing obvious bugs, routine maintenance or adapting to Emacs changes. This means I have to prioritize accordingly, and larger work usually happens in bursts. I did some work on Tempel recently and when the time comes where I focus on Tempel again, I will likely look into the prefix problem here. Thanks again! |
This PR supersedes #200.
It solves the problems that the other PR had and makes tempel generally more robust:
tempel--prefixesthat returns all possible prefixes that could be expanded at point.tempel--templatesexposes the condition of templates, which was necessary toiftemplates in python which should expand depending on if I am in statement or expression context.tempel--select-templatelets the user pick a template withcompleting-readwhenever the current template is not unique.tempel--capf-listconstructs a capf list that combines templates together regardless of key clashes or triggering prefixes of different length and is used wherever a capf list is needed. Before,tempel-expandwould use a less fully-featured capf list thantempel-complete.abcandbcand typeabc, now both templates will be offered for expansion for the user to select viatempel--select-template).This is a good set of templates to try it