Subject: bug#56535: 28.1; `no' and `no-ding' values for isearch-wrap-pause option (since Emacs 28.1) not working as documented

From: Juri Linkov <[email-masked]>
Date: Sun, 24 Jul 2022 19:38:27 +0300

>> It's difficult to choose self-descriptive symbols.  So we need to have
>> just good enough symbol names, then describe their exact meaning in the
>> documentation.
>
> Then I guess introducing 'inc-no' and 'inc-no-ding' for incremental
> wrapping should do as it preserves the meaning of the existing values.
>
> Just  one more question.
>
> Why shouldn't the behaviour of 'no' and 'no-ding' be changed to handle
> incremental searches as well, instead of introducing new values?

Good question.  The reason was to maintain "backward-compatibility".
But do we really need to restrict the existing values only to C-s C-s,
and not to incremental commands?  In this case here is a new patch:

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 8f480a87d9..ad30b5e514 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2838,6 +2839,9 @@ isearch-search-and-update
 			    isearch-barrier
 			    (1+ isearch-other-end)))))
       (isearch-search)
+      (when (and (memq isearch-wrap-pause '(no no-ding))
+                 (not isearch-success))
+        (isearch-repeat (if isearch-forward 'forward 'backward)))
       ))
   (isearch-push-state)
   (if isearch-op-fun (funcall isearch-op-fun))