Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-04-16 Thread Jack Kamm
Ihor Radchenko writes: >> So technically, a standalone DEADLINE + repeater isn't allowed -- a >> repeating task must always have a start date. > > May we then use org-deadline-warning-days/timestamp warntime spec as DTSTART? > VALARM component is not fitting for warning days anyway. > >> But stil

Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-04-15 Thread Ihor Radchenko
Jack Kamm writes: > So the RRULE applies to both DTSTART and DUE, and the repeats continue > past DUE. > > But, another thing to note from the definition of DTSTART [2]: > > This property [DTSTART] is REQUIRED in all types of recurring > calendar components that specify the "RRULE" pr

Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-04-14 Thread Jack Kamm
Ihor Radchenko writes: > The question is: does iCalendar allow something like > > DTSTART;TZID=America/New_York:19970105T083000 > RRULE:FREQ=YEARLY > DUE;TZID=America/New_York:20070105T083000 > > and repeats past DUE? > > If not, we have to choose when exporting from Org source - either to > keep

Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-04-14 Thread Ihor Radchenko
Jack Kamm writes: > Ihor Radchenko writes: > >> Another scenario we may need to consider is when schedule has a repeater >> while deadline does not, and vice versa. The former scenario is probably >> valid - a VTODO with limited number of occurrences. > > That is an interesting idea; and we can

Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-04-14 Thread Jack Kamm
Ihor Radchenko writes: > Another scenario we may need to consider is when schedule has a repeater > while deadline does not, and vice versa. The former scenario is probably > valid - a VTODO with limited number of occurrences. That is an interesting idea; and we can use the UNTIL or COUNT keywor

Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-04-02 Thread Ihor Radchenko
Jack Kamm writes: > Attached is the (I think) final version of the patch. I'll install it > soon, unless I hear otherwise. I have no further comments. Thanks! -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at

Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-04-02 Thread Jack Kamm
Ihor Radchenko writes: > Looks reasonable, but I have one comment on the code. > We should not use user-defined hooks for things that must be executed. > Instead, we should better explicitly call the necessary functions. Thanks, I updated the patch to explicitly call the function. Also, I tweak

Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-04-02 Thread Ihor Radchenko
Jack Kamm writes: >> We likely want (according to 34.10.1 Basic Concepts of Coding Systems): > > I attach a new patch, which takes the approach of converting to > utf-8-dos in `org-icalendar-after-save-hook', instead of converting > newlines in `org-icalendar-fold-string'. > > I think this way is

Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-04-01 Thread Jack Kamm
Ihor Radchenko writes: > So, we should probably override `org-export-coding-system', even when it > is set. iCalendar demands UTF8 anyway. Also, ox-icalendar already sets ":ascii-charset utf-8" in the ext-plist during export. > We likely want (according to 34.10.1 Basic Concepts of Coding Syste

Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-04-01 Thread Ihor Radchenko
Jack Kamm writes: > For issue 1, what `org-icalendar-fold-string' does when string already > contains \r\n, you can see that it produces \r\r\n as follows: > > emacs -Q -l ox-icalendar > M-: > (org-icalendar-fold-string (org-icalendar-fold-string "Line1\nLine2")) > > This is why the patch removes

Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-03-31 Thread Jack Kamm
Ihor Radchenko writes: > I now only have one minor concern about `org-icalendar-fold-string' when > the original buffer contains DOS line endings. May they mess things up > producing \r\r\n? There are 2 issues here: what does `org-icalendar-fold-string' do when string already contains \r, and wh

Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-03-31 Thread Ihor Radchenko
Jack Kamm writes: >> I am looking at >> https://icalendar.org/iCalendar-RFC-5545/3-6-2-to-do-component.html, and >> I note that only BEGIN:VTODO and END:VTODO lines must actually have >> CRLF. For example, >> https://icalendar.org/iCalendar-RFC-5545/3-3-11-text.html has no >> mentions of CRLF, bu

Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-03-31 Thread Jack Kamm
Ihor Radchenko writes: > Thanks! > Note that I did not implement my suggestion because I am concerned if > putting CRLF is safe as every single line ending. > > I am looking at > https://icalendar.org/iCalendar-RFC-5545/3-6-2-to-do-component.html, and > I note that only BEGIN:VTODO and END:VTODO

Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-03-31 Thread Ihor Radchenko
Jack Kamm writes: > However you are right that other parts of the iCalendar export have > inconsistent line endings. Currently, VEVENT and VTODO components have > the correct CRLF endings, but the other parts of the VCALENDAR do not > (such as the preamble). > > I like your suggestion in the abov

Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-03-30 Thread Jack Kamm
Ihor Radchenko writes: > Side note: here, and in other places, we use "\n" as end of line. Yet, > for example > https://icalendar.org/iCalendar-RFC-5545/3-8-2-4-date-time-start.html > prescribes CRLF (\r\n). Also, see > https://orgmode.org/list/87ilgljv6i.fsf@localhost > If you are familiar with

Re: [RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-03-27 Thread Ihor Radchenko
Jack Kamm writes: > For patch 1 (unscheduled tasks): > > Currently, ox-icalendar does not allow creating an iCalendar task > without a scheduled start date. If an Org TODO is missing a SCHEDULED > timestamp, then ox-icalendar sets today as the scheduled start date for > the exported task. > > Pat

[RFC] ox-icalendar: Unscheduled tasks & repeating tasks

2023-03-26 Thread Jack Kamm
Hello, The attached 2 patches add support for exporting unscheduled tasks and repeating tasks to iCalendar, respectively. For patch 1 (unscheduled tasks): Currently, ox-icalendar does not allow creating an iCalendar task without a scheduled start date. If an Org TODO is missing a SCHEDULED times