From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: commenting out a SCHEDULED line does not remove todo from agenda. Date: Thu, 17 Jan 2013 07:41:36 +0100 Message-ID: <717C030F-136F-46CA-B0C0-5F9CB3560921@gmail.com> References: <8696.1358358500@alphaville> <16014.1358398925@alphaville> Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvjAN-0006i9-G8 for emacs-orgmode@gnu.org; Thu, 17 Jan 2013 01:41:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvjAJ-0002qz-FC for emacs-orgmode@gnu.org; Thu, 17 Jan 2013 01:41:35 -0500 Received: from mail-lb0-f170.google.com ([209.85.217.170]:49889) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvjAJ-0002qp-6M for emacs-orgmode@gnu.org; Thu, 17 Jan 2013 01:41:31 -0500 Received: by mail-lb0-f170.google.com with SMTP id j14so1639490lbo.1 for ; Wed, 16 Jan 2013 22:41:29 -0800 (PST) In-Reply-To: <16014.1358398925@alphaville> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: Rainer Stengele , emacs-orgmode@gnu.org On 17.1.2013, at 06:02, Nick Dokos wrote: > Nick Dokos wrote: >=20 >> Rainer Stengele wrote: >>=20 >>> Hi! >>>=20 >>> Imagine you have a todo like this: >>>=20 >>> ***** TODO a task >>> SCHEDULED: <2013-01-16 Mi +2m> >>>=20 >>> Now suppose you want to put that todo on hold. In order to no more = see >>> the scheduled date in the agenda I comment out the "SCHEDULED" line. >>> I do not want to delete it because I maybe need it later again: >>>=20 >>>=20 >>> ***** TODO a task >>> # SCHEDULED: <2013-01-16 Mi +2m> >>>=20 >>> The todo still appears in the agenda. >>> Is this not counterintuitive? >>>=20 >>=20 >> Try putting the # in column 1 (untested). >>=20 >=20 > I've now tested it and it is as I thought: the comment character has = to > be in column 1. The reason is org-agenda-skip: >=20 > ,---- > | (defun org-agenda-skip () > | "Throw to `:skip' in places that should be skipped. > | Also moves point to the end of the skipped region, so that search = can > | continue from there." > | (let ((p (point-at-bol)) to) > | (when (org-in-src-block-p t) (throw :skip t)) > | (and org-agenda-skip-archived-trees (not = org-agenda-archives-mode) > | (get-text-property p :org-archived) > | (org-end-of-subtree t) > | (throw :skip t)) > | (and org-agenda-skip-comment-trees > | (get-text-property p :org-comment) > | (org-end-of-subtree t) > | (throw :skip t)) > | (if (equal (char-after p) ?#) (throw :skip t)) > | (when (setq to (or (org-agenda-skip-eval = org-agenda-skip-function-global) > | (org-agenda-skip-eval org-agenda-skip-function))) > | (goto-char to) > | (throw :skip t)))) > `---- >=20 > It sets p to the point at the beginning of the line and then > checks if the character after it is '#'. Only then does it skip > the entry. And this is done for speed. Maybe Moore's law has progressed enough to = relax this assumption? - Carsten >=20 > Nick >=20 >=20 >=20 >=20