GNU bug report logs - #78506
30.1.90; todo-mode item insertion bug (followup bug)

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Tue, 20 May 2025 09:00:01 UTC

Severity: normal

Found in version 30.1.90

Done: Stephen Berman <stephen.berman <at> gmx.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#78506: closed (30.1.90; todo-mode item insertion bug
 (followup bug))
Date: Tue, 20 May 2025 13:41:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 20 May 2025 15:39:51 +0200
with message-id <87h61f8kpk.fsf <at> gmx.net>
and subject line Re: bug#78506: 30.1.90; todo-mode item insertion bug (followup bug)
has caused the debbugs.gnu.org bug report #78506,
regarding 30.1.90; todo-mode item insertion bug (followup bug)
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
78506: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78506
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stephen Berman <stephen.berman <at> gmx.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.1.90; todo-mode item insertion bug (followup bug)
Date: Tue, 20 May 2025 10:58:40 +0200
[Message part 3 (text/plain, inline)]
0. HOME=/tmp/${USER} emacs -Q  (start Emacs in a clean environment)
1. Type `M-x todo-show' and at the prompt type "test RET test RET test
   RET" to initialize the Todo file "test" with the category "test"
   containing the item "test".  The current buffer displays that
   category in todo-mode.
2. (Sanity check) In the current buffer with point on the item type `e'
   to begin an item editing command; the echo area now displays the
   prompt "Press a key (so far ā€˜e’): e=>edit h=>header m=>multiline
   y=>diary k=>nonmarking d=>date t=>time".  Type `C-g' to cancel the
   command.
3. Now type `i i' and at the prompt "test2 RET RET" to create the item
   "test2" with priority 1.
4. Now (immediately after step 3, without typing any key in between)
   type `e' to begin an item editing command for item "test2":
=> The echo area displays the message "ā€˜e’ is not a valid remaining item
   insertion key".  Typing `e' again now displays the item editing
   prompt.

The bug in step 4 (`e' at first not being recognized as a valid Todo
mode command key) is due to commit 7f80070232, which provided a fix for
bug#70937.  It turns out this fix was incomplete; the following patch
fills in the gap:

[Message part 4 (text/x-patch, inline)]
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 27678328b4a..2bd8b89b58b 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -5821,7 +5821,13 @@ todo-insert-item--next-param
       (if (memq last '(default copy))
 	  (progn
 	    (setq params0 nil)
-            (funcall gen-and-exec))
+            (funcall gen-and-exec)
+	    ;; Since the item insertion command is now done, unset
+	    ;; transient map to ensure the next Todo mode key is
+	    ;; recognized (bug#xxxxx).  (Only for "default" and "copy"
+	    ;; parameters: for others, `last' may not yet be the final
+	    ;; parameter, so the map must still be evaluated.)
+	    (setq map nil))
         (let ((key (funcall key-of last)))
 	  (funcall add-to-prompt key (make-symbol
                                       (concat (symbol-name last) ":GO!")))
[Message part 5 (text/plain, inline)]
Since this fixes a bug introduced in Emacs 30.1, I
think it should be committed to the emacs-30 branch; is that ok?


In GNU Emacs 30.1.90 (build 2, x86_64-pc-linux-gnu, GTK+ Version
 3.24.49, cairo version 1.18.4) of 2025-05-20 built on strobelfs2
Repository revision: 328b316764f0b06f7b8c774e9855ff2426a13bfe
Repository branch: emacs-30
Windowing system distributor 'The X.Org Foundation', version 11.0.12101016
System Description: Linux From Scratch r12.3-20

Configured using:
 'configure -C 'CFLAGS=-Og -g3' PKG_CONFIG_PATH=/opt/qt6/lib/pkgconfig'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG
RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER
WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB
[Message part 6 (message/rfc822, inline)]
From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 78506-done <at> debbugs.gnu.org
Subject: Re: bug#78506: 30.1.90; todo-mode item insertion bug (followup bug)
Date: Tue, 20 May 2025 15:39:51 +0200
On Tue, 20 May 2025 15:46:43 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:

>> Date: Tue, 20 May 2025 10:58:40 +0200
>> From:  Stephen Berman via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>> 
>> Since this fixes a bug introduced in Emacs 30.1, I
>> think it should be committed to the emacs-30 branch; is that ok?
>
> Yes, thanks.

Done with commit e0c6f3e7656 and closing the bug.  Thanks.

Steve Berman


This bug report was last modified 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.