Ihor Radchenko <yanta...@posteo.net> writes:

> Jack, may you take a look?
> Maybe we should just document `org-agenda-default-appointment-duration'
> to the manual?

I think it's a good start to document
`org-agenda-default-appoint-duration' in the manual, I drafted a patch
for it (attached).

IMO it should be possible for ox-icalendar to export events without
DTEND since the iCalendar spec explicitly allows this.  However it will
take me some time to look into it.  Maybe the best way would be to
introduce a new customization, `org-icalendar-default-duration', with
default value of 2 hours, but could be set to `nil' which would mean no
DTEND is created; and its value would be overridden when
`org-agenda-default-appoint-duration' is non-nil.  This would preserve
back-compatibility while allowing a new option to specify no duration,
or some other duration besides 2 hours.

>From d9596bff6f85162362e3a836e7bc631fc9f8361e Mon Sep 17 00:00:00 2001
From: Jack Kamm <jackk...@gmail.com>
Date: Sun, 18 May 2025 19:47:34 -0700
Subject: [PATCH] Document ox-icalendar use of
 org-agenda-default-appointment-duration

---
 doc/org-manual.org | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index d5d92b749..ae22f4caa 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -16590,6 +16590,12 @@ certain built-in types (see ~icalendar-export-sexp-enumerate-all~),
 are exported up to ~icalendar-export-sexp-enumeration-days~ into
 future.].
 
+#+vindex: org-agenda-default-appointment-duration
+If a timestamp contains a time, but doesn't have an explicit end time
+(i.e. time range), then by default the exported event will have a
+duration of 2 hours, but this can be overridden with
+~org-agenda-default-appointment-duration~.
+
 #+vindex: org-icalendar-include-todo
 The iCalendar export backend can also incorporate TODO entries based
 on the configuration of the ~org-icalendar-include-todo~ variable.
-- 
2.49.0

Reply via email to