From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#66395: 28.2; Todo-mode locks up when trying to edit an entry Date: Sat, 07 Oct 2023 23:27:46 +0200 Message-ID: <877cnyazsd.fsf@gmx.net> References: <871qe6ntf4.fsf@ndegruchy-wlt> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9749"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: LdBeth , 66395@debbugs.gnu.org To: "Nathan R. DeGruchy" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 07 23:29:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qpErM-0002LA-8b for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Oct 2023 23:29:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpEr5-0004Ro-Ba; Sat, 07 Oct 2023 17:28:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpEr3-0004Kv-4N for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2023 17:28:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpEqp-0000rR-CH for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2023 17:28:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpEr7-00085q-TF for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2023 17:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Oct 2023 21:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66395 X-GNU-PR-Package: emacs Original-Received: via spool by 66395-submit@debbugs.gnu.org id=B66395.169671410331050 (code B ref 66395); Sat, 07 Oct 2023 21:29:01 +0000 Original-Received: (at 66395) by debbugs.gnu.org; 7 Oct 2023 21:28:23 +0000 Original-Received: from localhost ([127.0.0.1]:56019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpEqV-00084j-EM for submit@debbugs.gnu.org; Sat, 07 Oct 2023 17:28:23 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:46927) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpEqT-00084U-Ag for 66395@debbugs.gnu.org; Sat, 07 Oct 2023 17:28:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1696714068; x=1697318868; i=stephen.berman@gmx.net; bh=I4RY0SMzuAthfZBrI7wGP/+pe/jZShXJTFwX0AW1zdc=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=aZxmgymoNQHq7FhI8rmlVdh1E14BLte1btD2YWO8jX0j9OY6ynywoateFSEBbT9O5/kdOEoB6qv 12UkYA5LccUKDnZ4DS9ZtC/v2Siqb/6Svx/7bRrTll962MbLMw8Uq2COSBwTRugpcU6vCZF1htf6W Lb47DwWfG8/MIRShBp9FiN0/aCBBmDXAeZYSVbo8kYzZFwmEojbuCmSIAOQ/HHA5iMVDPBzafIE/N 5QJw7rtRCBe/HUMWhhNRRVndxdISa1Qd3eLas/B1BRY/tZfDt4ZXdE6R9qStS2lW7T+2UB/fP1t0l ImjsWSpJdsX1FqW5M7+Fai2vbAqDTett1feA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfs2 ([89.246.37.18]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MXGr8-1r6G7u04Yo-00Yfbq; Sat, 07 Oct 2023 23:27:48 +0200 In-Reply-To: <871qe6ntf4.fsf@ndegruchy-wlt> (Nathan R. DeGruchy's message of "Sat, 7 Oct 2023 19:06:55 +0000") X-Provags-ID: V03:K1:Z6fHoH1tJ+j0XoPUvob+SONlHznSM93XGu1QFI6mrbnsaVdyiIk VDhvrHyXMVSyXUPX8SrI0NrFGWbEynFmMuYJaIrQEP+x8GzSDZhoC9COR9ZnaHO/o1rXT2D tF1g32KTHnnI6von4Y+NIPANi7ZXRkbpGtEpniB9jBhkAgurhmL/OC9eQ+UENhGxctSpnmE VzPtLmXeSUdc7W148W2eA== UI-OutboundReport: notjunk:1;M01:P0:RkVQVm+AEQo=;zEGVClysWX3sK5kNKbHAl/akMgF erIKFx7BVbq/Tb81tCwj5wyKsXNq+PMqWeMP4hzmmNTF2o1Ps4aP9U19lPtt8sK1HkK68IEPw CNQtSLwqV849/GPEbhUeJlM6CvDZUCD+OGyLLPGr4YgEsYDN3HAa9J52w+kFOA696yxbatsOD IWEBcwdF1HyC5KxCdFBzRYK+iXQadJ2N9ecOkpQI0QKzfYu6fQpj8MlFz3XytX6yXyByP9Tb4 CbtquCzHR/HglVNCJIrR63Uug49LNLKbXIHTg7CU/EOWP9XQMQo0mYYx/qABsLhsFybSNqc8J do3pTMyKjqyW1Un9W2jh7pkhonLoA+cM9UV1ryO0UDWAab0Ofyk2fZyDgDJMzW38WaZ0hYFod hycfbRtt+2OA/ZeeOqasYiiv7oHY4yxAJIjqO4qpyQTG7kY0+p4QF2qIGF0JxtKKjhVEGlpXM O9vrq4v0gEZT+GKWFJHv6k7VUAwhP3LBF0cRT/+lH9VZK/MdgifoNu9LAbtOkFVUlpd3cCrD4 K8s0J/Mk1JSCEpWIlGVMRumII0BxlLTinYcowJ4Rx3iEmYauwAs9WhCjxkhkqR8+L0JMiwebg GUjBkySsAkE/Xe6XREPi8UogfwLq5LYXWgBH49gxkf+VJetq33RU0zAqWHNuI499s+rD4R/Y9 jFh7nGRvqhLfxVMp4kIEuWfvgzaB6LIonOq0CBrNCyIIdiuJUv6i2zIDOKXbmAA6o50gPJ0GA 1vQ968vKI8ky1ujPhr5cO66bBIYZ9ayfIBKZnt1id8oZmx0aLrinXQx3+8643p1pYXwyBPoR X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272049 Archived-At: On Sat, 7 Oct 2023 19:06:55 +0000 "Nathan R. DeGruchy" wrote: > I am trying to explore using 'todo-mode' as a todo list and while I can > see and create entries in todo-mode using the normal functions, trying > to edit an item seems to cause emacs to soft-lock. I can reproduce this > in a config-less emacs via `emacs -Q`. > > Basically, I have a todo-file at $HOME/.config/emacs/todo/tasks.todo, > this was created when using `todo-show` initially. The contents are not > very complex: > > (("Emacs" . [1 0 0 0]) ("Home" . [1 0 0 0])) > --=3D=3D-- Emacs > [2023-10-07] Learn Todo Mode > > =3D=3D--=3D=3D DONE > --=3D=3D-- Home > [2023-10-07] Get new wiper blades > > =3D=3D--=3D=3D DONE > > When on either of the items, if I hit 'e' to edit them, it causes emacs > to lock up, specifically around `todo-done-item-p()`. I found this out > by enabling `toggle-debug-on-quit`, reproducing the error, and the > C-g'ing out of the loop/lockup. I also tried to trace through the > todo-edit-item with edebug-defun. Stepping through, it seems to reach > the same predicate function and ... stop. > > I'm not sure where to go from here. On Sat, 07 Oct 2023 14:37:00 -0500 LdBeth wrote: > As we have discussed on IRC, the nonstandard timestamp format is the cau= se. Yes. This is a duplicate of bug#55284. At the time that bug was reported, I didn't have time to try fixing it (being the todo-mode maintainer), and later, unfortunately, I forgot about it. I'll try to look into it soon, but, as I noted in that bug thread, I think it's not easy to fix. One issue is that todo-mode basically employs the same handling of date formats as diary-lib.el, and the ISO date style causes problems there too, see bug#55286. > The hang is cause by the while loop `todo-item-start' not properly handl= e 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)) > + (=3D (forward-line -1) 0))) > (point))) > > (defun todo-item-end () Thanks. Even though this doesn't eliminate other problems with using the ISO date style in todo-mode (or in the Emacs Diary), since it does prevent the infinite loop here, it may be a good stopgap. Steve Berman