From: "Sébastien Delafond" <sdelafond@gmail.com>
To: emacs-orgmode@gnu.org
Subject: icalendar export skips todos with a scheduled time-range
Date: Thu, 12 Apr 2012 12:10:37 +0000 (UTC) [thread overview]
Message-ID: <20120412140601.494@usenet.piggo.com> (raw)
Hello,
From Debian bug #668496[0]:
If I have an org-file containing a todo with a scheduled date range, like
this:
,----[ foo.org ]
*** TODO Weekend with the lads
SCHEDULED: <2012-05-04 Fr>--<2012-05-08 Di>
`----
and try to export it via org-export-icalendar-this-file, the resulting
foo.ics will look like this
,----[ foo.ics ]
BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME:foo
PRODID:-//Friedrich Delgado//Emacs with Org-mode//EN
X-WR-TIMEZONE:Europe/Berlin
X-WR-CALDESC:nil
CALSCALE:GREGORIAN
END:VCALENDAR
`----
(i.e.: contain no appointments at all)
I think the responsible section of code may reside in
/usr/share/emacs23/site-lisp/org-mode/org-icalendar.el, line 360:
,----
(if (looking-at re2)
(progn
(goto-char (match-end 0))
(setq ts2 (match-string 1)
inc (not (string-match "[0-9]\\{1,2\\}:[0-9][0-9]" ts2))))
(setq tmp (buffer-substring (max (point-min)
(- pos org-ds-keyword-length))
pos)
ts2 (if (string-match "[0-9]\\{1,2\\}:[0-9][0-9]-\\([0-9]\\{1,2\\}:[0-9][0-9]\\)" ts)
(progn
(setq inc nil)
(replace-match "\\1" t nil ts))
ts)
deadlinep (string-match org-deadline-regexp tmp)
scheduledp (string-match org-scheduled-regexp tmp)
todo (org-get-todo-state)
;; donep (org-entry-is-done-p)
))
`----
From my basic understanding of the code-flow it looks like re2 ==
(concat "--?-?\\(" org-ts-regexp "\\)") is meant to match date-ranges,
but the code in the t branch of the if doesn't set deadlinep,
schedulep and todo, preventing all further processing of the entry.
But I may be wrong about the intentions of that function.
Cheers,
--Seb
[0] http://bugs.debian.org/668496
reply other threads:[~2012-04-12 12:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20120412140601.494@usenet.piggo.com \
--to=sdelafond@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).