emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* SCHEDULED in a comment line is not ignored by sparse-tree
@ 2014-12-03  6:37 James Harkins
  2014-12-03 14:54 ` Sebastien Vauban
  2014-12-23 11:24 ` Nicolas Goaziou
  0 siblings, 2 replies; 3+ messages in thread
From: James Harkins @ 2014-12-03  6:37 UTC (permalink / raw)
  To: orgmode

This appears to be buggy behavior, but I'm asking here first in case it might already have been fixed.

A couple of months ago, I was trying to create a repeating timestamp for two different days of the week. First I tried a diary-sexp, but that wasn't compatible with habits, so I gave that up. But I didn't want to throw away the string completely, because it took some digging to figure it out. So I put "# " at the beginning of the SCHEDULED line and thought that would be the end of it. (In the source block, "#" has two spaces before it. These come from C-c ' editing. In my original file, the "#" for the comment is flush left.)

#+BEGIN_SRC org
  ,** TODO Update lesson grades 2                                         :Comp:
     SCHEDULED: <2014-12-06 Sat 23:59 .+1w>
     :PROPERTIES:
     :STYLE:    habit
     :LOGGING:  TODO MAYBE INPROG MTG | DONE(!) POSTPONED CANCELED
     :END:
  #   SCHEDULED: <%%(memq (calendar-day-of-week date) '(3 6))>
#+END_SRC

Just now, I tried to open a sparse-tree view with a scheduled date range -- C-c / c c D (set range) -- and got the message:

byte-code: Bad timestamp `%%(memq (calendar-day-of-week date) '(3 6))'
Error was: (Not a standard Org-mode time string: %%(memq (calendar-day-of-week date) '(3 6)))

This is the only occurrence of memq anywhere in this org file, so it *must* be coming from this line. So, whatever regexp is handling scheduled timestamp searches doesn't check whether the line is a comment or not.

There may be a valid reason for this behavior, but I tend to think a comment should always be a comment.

hjh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-23 11:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-03  6:37 SCHEDULED in a comment line is not ignored by sparse-tree James Harkins
2014-12-03 14:54 ` Sebastien Vauban
2014-12-23 11:24 ` Nicolas Goaziou

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).