In order to search for generated patterns I am looking for the place to preprocess the user-input in ivy / swiper / counsel.
Starting with the preprocessing of initial-input and continuing with all further user-input.
My first try was to wrap re-builder but that didn't turn out to work until now.
The desired behaviour
After every key-stroke as soon and as long as the user-input matches some predicate it is replaced with the result of an input-preprocessing-function called on the user-input before it is converted into a regex-pattern.
example
(defun re-builder-with-input-preprocessing (s)
;; example for a simple input-preprocessing operation to search for a date-stamp
(let ((preprocessed (s-replace "tdy" (date-now) s)))
(re-builder preprocessed)))
(ivy ... :re-builder 're-builder-with-input-preprocessing ...)
Thanks a lot for any hint on where to put an input-preprocessing like this within ivy.
I didn't find it in the docs. Maybe I didn't dig deep enough though.
In order to search for generated patterns I am looking for the place to preprocess the user-input in ivy / swiper / counsel. Starting with the preprocessing of initial-input and continuing with all further user-input. My first try was to wrap re-builder but that didn't turn out to work until now.
The desired behaviour After every key-stroke as soon and as long as the user-input matches some predicate it is replaced with the result of an input-preprocessing-function called on the user-input before it is converted into a regex-pattern.
example
Thanks a lot for any hint on where to put an input-preprocessing like this within ivy. I didn't find it in the docs. Maybe I didn't dig deep enough though.