bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66395: 28.2; Todo-mode locks up when trying to edit an entry


From: LdBeth
Subject: bug#66395: 28.2; Todo-mode locks up when trying to edit an entry
Date: Sat, 07 Oct 2023 14:37:00 -0500
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (x86_64-apple-darwin20.6.0) MULE/6.0 (HANACHIRUSATO)

As we have discussed on IRC, the nonstandard timestamp format is the cause.
The hang is cause by the while loop `todo-item-start' not properly handle fail
case, however.

This patch would at least fix the hang.

---
LdBeth

--- todo-mode.el.old    2023-10-07 14:28:59.000000000 -0500
+++ todo-mode.el        2023-10-07 14:30:20.000000000 -0500
@@ -5242,8 +5242,8 @@
           ;; Buffer is widened.
           (looking-at (regexp-quote todo-category-beg)))
     (goto-char (line-beginning-position))
-    (while (not (looking-at todo-item-start))
-      (forward-line -1))
+    (while (and (not (looking-at todo-item-start))
+                (= (forward-line -1) 0)))
     (point)))
 
 (defun todo-item-end ()

reply via email to

[Prev in Thread] Current Thread [Next in Thread]