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

Previous Next

Package: emacs;

Reported by: "Nathan R. DeGruchy" <nathan <at> degruchy.org>

Date: Sat, 7 Oct 2023 19:13:01 UTC

Severity: normal

Merged with 55284

Found in versions 28.1, 28.2

Full log


View this message in rfc822 format

From: LdBeth <andpuke <at> foxmail.com>
To: nathan <at> degruchy.org
Cc: 66395 <at> debbugs.gnu.org
Subject: bug#66395: 28.2; Todo-mode locks up when trying to edit an entry
Date: Sat, 07 Oct 2023 14:37:00 -0500
[Message part 1 (text/plain, inline)]
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

[patch.txt (text/plain, inline)]
--- 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 ()

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.