* bug#58970: 29.0.50; Broken overlays order
@ 2022-11-02 17:47 Juri Linkov
2022-11-03 17:36 ` Juri Linkov
0 siblings, 1 reply; 2+ messages in thread
From: Juri Linkov @ 2022-11-02 17:47 UTC (permalink / raw)
To: 58970
[-- Attachment #1: Type: text/plain, Size: 475 bytes --]
After the merge of the noverlay branch, the order of overlays is reversed
in the return value of 'overlays-in'. This broke at least flyspell.el
where flyspell-auto-correct-previous-word now changes an unexpected word
at the top of the buffer instead of fixing the last typed word.
This has a disastrous effect since these changes go unnoticed at the
beginning of the file.
This patch fixes at least flyspell.el, but no idea what other packages
are broken in the same way:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: overlays-in.patch --]
[-- Type: text/x-diff, Size: 628 bytes --]
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index a66b72cfd06..11039f29630 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -2131,7 +2131,9 @@ flyspell-auto-correct-previous-word
;; only reset if a new overlay exists
(setq flyspell-auto-correct-previous-pos nil)
- (let ((overlay-list (overlays-in (point-min) position))
+ (let ((overlay-list (seq-sort-by
+ #'overlay-start #'>
+ (overlays-in (point-min) position)))
(new-overlay 'dummy-value))
;; search for previous (new) flyspell overlay
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#58970: 29.0.50; Broken overlays order
2022-11-02 17:47 bug#58970: 29.0.50; Broken overlays order Juri Linkov
@ 2022-11-03 17:36 ` Juri Linkov
0 siblings, 0 replies; 2+ messages in thread
From: Juri Linkov @ 2022-11-03 17:36 UTC (permalink / raw)
To: 58970
close 58970 29.0.50
stop
> After the merge of the noverlay branch, the order of overlays is reversed
> in the return value of 'overlays-in'. This broke at least flyspell.el
> where flyspell-auto-correct-previous-word now changes an unexpected word
> at the top of the buffer instead of fixing the last typed word.
> This has a disastrous effect since these changes go unnoticed at the
> beginning of the file.
>
> This patch fixes at least flyspell.el, but no idea what other packages
> are broken in the same way:
Now fixed overlays in flyspell.el, and closed.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-03 17:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-02 17:47 bug#58970: 29.0.50; Broken overlays order Juri Linkov
2022-11-03 17:36 ` Juri Linkov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.