emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Turning all my "all day events" FREE in an ics export
       [not found] <1374731113.85480.1719912621305.ref@mail.yahoo.com>
@ 2024-07-02  9:30 ` Jean Luc
  2024-07-02 14:29   ` [BUG] ox-icalendar does not support custom export snippets (was: Turning all my "all day events" FREE in an ics export) Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Jean Luc @ 2024-07-02  9:30 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]

When exporting orgmode calendars to ics, ox-icalendar unfortunately produces ics files where all events are considered "BUSY".

As most applications seem to conform to RFC 2445, at some point or another, the following line seems to be added to the ics file:

              X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY

I'd like to have all my "all day events" turn out "Free", ie with the following line:

            X-MICROSOFT-CDO-INTENDEDSTATUS:FREE

How can I do that?
--René

[-- Attachment #2: Type: text/html, Size: 960 bytes --]

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

* [BUG] ox-icalendar does not support custom export snippets (was: Turning all my "all day events" FREE in an ics export)
  2024-07-02  9:30 ` Turning all my "all day events" FREE in an ics export Jean Luc
@ 2024-07-02 14:29   ` Ihor Radchenko
  2024-07-02 22:53     ` Jack Kamm
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2024-07-02 14:29 UTC (permalink / raw)
  To: Jean Luc; +Cc: emacs-orgmode@gnu.org, Jack Kamm



CCing the maintainer.

Jean Luc <jlr_0@yahoo.com> writes:

> When exporting orgmode calendars to ics, ox-icalendar unfortunately
> produces ics files where all events are considered "BUSY".
>
> As most applications seem to conform to RFC 2445, at some point or
> another, the following line seems to be added to the ics file:
>
>               X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY

In my testing, this line is not produced by ox-icalendar. And it should
not - it is not a part of icalendar specification. Rather idiosyncratic
Microsoft Outlook extension to the format. (see
https://stackoverflow.com/questions/798016/vcalendar-show-as-free-busy-tentative-out-of-office)

The proper way to assign busy/free is
https://icalendar.org/iCalendar-RFC-5545/3-2-9-free-busy-time-type.html

> I'd like to have all my "all day events" turn out "Free", ie with the following line:
>
>             X-MICROSOFT-CDO-INTENDEDSTATUS:FREE
>
> How can I do that?

In theory, you should be able to do something like

#+ICALENDAR_VCALENDAR: X-MICROSOFT-CDO-INTENDEDSTATUS:FREE
or an equivalent export snippet, but ox-icalendar does not support such
thing. I believe that it should be considered a bug - we should provide
some means to produce text to be exported verbatim from inside Org files.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [BUG] ox-icalendar does not support custom export snippets (was: Turning all my "all day events" FREE in an ics export)
  2024-07-02 14:29   ` [BUG] ox-icalendar does not support custom export snippets (was: Turning all my "all day events" FREE in an ics export) Ihor Radchenko
@ 2024-07-02 22:53     ` Jack Kamm
  0 siblings, 0 replies; 3+ messages in thread
From: Jack Kamm @ 2024-07-02 22:53 UTC (permalink / raw)
  To: Ihor Radchenko, Jean Luc; +Cc: emacs-orgmode@gnu.org

Ihor Radchenko <yantar92@posteo.net> writes:

> CCing the maintainer.

Thanks Ihor. This issue dovetails nicely with the other recent iCalendar
issue [1] that I am still looking into (sorry for the tardiness)

> In theory, you should be able to do something like
>
> #+ICALENDAR_VCALENDAR: X-MICROSOFT-CDO-INTENDEDSTATUS:FREE
> or an equivalent export snippet, but ox-icalendar does not support such
> thing. I believe that it should be considered a bug - we should provide
> some means to produce text to be exported verbatim from inside Org files.

Yes I agree we should support this functionality. I see two basic ways:
first, as you suggest

#+ICALENDAR_VEVENT: X-MICROSOFT-CDO-INTENDEDSTATUS:FREE

Or alternatively,

#+begin_export icalendar
X-MICROSOFT-CDO-INTENDEDSTATUS:FREE
#+end_export

We could follow the example of the latex exporter which supports both
usages.

However I am not sure we can simply export verbatim -- we may need to
add additional checks. In particular various Org properties or special
keywords may also be exported as iCal properties (e.g. SCHEDULED as
DTSTART, or TODO as STATUS:NEEDS-ACTION), and we may want to handle
duplicate behavior -- for example, by default TODO could be exported as
STATUS:NEEDS-ACTION unless explicitly overridden by #ICALENDAR_STATUS
(this is also related to the discussion in [1]).

We could possibly use icalendar.el to parse the icalendar export
blocks/keywords to check for duplicate properties. icalendar.el provides
many useful parsing functions, though some are private methods
(e.g. icalendar--get-event-property) and may need to be copied (or we
could consider asking emacs-devel to make those methods public).

[1] https://list.orgmode.org/87r0cmu7lc.fsf@localhost/T/#t


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

end of thread, other threads:[~2024-07-02 22:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1374731113.85480.1719912621305.ref@mail.yahoo.com>
2024-07-02  9:30 ` Turning all my "all day events" FREE in an ics export Jean Luc
2024-07-02 14:29   ` [BUG] ox-icalendar does not support custom export snippets (was: Turning all my "all day events" FREE in an ics export) Ihor Radchenko
2024-07-02 22:53     ` Jack Kamm

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