From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Ekstrand Newsgroups: gmane.emacs.orgmode,gmane.emacs.bugs Subject: TODO progress regression in org-mode in Emacs pretest Date: Mon, 02 Feb 2009 12:31:34 -0600 Message-ID: <87fxiwlmgp.fsf@elehack.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2045397584==" X-Trace: ger.gmane.org 1233599757 11489 80.91.229.12 (2 Feb 2009 18:35:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2009 18:35:57 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: emacs-orgmode@gnu.org Original-X-From: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Mon Feb 02 19:37:11 2009 Return-path: Envelope-to: geo-emacs-orgmode@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LU3fR-00025f-4N for geo-emacs-orgmode@m.gmane.org; Mon, 02 Feb 2009 19:37:09 +0100 Original-Received: from localhost ([127.0.0.1]:42474 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LU3e3-0003JB-PT for geo-emacs-orgmode@m.gmane.org; Mon, 02 Feb 2009 13:35:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LU3di-0003Gs-St for emacs-orgmode@gnu.org; Mon, 02 Feb 2009 13:35:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LU3di-0003GR-Gq for emacs-orgmode@gnu.org; Mon, 02 Feb 2009 13:35:22 -0500 Original-Received: from [199.232.76.173] (port=44292 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LU3di-0003GG-AD for emacs-orgmode@gnu.org; Mon, 02 Feb 2009 13:35:22 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:54835 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LU3dh-0005xI-RX for emacs-orgmode@gnu.org; Mon, 02 Feb 2009 13:35:22 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LU3db-00029q-FE for emacs-orgmode@gnu.org; Mon, 02 Feb 2009 18:35:15 +0000 Original-Received: from elehack.net ([216.243.177.100]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Feb 2009 18:35:15 +0000 Original-Received: from michael by elehack.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Feb 2009 18:35:15 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 74 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: elehack.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:h6FkpZzSM427Sra3fWnwQIzn7qY= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.orgmode:10969 gmane.emacs.bugs:24843 Archived-At: --===============2045397584== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable I upgraded this morning from an Emacs CVS build from Jan 28 or 19 to the pretest release, and noticed a regression or undocumented change with respect to org-after-todo-statistics-hook. I am using the org-mode which is included in the pretest distribution. I have a function based on the code in section 5.5 of the Org manual to close projects when their subtasks are complete. Now, if I have a headline which does not have a subtask counter in it and toggle one of its children to DONE, my org-after-todo-statistics-hook function gets called with n-done and n-not-done values of 0. The parent headline thus has its TODO status changed. I don't think it matters too much, as my code worked before, but my hook function is `org-summary-todo' from the following. The first case of the cond is being activated. (defun mde-org-entry-is-project-p () "Query whether the current headline is a project, returning non-`nil' if it is and `nil' otherwise." (member "PROJECT" (org-get-tags-at))) ;;; Taken from Org Mode manual chapter 5.5 (defun org-summary-todo (n-done n-not-done) "Switch entry to DONE when all subentries are done, to TODO otherwise." (let ((org-log-done nil) (org-log-states nil)) (cond ((and (or (org-entry-is-todo-p) (mde-org-entry-is-project-p)) (=3D n-not-done 0)) (org-todo (if (mde-org-entry-is-project-p) "FINISHED" "DONE"))) ;; Entry is a project that is marked done ((and (mde-org-entry-is-project-p) (not (org-entry-is-todo-p)) (org-get-todo-state) (> n-not-done 0)) (org-todo 'none)) ;; Entry is a task ((and (not (mde-org-entry-is-project-p)) (not (org-entry-is-todo-p)) (org-get-todo-state) (> n-not-done 0)) (org-todo (org-get-todo-sequence-head)))))) There is a small chance that the problem was actually introduced a bit earlier, perhaps since my Jan 20 build, but I think I would have noticed it after at least the Jan 28 build. I have CC'd bug-gnu-emacs to get this in as a bug report there as well. =2D Michael =2D-=20 mouse, n: A device for pointing at the xterm in which you want to type. Confused by the strange files? I cryptographically sign my messages. For more information see . --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkmHPAYACgkQJMBfXHjb5YWUBACfVS7KPL9LKV1Fen3m9umc7qam +mgAn29LcCoeQDVZ795dBMQCity8fuzS =uaUD -----END PGP SIGNATURE----- --=-=-=-- --===============2045397584== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============2045397584==--