From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#2084: marked as done (23.0.60; todo-insert-item-here bug + patch) Date: Wed, 28 Jan 2009 04:05:05 +0000 Message-ID: References: <87bptscc9v.fsf@cyd.mit.edu> <878wowyef6.fsf@escher.local.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1233115505-16305-0" X-Trace: ger.gmane.org 1233116672 4377 80.91.229.12 (28 Jan 2009 04:24:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Jan 2009 04:24:32 +0000 (UTC) To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 28 05:25:46 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LS1zj-0002rU-9a for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Jan 2009 05:25:43 +0100 Original-Received: from localhost ([127.0.0.1]:34121 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LS1yR-0005a3-1N for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Jan 2009 23:24:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LS1xg-000573-0x for bug-gnu-emacs@gnu.org; Tue, 27 Jan 2009 23:23:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LS1xd-00055q-HT for bug-gnu-emacs@gnu.org; Tue, 27 Jan 2009 23:23:34 -0500 Original-Received: from [199.232.76.173] (port=33932 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LS1xd-00055n-6a for bug-gnu-emacs@gnu.org; Tue, 27 Jan 2009 23:23:33 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:60791) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LS1xb-0005aO-Rk for bug-gnu-emacs@gnu.org; Tue, 27 Jan 2009 23:23:32 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0S4NT4P021465; Tue, 27 Jan 2009 20:23:30 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n0S456W4016840; Tue, 27 Jan 2009 20:05:06 -0800 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 2084 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:24667 Archived-At: This is a multi-part message in MIME format... ------------=_1233115505-16305-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Tue, 27 Jan 2009 22:58:20 -0500 with message-id <87bptscc9v.fsf@cyd.mit.edu> and subject line Re: 23.0.60; todo-insert-item-here bug + patch has caused the Emacs bug report #2084, regarding 23.0.60; todo-insert-item-here bug + patch to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 2084: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D2084 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1233115505-16305-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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." --=-=-=-- ------------=_1233115505-16305-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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@emacsbugs.donarmstrong.com 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. ------------=_1233115505-16305-0--