[elpa] master 5eaa2d2 1/3: Improve path-iterator

2019-02-03 Thread Stephen Leake
branch: master
commit 5eaa2d2e7197f530ad7b962e5255718182bfcc40
Author: Stephen Leake 
Commit: Stephen Leake 

Improve path-iterator

* packages/path-iterator/path-iterator.el (path-iter--to-truename):
Enforce directory-file-name.
---
 packages/path-iterator/path-iterator.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/path-iterator/path-iterator.el 
b/packages/path-iterator/path-iterator.el
index 1c57ce3..6bd3504 100644
--- a/packages/path-iterator/path-iterator.el
+++ b/packages/path-iterator/path-iterator.el
@@ -131,7 +131,7 @@ If an element of PATH is nil, `default-directory' is used."
  (expand-file-name name)
default-directory)))
 (when (file-directory-p absname)
-  (push (file-truename absname) result))
+  (push (directory-file-name (file-truename absname)) result))
 ))
  path)
 (nreverse result)))



[elpa] master 433cca5 2/3: Improve uniquify-files

2019-02-03 Thread Stephen Leake
branch: master
commit 433cca5adf8e6828e47f0efd9637aee4b4609f37
Author: Stephen Leake 
Commit: Stephen Leake 

Improve uniquify-files

* packages/uniquify-files/file-complete-root-relative.el
(fc-root-rel-to-table-input): Match completion table arg list.
(fc-root-rel-completion-table-iter): add 'styles to metadata
(fc-root-rel-completion-table-list): add 'styles to metadata
(completion-styles-alist): Add file-root-rel.

* packages/uniquify-files/file-complete-root-relative-test.el
(test-fc-root-rel-completion-table-iter): Match code change.
(test-fc-root-rel-completion-table-list): Match code change.

* packages/uniquify-files/uniquify-files-resources/foo-file-3.texts2:
Match content to file name.

* packages/uniquify-files/uniquify-files.el:
(completion-get-data-string, completion-to-table-input): Use 'styles
metadata.
(top level): Don't modify completion-category-defaults; use
completion-category-overrides in project-find-files.
(uniq-file-completion-table): Add styles metadata.

* packages/uniquify-files/uniquify-files-test.el:
(test-uniq-file-completion-table): Match code change.
---
 .../file-complete-root-relative-test.el|  2 +
 .../uniquify-files/file-complete-root-relative.el  | 22 +++
 .../uniquify-files-resources/foo-file3.texts2  |  2 +-
 packages/uniquify-files/uniquify-files-test.el |  3 +-
 packages/uniquify-files/uniquify-files.el  | 71 +++---
 5 files changed, 52 insertions(+), 48 deletions(-)

diff --git a/packages/uniquify-files/file-complete-root-relative-test.el 
b/packages/uniquify-files/file-complete-root-relative-test.el
index 66bdf43..f696288 100644
--- a/packages/uniquify-files/file-complete-root-relative-test.el
+++ b/packages/uniquify-files/file-complete-root-relative-test.el
@@ -57,6 +57,7 @@
 (cons 'metadata
   (list
'(category . project-file)
+   '(styles   . (file-root-rel))
(cons 'root uft-root)
 
   ;; all-completions. We sort the results here to make the test stable
@@ -119,6 +120,7 @@
 (cons 'metadata
   (list
'(category . project-file)
+   '(styles   . (file-root-rel))
(cons 'root uft-root)
 
   ;; all-completions. We sort the results here to make the test stable
diff --git a/packages/uniquify-files/file-complete-root-relative.el 
b/packages/uniquify-files/file-complete-root-relative.el
index 86b1459..3f66809 100644
--- a/packages/uniquify-files/file-complete-root-relative.el
+++ b/packages/uniquify-files/file-complete-root-relative.el
@@ -50,7 +50,7 @@
   "Return root from TABLE."
   (cdr (assoc 'root (completion-metadata "" table nil
 
-(defun fc-root-rel-to-table-input (user-string)
+(defun fc-root-rel-to-table-input (user-string &optional _table _pred _point)
   "Implement `completion-to-table-input' for file-root-rel."
   user-string)
 
@@ -289,12 +289,8 @@ STRING, PRED, ACTION are completion table arguments."
((eq action 'metadata)
 (cons 'metadata
  (list
-  ;; We specify the category 'project-file here, to match the
-  ;; `completion-category-defaults' setting above.  We use
-  ;; the default sort order, which is shortest first, so
-  ;; "project.el" is easier to complete when it also matches
-  ;; "project-am.el".
   '(category . project-file)
+  '(styles . (file-root-rel))
   (cons 'root (car (path-iter-path-recursive-init path-iter))
 
((null action)
@@ -370,12 +366,8 @@ STRING, PRED, ACTION are completion table arguments."
((eq action 'metadata)
 (cons 'metadata
  (list
-  ;; We specify the category 'project-file here, to match the
-  ;; `completion-category-defaults' setting above.  We use
-  ;; the default sort order, which is shortest first, so
-  ;; "project.el" is easier to complete when it also matches
-  ;; "project-am.el".
   '(category . project-file)
+  '(styles . (file-root-rel))
   (cons 'root root
 
((null action)
@@ -410,5 +402,13 @@ STRING, PRED, ACTION are completion table arguments."
)))
))
 
+(add-to-list 'completion-styles-alist
+'(file-root-rel
+  fc-root-rel-try-completion
+  fc-root-rel-all-completions
+  "root relative hierarchical filenames."
+  fc-root-rel-to-table-input;; 4 user to table input format
+  fc-root-rel-to-data)) ;; 5 user to data format
+
 (provide 'file-complete-root-relative)
 ;;; file-complete-root-relative.el ends here
diff --git a/packages/uniquify-files/uniquify-files-resources/foo-file3.texts2 
b/packages/uniquify-files/uniquify-files-resources/foo-file3.texts2
index 625ab98..ae97731 100644
--- a/pa

[elpa] master updated (4cfbe69 -> 04291f9)

2019-02-03 Thread Stephen Leake
stephen_leake pushed a change to branch master.

  from  4cfbe69   Merge commit '5289910f860a9676b1ab9dd450e8ff82308e91a4'
   new  5eaa2d2   Improve path-iterator
   new  433cca5   Improve uniquify-files
   new  04291f9   Merge commit '4cfbe698f4bee8de43ce10ba2392025e6f49f28d'


Summary of changes:
 packages/path-iterator/path-iterator.el|  2 +-
 .../file-complete-root-relative-test.el|  2 +
 .../uniquify-files/file-complete-root-relative.el  | 22 +++
 .../uniquify-files-resources/foo-file3.texts2  |  2 +-
 packages/uniquify-files/uniquify-files-test.el |  3 +-
 packages/uniquify-files/uniquify-files.el  | 71 +++---
 6 files changed, 53 insertions(+), 49 deletions(-)



[elpa] master 04291f9 3/3: Merge commit '4cfbe698f4bee8de43ce10ba2392025e6f49f28d'

2019-02-03 Thread Stephen Leake
branch: master
commit 04291f98972a5e7b26c5e6a9986a9128cfddd869
Merge: 433cca5 4cfbe69
Author: Stephen Leake 
Commit: Stephen Leake 

Merge commit '4cfbe698f4bee8de43ce10ba2392025e6f49f28d'
---
 packages/org-edna/org-edna-tests.el  |  22 +--
 packages/org-edna/org-edna-tests.org |  12 ++
 packages/org-edna/org-edna.el| 104 +--
 packages/org-edna/org-edna.info  | 251 +--
 packages/org-edna/org-edna.org   |  37 +-
 5 files changed, 303 insertions(+), 123 deletions(-)

diff --git a/packages/org-edna/org-edna-tests.el 
b/packages/org-edna/org-edna-tests.el
index 331438f..c877321 100644
--- a/packages/org-edna/org-edna-tests.el
+++ b/packages/org-edna/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/packages/org-edna/org-edna-tests.org 
b/packages/org-edna/org-edna-tests.org
index 8553cc4..e58ac0f 100644
--- a/packages/org-edna/org-edna-tests.org
+++ b/packages/org-edna/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/packages/org-edna/org-edna.el b/packages/org-edna/org-edna.el
index d9ebc2b..1cdc52b 100644
--- a/packages/org-edna/org-edna.el
+++ b/packages/org-edna/org-edna.el
@@ -7,7 +7,7 @@
 ;; Keywords: convenience, text, org
 ;; URL: https://savannah.nongnu.org/projects/org-edna-el/
 ;; Package-Requires: ((emacs "25.1") (seq "2.19") (org "9.0.5"))
-;; Version: 1.0.1
+;; Version: 1.0.2
 
 ;; This file is part of GNU Emacs.
 
@@ -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 modifi