From b285023ca107f7c0fc8b89f7f636cf96bd217207 Mon Sep 17 00:00:00 2001 From: Morgan Smith Date: Thu, 4 Apr 2024 16:49:31 -0400 Subject: [PATCH] Document repeater deadline syntax and element api * dev/org-element-api.org (Timestamp): Add ':repeater-deadline-unit' and ':repeater-deadline-value'. * org-syntax.org (Timestamps): Separate definition of repeater and delay. Add repeater deadline to repeater definition. --- dev/org-element-api.org | 5 +++++ org-syntax.org | 32 +++++++++++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/dev/org-element-api.org b/dev/org-element-api.org index ffcda274..9d57238b 100644 --- a/dev/org-element-api.org +++ b/dev/org-element-api.org @@ -706,6 +706,11 @@ ** Timestamp (symbol: ~year~, ~month~, ~week~, ~day~, ~hour~ or ~nil~). - ~:repeater-value~ :: Value of shift, if a repeater is defined (integer or ~nil~). +- ~:repeater-deadline-unit~ :: Unit of shift, if a repeater deadline + is defined (symbol: ~year~, ~month~, ~week~, ~day~, ~hour~ or + ~nil~). +- ~:repeater-deadline-value~ :: Value of shift, if a repeater deadline + is defined (integer or ~nil~). - ~:type~ :: Type of timestamp (symbol: ~active~, ~active-range~, ~diary~, ~inactive~, ~inactive-range~). - ~:range-type~ :: Type of range (symbol: ~daterange~, ~timerange~ or diff --git a/org-syntax.org b/org-syntax.org index bdd372d1..cf477655 100644 --- a/org-syntax.org +++ b/org-syntax.org @@ -1743,13 +1743,13 @@ ** Timestamps Timestamps are structured according to one of the seven following patterns: #+begin_example -<%%(SEXP)> (diary) - (active) -[DATE TIME REPEATER-OR-DELAY] (inactive) --- (active range) - (active range) -[DATE TIME REPEATER-OR-DELAY]--[DATE TIME REPEATER-OR-DELAY] (inactive range) -[DATE TIME-TIME REPEATER-OR-DELAY] (inactive range) +<%%(SEXP)> (diary) + (active) +[DATE TIME REPEATER DELAY] (inactive) +-- (active range) + (active range) +[DATE TIME REPEATER DELAY]--[DATE TIME REPEATER DELAY] (inactive range) +[DATE TIME-TIME REPEATER DELAY] (inactive range) #+end_example + SEXP :: A string consisting of any characters but =>= and =\n=. @@ -1763,20 +1763,26 @@ ** Timestamps + TIME (optional) :: An instance of the pattern =H:MM= where =H= represents a one to two digit number (and can start with =0=), and =M= represents a single digit. -+ REPEATER-OR-DELAY (optional) :: An instance of the following pattern: ++ REPEATER (optional) :: An instance of the following pattern: #+begin_example MARK VALUE UNIT +MARK VALUE UNIT/VALUE UNIT #+end_example Where MARK, VALUE and UNIT are not separated by whitespace characters. - MARK :: Either the string =+= (cumulative type), =++= (catch-up type), - or =.+= (restart type) when forming a repeater, and either =-= (all - type) or =--= (first type) when forming a warning delay. + or =.+= (restart type). + - VALUE :: A number + - UNIT :: Either the character =h= (hour), =d= (day), =w= (week), =m= + (month), or =y= (year) ++ DELAY (optional) :: An instance of the following pattern: + #+begin_example +MARK VALUE UNIT + #+end_example + Where MARK, VALUE and UNIT are not separated by whitespace characters. + - MARK :: Either =-= (all type) or =--= (first type). - VALUE :: A number - UNIT :: Either the character =h= (hour), =d= (day), =w= (week), =m= (month), or =y= (year) - -There can be two instances of =REPEATER-OR-DELAY= in the timestamp: one -as a repeater and one as a warning delay. *Examples* -- 2.41.0