From stephen.berman@gmx.net Tue Jan 27 07:08:58 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 27 Jan 2009 15:08:58 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA,MURPHY_DRUGS_REL8 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0RF8sxn013943 for ; Tue, 27 Jan 2009 07:08:56 -0800 Received: from mail.gnu.org ([199.232.76.166]:57626 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LRpX1-000759-I7 for emacs-pretest-bug@gnu.org; Tue, 27 Jan 2009 10:07:15 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LRpYY-0005aI-WB for emacs-pretest-bug@gnu.org; Tue, 27 Jan 2009 10:08:52 -0500 Received: from mail.gmx.net ([213.165.64.20]:46756) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LRpYY-0005Zs-FN for emacs-pretest-bug@gnu.org; Tue, 27 Jan 2009 10:08:50 -0500 Received: (qmail invoked by alias); 27 Jan 2009 15:08:47 -0000 Received: from i59F57C0C.versanet.de (EHLO escher.local.home) [89.245.124.12] by mail.gmx.net (mp033) with SMTP; 27 Jan 2009 16:08:47 +0100 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1/86MIyqoT80E+QGOvaMVCsbh3PvWeAFm35EwyR02 /6eCBqZazc0UYW Received: by escher.local.home (Postfix, from userid 1000) id CF07B1D1242; Tue, 27 Jan 2009 16:08:45 +0100 (CET) From: Stephen Berman To: emacs-pretest-bug@gnu.org Subject: 23.0.60; todo-insert-item-here bug + patch Sender: steve@escher.local.home Date: Tue, 27 Jan 2009 16:08:45 +0100 Message-ID: <878wowyef6.fsf@escher.local.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Y-GMX-Trusted: 0 X-FuHaFi: 0.55 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) --=-=-= The following bug, reported in http://lists.gnu.org/archive/html/bug-gnu-emacs/2001-11/msg00234.html, still exists in the CVS trunk: From: Daniel Ortmann Subject: todo-mode: pressing "I" when at the end of the line inserts the todo information at the END of the current line To: bug-gnu-emacs@gnu.org Date: 06 Nov 2001 12:36:08 -0600 > Pressing "I" when at the end of the line inserts the todo information at > the END of the current line. It should add the new information to the > FRONT of the current line. In http://lists.gnu.org/archive/html/bug-gnu-emacs/2001-11/msg00429.html I pointed out that `I' (todo-insert-item-here) in fact inserts a new Todo entry anywhere and that, while this behavior is strictly consistent with the doc string, it is generally undesirable, and provided a patch to restrict the entry point. The patch was not committed to CVS, which is just as well, since it was deficient. Nevertheless, the existing definition remains buggy -- it could result in making the new entry inaccessible to Todo mode commands. For example, let a Todo mode category contain the following: */* 2009-01-27 15:30 steve: This is item1. Place point between "is" and "item1", type `I' and at the prompt `This is item2.'; now the category looks like this: */* 2009-01-27 15:30 steve: This is*/* 2009-01-27 15:30 steve: This is item2. item1. The new entry is not recognized as such by Todo mode commands. The attached patch fixes this by consistently inserting the new entry directly above the current entry (unless point is on an empty line, then it inserts the new entry there). 2009-01-20 Stephen Berman * calendar/todo-mode.el (todo-insert-item-here): Prevent insertion of a new entry inside of an existing entry. Minor code cleanup. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=todo-insert-item-here.diff Content-Description: todo-mode patch *** emacs/lisp/calendar/todo-mode.el.~1.72.~ 2009-01-09 11:48:58.000000000 +0100 --- emacs/lisp/calendar/todo-mode.el 2009-01-20 21:30:15.000000000 +0100 *************** *** 610,625 **** (defalias 'todo-cmd-inst 'todo-insert-item) (defun todo-insert-item-here () ! "Insert new TODO list entry under the cursor." ! (interactive "") ! (save-excursion ! (if (not (derived-mode-p 'todo-mode)) (todo-show)) ! (let* ((new-item (concat todo-prefix " " ! (read-from-minibuffer ! "New TODO entry: " ! (if todo-entry-prefix-function ! (funcall todo-entry-prefix-function)))))) ! (insert (concat new-item "\n"))))) (defun todo-more-important-p (line) "Ask whether entry is more important than the one at LINE." --- 610,629 ---- (defalias 'todo-cmd-inst 'todo-insert-item) (defun todo-insert-item-here () ! "Insert a new TODO list entry directly above the entry at point. ! If point is on an empty line, insert the entry there." ! (interactive) ! (if (not (derived-mode-p 'todo-mode)) (todo-show)) ! (let ((new-item (concat todo-prefix " " ! (read-from-minibuffer ! "New TODO entry: " ! (if todo-entry-prefix-function ! (funcall todo-entry-prefix-function)))))) ! (unless (and (bolp) (eolp)) (goto-char (todo-item-start))) ! (insert (concat new-item "\n")) ! (backward-char) ! ;; put point at start of new entry ! (goto-char (todo-item-start)))) (defun todo-more-important-p (line) "Ask whether entry is more important than the one at LINE." --=-=-=-- From cyd@stupidchicken.com Tue Jan 27 19:57:55 2009 Received: (at 2084-done) by emacsbugs.donarmstrong.com; 28 Jan 2009 03:57:56 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0S3vnIG014661 for <2084-done@emacsbugs.donarmstrong.com>; Tue, 27 Jan 2009 19:57:50 -0800 Received: by cyd.mit.edu (Postfix, from userid 1000) id 31C5D57E205; Tue, 27 Jan 2009 22:58:20 -0500 (EST) From: Chong Yidong To: Stephen Berman Cc: 2084-done@debbugs.gnu.org Subject: Re: 23.0.60; todo-insert-item-here bug + patch Date: Tue, 27 Jan 2009 22:58:20 -0500 Message-ID: <87bptscc9v.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > The new entry is not recognized as such by Todo mode commands. The > attached patch fixes this by consistently inserting the new entry > directly above the current entry (unless point is on an empty line, > then it inserts the new entry there). Applied, thanks. From unknown Sat Aug 16 19:16:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Wed, 25 Feb 2009 15:24:05 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator