Skip to main content
I added the tag 'isearch-filter-predicate'
Source Link

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))
(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).

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).

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).

Bumped by Community user
Bumped by Community user
edited tags
Link
Drew
  • 79.1k
  • 10
  • 123
  • 257
Source Link
Michaël
  • 344
  • 1
  • 11

isearch-forward, call-interactively, and isearch-filter-predicate

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).