emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 183d0fa 2/4: Fixed timestamp bug in scheduled! and deadlin


From: Ian Dunn
Subject: [elpa] master 183d0fa 2/4: Fixed timestamp bug in scheduled! and deadline! actions
Date: Sat, 2 Feb 2019 17:09:05 -0500 (EST)

branch: master
commit 183d0fa22df300f8c453f1f59bd5ea5da9d56a18
Author: Ian Dunn <address@hidden>
Commit: Ian Dunn <address@hidden>

    Fixed timestamp bug in scheduled! and deadline! actions
    
    * org-edna.el (org-edna-timestamp-format): New defcustom.
      (org-edna--determine-timestamp-format): New helper function.
      (org-edna--handle-planning): Use it.
      (org-edna-action/scheduled!):
      (org-edna-action/deadline!): Document the format handling.
      (org-edna-reset-cache): Renamed from org-edna-invalidate-cache.
      (org-edna-action/tag!):
      (org-edna--heading-matches):
      (org-edna-entry-has-tags-p): Updated to use new tag API.
    
    * org-edna-tests.el (org-edna-action-tag): Fixed failing test.
      (org-edna-user-test/time-spec): New test.
    
    * org-edna-tests.org (User Example): New section of tests.
    
    * org-edna.org (Timestamp Format): New section.
      (Finder Cache): Mention reset function.
      (1.0.2): New section.
---
 org-edna-tests.el  |  22 ++---
 org-edna-tests.org |  12 +++
 org-edna.el        |  95 +++++++++++++++++---
 org-edna.info      | 251 ++++++++++++++++++++++++++++++++---------------------
 org-edna.org       |  37 +++++++-
 5 files changed, 293 insertions(+), 124 deletions(-)

diff --git a/org-edna-tests.el b/org-edna-tests.el
index 331438f..c877321 100644
--- a/org-edna-tests.el
+++ b/org-edna-tests.el
@@ -1210,11 +1210,7 @@ This avoids org-id digging into its internal database."
     ;; The second Monday after Mar 12th, 2000 (Mar 20th)
     (org-edna-action/scheduled! nil "float 2 monday Mar 12")
     (should (string-equal (org-entry-get nil "SCHEDULED")
-                          "<2000-03-20 Mon 00:00>"))
-    ;; Back to Saturday for other tests
-    (org-edna-action/scheduled! nil "2000-01-15 Sat 00:00")
-    (should (string-equal (org-entry-get nil "SCHEDULED")
-                          "<2000-01-15 Sat 00:00>"))))
+                          "<2000-03-20 Mon 00:00>"))))
 
 (ert-deftest org-edna-action-deadline/wkdy ()
   (org-edna-with-test-heading "0d491588-7da3-43c5-b51a-87fbd34f79f7"
@@ -1360,18 +1356,14 @@ This avoids org-id digging into its internal database."
     ;; The second Monday after Mar 12th, 2000 (Mar 20th)
     (org-edna-action/deadline! nil "float 2 monday Mar 12")
     (should (string-equal (org-entry-get nil "DEADLINE")
-                          "<2000-03-20 Mon 00:00>"))
-    ;; Back to Saturday for other tests
-    (org-edna-action/deadline! nil "2000-01-15 Sat 00:00")
-    (should (string-equal (org-entry-get nil "DEADLINE")
-                          "<2000-01-15 Sat 00:00>"))))
+                          "<2000-03-20 Mon 00:00>"))))
 
 (ert-deftest org-edna-action-tag ()
   (org-edna-with-test-heading org-edna-test-id-heading-one
     (org-edna-action/tag! nil "tag")
     (should (equal (org-get-tags) '("tag")))
     (org-edna-action/tag! nil "")
-    (should (equal (org-get-tags) '("")))))
+    (should (equal (org-get-tags) nil))))
 
 (ert-deftest org-edna-action-property ()
   (org-edna-with-test-heading org-edna-test-id-heading-one
@@ -2037,6 +2029,14 @@ the relative finders all still work while cache is 
enabled."
       ;; Verify that 3 is no longer blocked.
       (should (not (org-edna-test-check-block third-pom "Check after 
Both"))))))
 
+(ert-deftest org-edna-user-test/time-spec ()
+  (org-edna-doc-test-setup "5b63293c-23ef-40e7-ad8e-093e4c1e1464"
+    (pcase-let* ((`(,first-pom ,second-pom ,third-pom) 
(org-edna-test-children-marks)))
+      (org-edna-test-mark-done first-pom)
+      ;; Test time is 2000-01-15, so this should be a week later
+      (should (string-equal (org-entry-get second-pom "SCHEDULED")
+                            "<2000-01-22 Sat>")))))
+
 (provide 'org-edna-tests)
 
 ;;; org-edna-tests.el ends here
diff --git a/org-edna-tests.org b/org-edna-tests.org
index 8553cc4..e58ac0f 100644
--- a/org-edna-tests.org
+++ b/org-edna-tests.org
@@ -361,3 +361,15 @@ DEADLINE: <2000-01-15 Sat +1d>
 :PROPERTIES:
 :BLOCKER:  previous-sibling !done? ids(1942caf2-caad-4757-b689-3c0029c1d8a5) 
!done?
 :END:
+* User Examples
+** Test to show undesired time spec added to generated SCHEDULED datestamp
+:PROPERTIES:
+:ID:       5b63293c-23ef-40e7-ad8e-093e4c1e1464
+:END:
+*** TODO task 1
+DEADLINE: <2019-02-15 Fri +1y -2w>
+:PROPERTIES:
+:TRIGGER:  next-sibling scheduled!("++7d")
+:END:
+*** TODO task 2
+*** TODO task 3
diff --git a/org-edna.el b/org-edna.el
index f050af7..b2398c7 100644
--- a/org-edna.el
+++ b/org-edna.el
@@ -62,6 +62,35 @@ properties used during actions or conditions."
   :group 'org-edna
   :type 'boolean)
 
+(defcustom org-edna-timestamp-format 'short
+  "Default timestamp format for scheduling and deadlines.
+
+This is either 'short for short format (no time spec), or
+'long (includes time spec).
+
+When using the schedule! or deadline! actions with the ++
+modifier, the current time will be used as the base time.  This
+leaves the potential for having no \"template\" timestamp to use
+for the format.  This is in contrast to the + modifier, which
+uses the current timestamp's format.
+
+The timestamp is chosen in one of three ways:
+
+1. If the target heading already has a timestamp, that format is
+used.
+
+2. If the modifier \"thing\" is minutes or hours, long format
+will always be used.
+
+3. If the property EDNA_TS_FORMAT is set on the target heading,
+it will be used.  It should be either \"short\" or
+\"long\" (without quotes).
+
+4. Fallback to this variable."
+  :group 'org-edna
+  :type '(choice (const :tag "Short Format" 'short)
+                 (const :tag "Long Format" 'long)))
+
 ;;; Form Parsing
 
 ;; 3 types of "forms" here
@@ -593,8 +622,8 @@ following reasons:
         ;; Adds the entry to the cache, and returns the results.
         (org-edna--add-to-finder-cache func-sym args)))))
 
-(defun org-edna-invalidate-cache ()
-  "Invalidate the finder cache.
+(defun org-edna-reset-cache ()
+  "Reset the finder cache.
 
 Use this only if there's a problem with the cache.
 
@@ -829,7 +858,7 @@ Return a list of markers for the descendants."
 
 (defun org-edna-entry-has-tags-p (&rest tags)
   "Return non-nil if the current entry has any tags in TAGS."
-  (when-let* ((entry-tags (org-get-tags-at)))
+  (when-let* ((entry-tags (org-get-tags nil t)))
     (seq-intersection tags entry-tags)))
 
 (defun org-edna--get-timestamp-time (pom &optional inherit)
@@ -1401,12 +1430,16 @@ required."
                          ("y" . 5)))
          (regexp (rx-to-string
                   `(and string-start
+                        ;; Match 1: [+-]
                         (submatch (repeat 0 2 (in ?+ ?-)))
+                        ;; Match 2: Digits
                         (submatch (zero-or-more digit))
+                        ;; Match 3: type string (weekday, unit)
                         (submatch (or (any ,@(mapcar 'car type-strings))
                                       "weekday" "wkdy"
                                       ,@weekdays)
                                   word-end)
+                        ;; Match 4 (optional): Landing specifier
                         (zero-or-one
                          (submatch (and (one-or-more " ")
                                         (submatch (zero-or-one (in ?+ ?-)))
@@ -1600,6 +1633,35 @@ DEFAULT (++/--)."
         ;; Return the same arguments as `org-edna--read-date-get-relative' 
above.
         (list (- abs-days-then abs-days-now) "d" rel)))))
 
+(defun org-edna--determine-timestamp-format (thing old-ts)
+  ;; Returns the argument to pass to `org-timestamp-format':
+  ;; t for long format (with time), nil for short format (no time).
+  ;; thing is a symbol: year, month, day, hour, minute
+  ;; old-ts is a timestamp string for the current entry
+  (let* ((spec-ts-format (org-entry-get nil "EDNA_TS_FORMAT")))
+    (cond
+     ;; An old timestamp exists, so use that format.
+     (old-ts
+      ;; Returns t for long, nil for short, as we do.
+      (org-timestamp-has-time-p
+       (org-timestamp-from-string old-ts)))
+     ;; If THING is minutes or hours, then a timestamp is required.
+     ((memq thing '(minute hour)) t)
+     ;; User specified the EDNA_TS_FORMAT property, so use it.
+     (spec-ts-format
+      (pcase spec-ts-format
+        ("long" t)
+        ("short" nil)
+        (_ (error "Unknown Edna timestamp format %s; expected \"long\" or 
\"short\"" spec-ts-format))))
+     ;; Fallback to customizable variable.
+     (t
+      (pcase org-edna-timestamp-format
+        (`long t)
+        (`short nil)
+        (_ (error "Invalid value for org-edna-timestamp-format %s; expected 
'long or 'short"
+                  org-edna-timestamp-format)))))))
+
+
 (defun org-edna--handle-planning (type last-entry args)
   "Handle planning of type TYPE.
 
@@ -1610,7 +1672,6 @@ ARGS is a list of arguments; currently, only the first is 
used."
          (this-ts (org-edna--get-planning-info type))
          (this-time (and this-ts (org-time-string-to-time this-ts)))
          (current (org-current-time))
-         (current-ts (format-time-string (org-time-stamp-format t) current))
          (type-map '(("y" . year)
                      ("m" . month)
                      ("d" . day)
@@ -1626,16 +1687,20 @@ ARGS is a list of arguments; currently, only the first 
is used."
       (org-add-planning-info type last-ts))
      ((string-match-p "\\`float " arg)
       (pcase-let* ((`(,n ,what-string ,def) (org-edna--float-time arg 
this-time current))
-                   (ts (if def current-ts this-ts))
-                   (what (cdr (assoc-string what-string type-map))))
+                   (what (cdr (assoc-string what-string type-map)))
+                   (ts-format (org-edna--determine-timestamp-format what 
this-ts))
+                   (current-ts (format-time-string (org-time-stamp-format 
ts-format) current))
+                   (ts (if def current-ts this-ts)))
         (org--deadline-or-schedule nil type (org-edna--mod-timestamp ts n 
what))))
      ((string-match-p "\\`[+-]" arg)
       ;; Starts with a + or -, so assume we're incrementing a timestamp
       ;; We support hours and minutes, so this must be supported separately,
       ;; since org-read-date-analyze doesn't
       (pcase-let* ((`(,n ,what-string ,def) (org-edna--read-date-get-relative 
arg this-time current))
-                   (ts (if def current-ts this-ts))
-                   (what (cdr (assoc-string what-string type-map))))
+                   (what (cdr (assoc-string what-string type-map)))
+                   (ts-format (org-edna--determine-timestamp-format what 
this-ts))
+                   (current-ts (format-time-string (org-time-stamp-format 
ts-format) current))
+                   (ts (if def current-ts this-ts)))
         ;; Ensure that the source timestamp exists
         (unless ts
           (error "Tried to increment a non-existent timestamp"))
@@ -1694,7 +1759,10 @@ form will set the target's scheduled time to the date of 
the Nth
 DAYNAME after/before MONTH DAY.  MONTH may be a month string or
 an integer.  Use 0 or leave blank for the following or previous
 month.  DAY is an optional integer.  If not given, it will be
-1 (for forward) or the last day of MONTH (backward)."
+1 (for forward) or the last day of MONTH (backward).
+
+For information on how the new timestamp format is chosen when
+using ++, see `org-edna-timestamp-format'."
   (org-edna--handle-planning 'scheduled last-entry args))
 
 (defun org-edna-action/deadline! (last-entry &rest args)
@@ -1738,7 +1806,10 @@ form will set the target's scheduled time to the date of 
the Nth
 DAYNAME after/before MONTH DAY.  MONTH may be a month string or
 an integer.  Use 0 or leave blank for the following or previous
 month.  DAY is an optional integer.  If not given, it will be
-1 (for forward) or the last day of MONTH (backward)."
+1 (for forward) or the last day of MONTH (backward).
+
+For information on how the new timestamp format is chosen when
+using ++, see `org-edna-timestamp-format'."
   (org-edna--handle-planning 'deadline last-entry args))
 
 (defun org-edna-action/tag! (_last-entry tags)
@@ -1747,7 +1818,7 @@ month.  DAY is an optional integer.  If not given, it 
will be
 Edna Syntax: tag!(\"TAGS\")
 
 TAGS is a valid tag specification, such as \":aa:bb:cc:\"."
-  (org-set-tags-to tags))
+  (org-set-tags tags))
 
 (defun org-edna--string-is-numeric-p (string)
   "Return non-nil if STRING is a valid numeric string.
@@ -2053,7 +2124,7 @@ Block if the target heading has any of the tags tag1, 
tag2, etc."
   "Return non-nil if the current heading matches MATCH-STRING."
   (let* ((matcher (cdr (org-make-tags-matcher match-string)))
          (todo (org-entry-get nil "TODO"))
-         (tags (org-get-tags-at))
+         (tags (org-get-tags nil t))
          (level (org-reduced-level (org-outline-level))))
     (funcall matcher todo tags level)))
 
diff --git a/org-edna.info b/org-edna.info
index 78ba679..afedda2 100644
--- a/org-edna.info
+++ b/org-edna.info
@@ -100,9 +100,9 @@ Conditions
 Extending Edna
 
 * Naming Conventions::           How to name new functions
-* Finders: Finders 1.            Making a new finder
-* Actions: Actions 1.            Making a new action
-* Conditions: Conditions 1.      Making a new condition
+* Finders: Finders (1).          Making a new finder
+* Actions: Actions (1).          Making a new action
+* Conditions: Conditions (1).    Making a new condition
 
 Contributing
 
@@ -116,6 +116,7 @@ Contributing
 
 Changelog
 
+* 1.0.2: 102.
 * 1.0.1: 101.
 * 1.0: 10.
 * 1.0beta8: 10beta8.
@@ -142,7 +143,7 @@ Copyright (C) 2017-2018 Free Software Foundation, Inc.
 
      This program is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of
-     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      General Public License for more details.
 
      You should have received a copy of the GNU General Public License
@@ -271,7 +272,7 @@ Blockers
 ========
 
 A blocker indicates conditions which must be met in order for a heading
-to be marked as DONE. Typically, this will be a list of headings that
+to be marked as DONE.  Typically, this will be a list of headings that
 must be marked as DONE.
 
 
@@ -538,7 +539,7 @@ olp
 
    • Syntax: olp(“FILE” “OLP”)
 
-   Finds the heading given by OLP in FILE. Both arguments are strings.
+   Finds the heading given by OLP in FILE.  Both arguments are strings.
 
      * TODO Test
        :PROPERTIES:
@@ -805,7 +806,7 @@ following, PLANNING is either scheduled or deadline.
 
    • PLANNING!(“DATE[ TIME]”)
 
-     Sets PLANNING to DATE at TIME. If DATE is a weekday instead of a
+     Sets PLANNING to DATE at TIME.  If DATE is a weekday instead of a
      date, then set PLANNING to the following weekday.  If TIME is not
      specified, only a date will be added to the target.
 
@@ -890,6 +891,34 @@ scheduled!(“float 2 Tue Feb”)
 scheduled!(“float 3 Thu”)
      Set SCHEDULED to the third Thursday in the following month
 
+* Menu:
+
+* Timestamp Format::             Specifying a timestamp format
+
+
+File: org-edna.info,  Node: Timestamp Format,  Up: Scheduled/Deadline
+
+Timestamp Format
+................
+
+When using one of the planning modifiers, it isn’t always possible to
+deduce how the timestamp format will be chosen if using ++ or –.  The
+following method is used:
+
+  1. If the target heading already has a timestamp, that format is used.
+
+  2. If the modifier with the ++ or – is “h” or “M” (hours or minutes),
+     long format (includes time) is used.
+
+  3. If the property ‘EDNA_TS_FORMAT’ is set on the target heading, its
+     value will be used.  It should be either ‘long’ for long format
+     (includes time) or ‘short’ for short format (does not include
+     time).
+
+  4. The user variable ‘org-edna-timestamp-format’ is the final
+     fallback.  It should be either the symbol ‘long’ or ‘short’.  It
+     defaults to ‘short’.
+
 
 File: org-edna.info,  Node: TODO State,  Next: Archive,  Prev: 
Scheduled/Deadline,  Up: Actions
 
@@ -1164,6 +1193,13 @@ the form ‘match("daily")’ as part of their trigger, the 
results of that
 form will be cached.  When the next item is marked as DONE, the results
 will be searched for in cache, not recomputed.
 
+   When reverting Org mode files, the cache will often be invalidated.
+This isn’t the case for every Org mode file, so we can’t just tell Emacs
+to automatically reset the cache when reverting a file.  Instead, we
+provide the command ‘org-edna-reset-cache’ to reset the finder cache.
+If you notice headings that should be blocking but aren’t while cache is
+enabled, reset the cache and check again.
+
 
 File: org-edna.info,  Node: Conditions,  Next: Consideration,  Prev: Finder 
Cache,  Up: Advanced Features
 
@@ -1237,7 +1273,7 @@ Lisp Variable Set
    • Syntax: variable-set?(VARIABLE VALUE)
 
    Evaluate VARIABLE when visiting a target, and compare it with ‘equal’
-against VALUE. Block the source heading if VARIABLE = VALUE.
+against VALUE.  Block the source heading if VARIABLE = VALUE.
 
    VARIABLE should be a symbol, and VALUE is any valid lisp expression.
 
@@ -1425,7 +1461,7 @@ the blocking condition.
         :END:
 
    The above example blocks “Work on Edna” so long as at least half of
-the siblings are marked TODO. This means that three of them must be
+the siblings are marked TODO.  This means that three of them must be
 completed before development can begin on Edna.
 
    (4) blocks the current task if at least NUMBER of the targets meet
@@ -1442,7 +1478,7 @@ the blocking condition.
         :END:
 
    The above example blocks “Work on Edna” so long as two of the
-siblings are marked TODO. This means that NUMBER=1 is the same as
+siblings are marked TODO.  This means that NUMBER=1 is the same as
 specifying ‘any’.
 
    A consideration must be specified before the conditions to which it
@@ -1484,7 +1520,7 @@ simple; it’s just if/then/else/endif:
 
    Here’s how that reads:
 
-   “If CONDITION would not block, execute THEN. Otherwise, execute
+   “If CONDITION would not block, execute THEN.  Otherwise, execute
 ELSE.”
 
    For our nightly entries, this looks as follows:
@@ -1565,12 +1601,12 @@ org-edna-TYPE/KEYWORD.
 * Menu:
 
 * Naming Conventions::           How to name new functions
-* Finders: Finders 1.            Making a new finder
-* Actions: Actions 1.            Making a new action
-* Conditions: Conditions 1.      Making a new condition
+* Finders: Finders (1).          Making a new finder
+* Actions: Actions (1).          Making a new action
+* Conditions: Conditions (1).    Making a new condition
 
 
-File: org-edna.info,  Node: Naming Conventions,  Next: Finders 1,  Up: 
Extending Edna
+File: org-edna.info,  Node: Naming Conventions,  Next: Finders (1),  Up: 
Extending Edna
 
 Naming Conventions
 ==================
@@ -1590,7 +1626,7 @@ complications in the future, it’s best if everyone avoids 
using
 characters that may become reserved in the future.
 
 
-File: org-edna.info,  Node: Finders 1,  Next: Actions 1,  Prev: Naming 
Conventions,  Up: Extending Edna
+File: org-edna.info,  Node: Finders (1),  Next: Actions (1),  Prev: Naming 
Conventions,  Up: Extending Edna
 
 Finders
 =======
@@ -1604,7 +1640,7 @@ Finders have the form org-edna-finder/KEYWORD, like so:
 or nil if no targets were found.
 
 
-File: org-edna.info,  Node: Actions 1,  Next: Conditions 1,  Prev: Finders 1,  
Up: Extending Edna
+File: org-edna.info,  Node: Actions (1),  Next: Conditions (1),  Prev: Finders 
(1),  Up: Extending Edna
 
 Actions
 =======
@@ -1621,7 +1657,7 @@ target).
    The rest of the arguments are the arguments specified in the form.
 
 
-File: org-edna.info,  Node: Conditions 1,  Prev: Actions 1,  Up: Extending Edna
+File: org-edna.info,  Node: Conditions (1),  Prev: Actions (1),  Up: Extending 
Edna
 
 Conditions
 ==========
@@ -1701,7 +1737,7 @@ File: org-edna.info,  Node: Working with EDE,  Next: 
Compiling Edna,  Prev: Bugs
 Working with EDE
 ================
 
-Our build system uses EDE. EDE can be a little finicky at times, but we
+Our build system uses EDE.  EDE can be a little finicky at times, but we
 feel the benefits, namely package dependency handling and Makefile
 generation, outweigh the costs.
 
@@ -1763,7 +1799,7 @@ There are two ways to test Edna: the command-line and 
through Emacs.
    The command-line version is simple, and we ask that you do any final
 testing using this method.  This is how we periodically check to verify
 that new versions of Org mode haven’t broken Edna.  It uses the
-Makefile, which is generated with EDE. See *note Compiling Edna:: for
+Makefile, which is generated with EDE.  See *note Compiling Edna:: for
 how to do that.  Once you have, run ‘make check’ on the command line.
 
    Edna tests are written using ‘ERT’, the Emacs Regression Testing
@@ -1838,6 +1874,7 @@ Changelog
 
 * Menu:
 
+* 1.0.2: 102.
 * 1.0.1: 101.
 * 1.0: 10.
 * 1.0beta8: 10beta8.
@@ -1849,7 +1886,19 @@ Changelog
 * 1.0beta2: 10beta2.
 
 
-File: org-edna.info,  Node: 101,  Next: 10,  Up: Changelog
+File: org-edna.info,  Node: 102,  Next: 101,  Up: Changelog
+
+1.0.2
+=====
+
+   • Added ‘org-edna-reset-cache’ to allow a user to reset the finder
+     cache
+
+   • Fixed timestamp format bug with scheduled!  and deadline!
+        • See *note Timestamp Format:: for more
+
+
+File: org-edna.info,  Node: 101,  Next: 10,  Prev: 102,  Up: Changelog
 
 1.0.1
 =====
@@ -1987,85 +2036,87 @@ Big release here, with three new features.
 
 Tag Table:
 Node: Top225
-Node: Copying4439
-Node: Introduction5261
-Node: Installation and Setup6209
-Node: Basic Operation6933
-Node: Blockers8784
-Node: Triggers9070
-Node: Syntax9332
-Node: Basic Features10022
-Node: Finders10376
-Node: ancestors12141
-Node: children12735
-Node: descendants13145
-Node: file13667
-Node: first-child14416
-Node: ids14676
-Node: match15337
-Node: next-sibling15975
-Node: next-sibling-wrap16232
-Node: olp16546
-Node: org-file16958
-Node: parent17603
-Node: previous-sibling17801
-Node: previous-sibling-wrap18062
-Node: relatives18341
-Node: rest-of-siblings22067
-Node: rest-of-siblings-wrap22352
-Node: self22701
-Node: siblings22862
-Node: siblings-wrap23099
-Node: Actions23403
-Node: Scheduled/Deadline24166
-Node: TODO State27680
-Node: Archive28405
-Node: Chain Property28725
-Node: Clocking29478
-Node: Property29890
-Node: Priority32063
-Node: Tag32632
-Node: Effort32849
-Node: Getting Help33233
-Node: Advanced Features33678
-Node: Finder Cache34126
-Node: Conditions35165
-Node: Heading is DONE36050
-Node: File Has Headings36256
-Node: Heading TODO State36678
-Node: Lisp Variable Set36972
-Node: Heading Has Property37640
-Node: Regexp Search38386
-Node: Checking Tags38829
-Node: Matching Headings39731
-Node: Negating Conditions40328
-Node: Multiple Conditions40751
-Node: Consideration41433
-Node: Conditional Forms43617
-Node: Setting the Properties46305
-Node: Extending Edna47389
-Node: Naming Conventions47879
-Node: Finders 148671
-Node: Actions 149033
-Node: Conditions 149492
-Node: Contributing50378
-Node: Bugs51244
-Node: Working with EDE51601
-Node: Compiling Edna52685
-Node: Testing Edna53554
-Node: Before Sending Changes54535
-Node: Developing with Bazaar55222
-Node: Documentation55963
-Node: Changelog56419
-Node: 10156694
-Node: 1056819
-Node: 10beta857333
-Node: 10beta757456
-Node: 10beta657750
-Node: 10beta558026
-Node: 10beta458413
-Node: 10beta358666
-Node: 10beta259105
+Node: Copying4453
+Node: Introduction5276
+Node: Installation and Setup6224
+Node: Basic Operation6948
+Node: Blockers8799
+Node: Triggers9086
+Node: Syntax9348
+Node: Basic Features10038
+Node: Finders10392
+Node: ancestors12157
+Node: children12751
+Node: descendants13161
+Node: file13683
+Node: first-child14432
+Node: ids14692
+Node: match15353
+Node: next-sibling15991
+Node: next-sibling-wrap16248
+Node: olp16562
+Node: org-file16975
+Node: parent17620
+Node: previous-sibling17818
+Node: previous-sibling-wrap18079
+Node: relatives18358
+Node: rest-of-siblings22084
+Node: rest-of-siblings-wrap22369
+Node: self22718
+Node: siblings22879
+Node: siblings-wrap23116
+Node: Actions23420
+Node: Scheduled/Deadline24183
+Node: Timestamp Format27771
+Node: TODO State28659
+Node: Archive29384
+Node: Chain Property29704
+Node: Clocking30457
+Node: Property30869
+Node: Priority33042
+Node: Tag33611
+Node: Effort33828
+Node: Getting Help34212
+Node: Advanced Features34657
+Node: Finder Cache35105
+Node: Conditions36553
+Node: Heading is DONE37438
+Node: File Has Headings37644
+Node: Heading TODO State38066
+Node: Lisp Variable Set38360
+Node: Heading Has Property39029
+Node: Regexp Search39775
+Node: Checking Tags40218
+Node: Matching Headings41120
+Node: Negating Conditions41717
+Node: Multiple Conditions42140
+Node: Consideration42822
+Node: Conditional Forms45008
+Node: Setting the Properties47697
+Node: Extending Edna48781
+Node: Naming Conventions49271
+Node: Finders (1)50065
+Node: Actions (1)50431
+Node: Conditions (1)50896
+Node: Contributing51786
+Node: Bugs52652
+Node: Working with EDE53009
+Node: Compiling Edna54094
+Node: Testing Edna54963
+Node: Before Sending Changes55945
+Node: Developing with Bazaar56632
+Node: Documentation57373
+Node: Changelog57829
+Node: 10258118
+Node: 10158398
+Node: 1058535
+Node: 10beta859049
+Node: 10beta759172
+Node: 10beta659466
+Node: 10beta559742
+Node: 10beta460129
+Node: 10beta360382
+Node: 10beta260821
 
 End Tag Table
 
diff --git a/org-edna.org b/org-edna.org
index b0c8b79..a1cf3a1 100644
--- a/org-edna.org
+++ b/org-edna.org
@@ -6,7 +6,7 @@
 #+STARTUP: overview
 #+STARTUP: indent
 #+TODO: FIXME | FIXED
-#+OPTIONS: toc:2 num:nil timestamp:nil \n:nil |:t ':t email:t
+#+OPTIONS: toc:2 num:nil timestamp:nil \n:nil |:t ':t email:t H:4
 #+OPTIONS: *:t <:t d:nil todo:nil pri:nil tags:not-in-toc -:nil
 
 #+TEXINFO_DIR_CATEGORY: Emacs
@@ -703,6 +703,28 @@ Examples:
 - scheduled!("float 2 Tue Feb") :: Set SCHEDULED to the second Tuesday in the 
following February
 - scheduled!("float 3 Thu") :: Set SCHEDULED to the third Thursday in the 
following month
 
+**** Timestamp Format
+:PROPERTIES:
+:CUSTOM_ID: ts_format
+:DESCRIPTION: Specifying a timestamp format
+:END:
+
+When using one of the planning modifiers, it isn't always possible to deduce 
how
+the timestamp format will be chosen if using ++ or --.  The following method is
+used:
+
+1. If the target heading already has a timestamp, that format is used.
+
+2. If the modifier with the ++ or -- is "h" or "M" (hours or minutes), long
+   format (includes time) is used.
+
+3. If the property ~EDNA_TS_FORMAT~ is set on the target heading, its value 
will
+   be used.  It should be either ~long~ for long format (includes time) or
+   ~short~ for short format (does not include time).
+
+4. The user variable ~org-edna-timestamp-format~ is the final fallback.  It
+   should be either the symbol ~long~ or ~short~.  It defaults to ~short~.
+
 *** TODO State
 :PROPERTIES:
 :CUSTOM_ID: todo!
@@ -941,6 +963,7 @@ does.  Some descriptions also contain examples.
 * Advanced Features
 :PROPERTIES:
 :CUSTOM_ID: advanced
+:DESCRIPTION: Be careful in here
 :END:
 ** Finder Cache
 :PROPERTIES:
@@ -966,6 +989,13 @@ For example, if there are several entries in a checklist 
that all use the form
 cached.  When the next item is marked as DONE, the results will be searched for
 in cache, not recomputed.
 
+When reverting Org mode files, the cache will often be invalidated.  This isn't
+the case for every Org mode file, so we can't just tell Emacs to automatically
+reset the cache when reverting a file.  Instead, we provide the command
+~org-edna-reset-cache~ to reset the finder cache.  If you notice headings that
+should be blocking but aren't while cache is enabled, reset the cache and check
+again.
+
 ** Conditions
 :PROPERTIES:
 :CUSTOM_ID: conditions
@@ -1611,6 +1641,11 @@ making any changes:
 :PROPERTIES:
 :DESCRIPTION: List of changes by version
 :END:
+** 1.0.2
+- Added ~org-edna-reset-cache~ to allow a user to reset the finder cache
+
+- Fixed timestamp format bug with scheduled! and deadline!
+  - See [[#ts_format][Timestamp Format]] for more
 ** 1.0.1
 - Fixed bug in multiple blocking conditions
 ** 1.0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]