GNU bug report logs -
#65379
29.1.50; isearch started through `isearch-resume' incorrectly moves point after failure
Previous Next
Reported by: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
Date: Sat, 19 Aug 2023 09:47:01 UTC
Severity: normal
Found in version 29.1.50
Fixed in version 30.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 65379 in the body.
You can then email your comments to 65379 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65379
; Package
emacs
.
(Sat, 19 Aug 2023 09:47:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 19 Aug 2023 09:47:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
One of the more arcane features of isearch ... I do not actually
use that, but I modeled one of my personal isearch functions after
`isearch-resume“ and came across this issue.
emacs -Q
M-: (setq isearch-resume-in-command-history t) RET
Then execute:
f ;; self-insert-command
o ;; self-insert-command
o ;; self-insert-command
b ;; self-insert-command
a ;; self-insert-command
r ;; self-insert-command
b ;; self-insert-command
a ;; self-insert-command
z ;; self-insert-command
<return> ;; newline
C-<home> ;; beginning-of-buffer
C-s ;; isearch-forward
f ;; isearch-printing-char
o ;; isearch-printing-char
o ;; isearch-printing-char
b ;; isearch-printing-char
a ;; isearch-printing-char
r ;; isearch-printing-char
b ;; isearch-printing-char
a ;; isearch-printing-char
z ;; isearch-printing-char
<return> ;; isearch-exit
C-<home> ;; beginning-of-buffer
C-x <escape> <escape> ;; repeat-complex-command
<return> ;; read--expression-try-read
C-s ;; isearch-repeat-forward
=> point jumps to bob and the complete buffer gets highlighted on the
search failure after the `C-s'
I'm not an isearch expert, but I think the remedy should be to add a
call to `isearch-push-state' before the call to `isearch-update' in
function `isearch-resume':
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 3d2bbda4975..14f335f4cea 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -4640,6 +4640,7 @@ isearch-resume
isearch-message message
isearch-case-fold-search case-fold)
(isearch-search)
+ (isearch-push-state)
(isearch-update))
At least that helps preventing the incorrect behavior, and most other
calls to `isearch-update' have a preceeding call to `isearch-push-state'
in isearch.el. But that doesn't mean anything, of course, so somebody
else should review that.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65379
; Package
emacs
.
(Sun, 20 Aug 2023 17:41:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 65379 <at> debbugs.gnu.org (full text, mbox):
close 65379 30.0.50
thanks
> One of the more arcane features of isearch ... I do not actually
> use that, but I modeled one of my personal isearch functions after
> `isearch-resume“ and came across this issue.
Thanks for the bug report. I don't use `isearch-resume',
so never noticed this bug.
> I'm not an isearch expert, but I think the remedy should be to add a
> call to `isearch-push-state' before the call to `isearch-update' in
> function `isearch-resume':
>
> diff --git a/lisp/isearch.el b/lisp/isearch.el
> index 3d2bbda4975..14f335f4cea 100644
> --- a/lisp/isearch.el
> +++ b/lisp/isearch.el
> @@ -4640,6 +4640,7 @@ isearch-resume
> isearch-message message
> isearch-case-fold-search case-fold)
> (isearch-search)
> + (isearch-push-state)
> (isearch-update))
>
> At least that helps preventing the incorrect behavior, and most other
> calls to `isearch-update' have a preceeding call to `isearch-push-state'
> in isearch.el. But that doesn't mean anything, of course, so somebody
> else should review that.
You are absolutely right. This is the correct way to fix it.
Now pushed to master. Thanks for the patch.
bug marked as fixed in version 30.0.50, send any further explanations to
65379 <at> debbugs.gnu.org and Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Sun, 20 Aug 2023 17:41:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 18 Sep 2023 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 277 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.