all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#69733: [PATCH] Flyspell (flyspell-word): do not force 'save-excursion' on timers
@ 2024-03-11 14:37 Daniel Pettersson
  2024-03-12 13:20 ` Eli Zaretskii
  2024-03-15 15:59 ` Dmitry Gutov
  0 siblings, 2 replies; 7+ messages in thread
From: Daniel Pettersson @ 2024-03-11 14:37 UTC (permalink / raw)
  To: 69733

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

Tags: patch


As I understand the manual there is nothing that states that one should
assume that you cant move the point in buffer with timers.  This is of
course impossible to guarantee as any code can be calling
accept-process-output.  But it seams like an good idea to have code that
is triggered by post-command-hook to not impose such conditions. 

This might seam like an mole whacking activity, and it most definitely
is.

In GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin23.1.0, NS
 appkit-2487.20 Version 14.1.1 (Build 23B81)) of 2023-12-20 built on
 Daniels-Air
Repository revision: 281be72422f42fcc84d43f50723a3e91b7d03cbc
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2487
System Description:  macOS 14.1.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Flyspell-flyspell-word-do-not-force-save-excursion-o.patch --]
[-- Type: text/patch, Size: 1330 bytes --]

From 56bdf4df8048b4053719e33d08753a2eb088dc57 Mon Sep 17 00:00:00 2001
From: Daniel Pettersson <daniel@dpettersson.net>
Date: Mon, 11 Mar 2024 15:01:32 +0100
Subject: [PATCH] Flyspell (flyspell-word): do not force 'save-excursion' on
 timers

* lisp/textmode/flyspell.el (flyspell-word): Do not force
save-excursion on timers.  This especially needed here as
flyspell-word is fired from an post command hook.
---
 lisp/textmodes/flyspell.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index de59294e9f0..5dfe0f17aef 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1150,7 +1150,9 @@ flyspell-word
 		  (set-process-query-on-exit-flag ispell-process nil)
                   ;; Wait until ispell has processed word.
                   (while (progn
-                           (accept-process-output ispell-process)
+                           ;; don't force save-excursion to timers.
+                           ;; only accept output from ispell-process.
+                           (accept-process-output ispell-process nil nil t)
                            (not (string= "" (car ispell-filter)))))
                   ;; (ispell-send-string "!\n")
                   ;; back to terse mode.
-- 
2.39.3 (Apple Git-145)


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-15 15:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-11 14:37 bug#69733: [PATCH] Flyspell (flyspell-word): do not force 'save-excursion' on timers Daniel Pettersson
2024-03-12 13:20 ` Eli Zaretskii
2024-03-12 14:28   ` Daniel Pettersson
2024-03-14 10:36     ` Eli Zaretskii
2024-03-15 11:29       ` Daniel Pettersson
2024-03-15 12:36         ` Eli Zaretskii
2024-03-15 15:59 ` Dmitry Gutov

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.