From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: todo mode broken? Date: Sun, 03 Oct 2004 23:06:57 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1096838454 14505 80.91.229.6 (3 Oct 2004 21:20:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 3 Oct 2004 21:20:54 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 03 23:20:45 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CEDme-000629-00 for ; Sun, 03 Oct 2004 23:20:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CEDtD-00048G-0C for geh-help-gnu-emacs@m.gmane.org; Sun, 03 Oct 2004 17:27:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CEDt3-000483-2t for help-gnu-emacs@gnu.org; Sun, 03 Oct 2004 17:27:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CEDt2-00047e-4y for help-gnu-emacs@gnu.org; Sun, 03 Oct 2004 17:27:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CEDt1-00047b-VX for help-gnu-emacs@gnu.org; Sun, 03 Oct 2004 17:27:20 -0400 Original-Received: from [80.91.229.2] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CEDm9-0006wD-QA for help-gnu-emacs@gnu.org; Sun, 03 Oct 2004 17:20:14 -0400 Original-Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CEDm3-0003k8-00 for ; Sun, 03 Oct 2004 23:20:07 +0200 Original-Received: from p50878b7e.dip0.t-ipconnect.de ([80.135.139.126]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Oct 2004 23:20:07 +0200 Original-Received: from Stephen.Berman by p50878b7e.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Oct 2004 23:20:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 124 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: p50878b7e.dip0.t-ipconnect.de User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:21033 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:21033 On Wed, 29 Sep 2004 22:27:34 -0500 Daniel L Elliott wrote: > All, > > I am using GNU Emacs 21.3.1 which installed with Fedora Core 1. I am > having repeated difficulties with the todo mode. Apparently, it is not > adding categories to the .todo file correctly. I have tried deleting any > .todo file(s) on my machine and this continues to happen. > > Should I just download the latest version? Any other potential fix? > > - dan If the problem you're experiencing is the same as the one described below, then updating won't help, since the relevant code (todo-initial-setup) is the same in Emacs 21.3 and CVS Emacs. Perhaps the following patch I submitted to bug-gnu-emacs back in January 2002 might help you. --Steve Berman (My email address is no longer the one below, but the one in the From line of this email.) From: Stephen Berman Subject: Re: todo-mode error "todo-category-select: Search failed: ..." To: Klaus Zeitler Cc: bug-gnu-emacs@gnu.org Date: 24 Jan 2002 16:54:49 +0100 Klaus Zeitler writes: > In GNU Emacs 21.1.1 (hppa2.0-hp-hpux10.20, OSF/Motif Version 1.2.6) [...] > 1. start emacs with options -q --no-site-file > 2. M-x todo-insert-item "entry1" > specify a category e.g. "cat1" > 3. type s and q to save and quit > 4. M-x todo-show > shows the item in category "Todo" instead of category "cat1" > and now entering "+" i.e. todo-forward-category results in error: > > todo-category-select: Search failed: "^\\*/\\* --- cat1$" > > the todo-do file contains: > > -*- mode: todo; todo-categories: ("Todo" "cat1" "Todo" "Todo"); -*- > */* --- Todo > */* 2001-12-07 15:08 kzeitler: entry1 > --- End > */* --------------------------------------------------------------------------- > > i.e. the new category "cat1" is entered in the list of categories but the > item is entered in the block of "Todo" items and there's no block > for "cat1" items. > > Besides the variable todo-categories in the mode header > looks a bit odd too: ("Todo" "cat1" "Todo" "Todo") The following patch fixes this problem (to do this it was convenient to eliminate the default "Todo" category, so you just have to specify an initial category; I hope that's acceptable). In fixing this I also noticed that the original code for todo-insert-item with a prefix argument does just the opposite of what the docstring says; I've now made it comply with the docstring. --Steve Berman *** todo-mode.el Tue Jan 15 15:58:49 2002 (version 1.50) --- todo-mode.el Thu Jan 24 16:31:35 2002 *************** *** 609,618 **** (current-category (nth todo-category-number todo-categories)) (category (if arg ! current-category ! (completing-read (concat "Category [" current-category "]: ") ! (todo-category-alist) nil nil nil ! history current-category)))) (todo-add-item-non-interactively new-item category)))) (defalias 'todo-cmd-inst 'todo-insert-item) --- 727,736 ---- (current-category (nth todo-category-number todo-categories)) (category (if arg ! (completing-read (concat "Category [" current-category "]: ") ! (todo-category-alist) nil nil nil ! history current-category) ! current-category))) (todo-add-item-non-interactively new-item category)))) (defalias 'todo-cmd-inst 'todo-insert-item) *************** *** 954,963 **** (defun todo-initial-setup () "Set up things to work properly in TODO mode." ! (find-file todo-file-do) ! (erase-buffer) ! (todo-mode) ! (todo-add-category "Todo")) (provide 'todo-mode) --- 1202,1213 ---- (defun todo-initial-setup () "Set up things to work properly in TODO mode." ! (let ((first (read-from-minibuffer "Enter a new category: "))) ! (find-file todo-file-do) ! (erase-buffer) ! (todo-mode) ! (todo-add-category first) ! (write-file todo-file-do))) (provide 'todo-mode) _______________________________________________ Bug-gnu-emacs mailing list Bug-gnu-emacs@gnu.org http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs