emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* translating event sexps to org for org-caldav
@ 2016-11-19 22:43 Myles English
  2016-11-21 22:38 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Myles English @ 2016-11-19 22:43 UTC (permalink / raw)
  To: org mode


Hello,

After the recent discussion about org-caldav I thought I would give it a
try.  Unfortunately it won't work for my main diary that uses a lot of
sexps[fn:1]

From the org-caldav github page[fn:2] :

"""However, sexp-entries are insanely flexible, and there are limits as
to what the icalendar exporter will handle. For example, this here

** Regular event
   <%%(memq (calendar-day-of-week date) '(1 3 5))>

will not be exported at all."""

However, org-agenda uses these sexps to make entries in the agenda.

Would it be possible to reuse something from org-agenda to write these
entries as org items into a file that could be uploaded using
org-caldav?  Maybe org-get-entries-from-diary?  Is there a huge problem
with this that I haven't noticed?

Obviously this would just be a one-way push rather than a sync.

Thanks,
Myles


* Footnotes

[fn:1] I think I started using sexps just because org-mode can't do
e.g. "every Monday, *between these two dates*"

[fn:2] https://github.com/dengste/org-caldav

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

* Re: translating event sexps to org for org-caldav
  2016-11-19 22:43 translating event sexps to org for org-caldav Myles English
@ 2016-11-21 22:38 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2016-11-21 22:38 UTC (permalink / raw)
  To: Myles English; +Cc: org mode

Hello,

Myles English <mylesenglish@gmail.com> writes:

> From the org-caldav github page[fn:2] :
>
> """However, sexp-entries are insanely flexible, and there are limits as
> to what the icalendar exporter will handle. For example, this here
>
> ** Regular event
>    <%%(memq (calendar-day-of-week date) '(1 3 5))>
>
> will not be exported at all."""
>
> However, org-agenda uses these sexps to make entries in the agenda.
>
> Would it be possible to reuse something from org-agenda to write these
> entries as org items into a file that could be uploaded using
> org-caldav?  Maybe org-get-entries-from-diary?  Is there a huge problem
> with this that I haven't noticed?

This is tricky. Agenda has a notion of time span, "ox-icalendar" hasn't.
So you would have to test if sexp matches for every day between some
arbitrary chosen dates.

"ox-icalendar.el" relies on "icalendar.el" library, bundled with Emacs,
for converting diary entries. Alas, it doesn't handle sexp entries
either.

> [fn:1] I think I started using sexps just because org-mode can't do
> e.g. "every Monday, *between these two dates*"

I use `org-class' for that.

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2016-11-21 22:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-19 22:43 translating event sexps to org for org-caldav Myles English
2016-11-21 22:38 ` 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).