0

Here are two use cases where I call isearch-forward with some filter predicate.

(let ((isearch-filter-predicate (lambda (a b) nil)))
  (funcall 'isearch-forward))

(let ((isearch-filter-predicate (lambda (a b) nil)))
  (call-interactively 'isearch-forward))

Why is it that only the first one works? Is there a way to have the call-interactively call take isearch-filter-predicate into account?

It seems I need call-interactively if I want commands that leave isearch (e.g., C-n) to be executed properly (that is, C-s C-n should go to the next line).

  • Why do you say that you need to use call-interactively for keys such as C-n to quit Isearch? What are you trying to do - are you trying to define a command? If so, add an interactive spec. If not, use isearch-mode. – Drew Apr 19 '18 at 19:17
  • C-n does quit isearch, but does not go to the next line when called using funcall. My ultimate goal is to have a command that read-key-sequences and executes the associated function with a specific isearch-filter-predicate. – Michaël Apr 19 '18 at 20:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.