emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: nicholas.dokos@hp.com
Cc: Rainer Stengele <rainer.stengele@online.de>, emacs-orgmode@gnu.org
Subject: Re: commenting out a SCHEDULED line does not remove todo from agenda.
Date: Thu, 17 Jan 2013 07:41:36 +0100	[thread overview]
Message-ID: <717C030F-136F-46CA-B0C0-5F9CB3560921@gmail.com> (raw)
In-Reply-To: <16014.1358398925@alphaville>


On 17.1.2013, at 06:02, Nick Dokos <nicholas.dokos@hp.com> wrote:

> Nick Dokos <nicholas.dokos@hp.com> wrote:
> 
>> Rainer Stengele <rainer.stengele@online.de> wrote:
>> 
>>> Hi!
>>> 
>>> Imagine you have a todo like this:
>>> 
>>> ***** TODO a task
>>>      SCHEDULED: <2013-01-16 Mi +2m>
>>> 
>>> 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:
>>> 
>>> 
>>> ***** TODO a task
>>>      # SCHEDULED: <2013-01-16 Mi +2m>
>>> 
>>> The todo still appears in the agenda.
>>> Is this not counterintuitive?
>>> 
>> 
>> Try putting the # in column 1 (untested).
>> 
> 
> 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:
> 
> ,----
> | (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))))
> `----
> 
> 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


> 
> Nick
> 
> 
> 
> 

  reply	other threads:[~2013-01-17  6:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16 14:27 commenting out a SCHEDULED line does not remove todo from agenda Rainer Stengele
2013-01-16 16:49 ` Markus Heller
2013-01-16 16:57   ` Rainer Stengele
2013-01-16 17:40     ` Markus Heller
2013-01-16 17:48 ` Nick Dokos
2013-01-17  5:02   ` Nick Dokos
2013-01-17  6:41     ` Carsten Dominik [this message]
2013-01-17  8:54       ` Nick Dokos
2013-01-17  9:44         ` Rainer Stengele
2013-01-22 15:43           ` Bastien
2013-01-22 17:26             ` Rainer Stengele
2013-01-17 11:42         ` Carsten Dominik
2013-01-17 15:47           ` Nick Dokos
2013-01-17 21:42             ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=717C030F-136F-46CA-B0C0-5F9CB3560921@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicholas.dokos@hp.com \
    --cc=rainer.stengele@online.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).