diff options
author | Stephen Leake <stephen_leake@stephe-leake.org> | 2019-04-25 16:29:36 -0700 |
---|---|---|
committer | Stephen Leake <stephen_leake@stephe-leake.org> | 2019-04-25 16:29:36 -0700 |
commit | d2a5283a065fd03d6dc606cc7ec29822e544dffb (patch) | |
tree | 275e0ea3a813d77fd9319832b3b87d66b14ca6d4 /test/lisp/progmodes/uniquify-files-resources | |
parent | 1486eadf7c9469f873fcd04beafd03f21564d580 (diff) | |
download | emacs-scratch/project-uniquify-files.tar.gz |
Add new file completion tables, change project.el to allow using themscratch/project-uniquify-files
* lisp/file-complete-root-relative.el: New file.
* lisp/uniquify-files.el: New file.
* test/lisp/progmodes/uniquify-files-resources/: New directory
containing files for testing uniquify-files.
* test/lisp/progmodes/uniquify-files-test.el: New file; test
uniquify-files.
* lisp/files.el (path-files): New function; useful with new completion
tables.
* lisp/progmodes/project.el (project-file-completion-table): Use
file-complete-root-relative completion table.
(project-find-file): Add optional FILENAME parameter.
(project--completing-read-strict): Rewrite to just use the given
completion table; extracting the common directory is now done by
file-complete-root-relative. This also allows using the new
uniquify-files completion table.
* lisp/minibuffer.el (completion-category-defaults): Add
uniquify-file.
(completing-read-default): Add final step to call completion table
with 'alist action if supported.
Diffstat (limited to 'test/lisp/progmodes/uniquify-files-resources')
20 files changed, 20 insertions, 0 deletions
diff --git a/test/lisp/progmodes/uniquify-files-resources/Alice/alice-1/bar-file1.text b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-1/bar-file1.text new file mode 100644 index 00000000000..fa6dc6c4c9c --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-1/bar-file1.text @@ -0,0 +1 @@ +Alice/alice-1/bar-file1.text diff --git a/test/lisp/progmodes/uniquify-files-resources/Alice/alice-1/bar-file2.text b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-1/bar-file2.text new file mode 100644 index 00000000000..a1379dc1637 --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-1/bar-file2.text @@ -0,0 +1 @@ +Alice/alice-1/bar-file2.text diff --git a/test/lisp/progmodes/uniquify-files-resources/Alice/alice-1/foo-file1.text b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-1/foo-file1.text new file mode 100644 index 00000000000..6ca3f4af56a --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-1/foo-file1.text @@ -0,0 +1 @@ +Alice/alice-1/foo-file1.text diff --git a/test/lisp/progmodes/uniquify-files-resources/Alice/alice-1/foo-file2.text b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-1/foo-file2.text new file mode 100644 index 00000000000..0c46e78c391 --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-1/foo-file2.text @@ -0,0 +1 @@ +Alice/alice-1/foo-file2.text diff --git a/test/lisp/progmodes/uniquify-files-resources/Alice/alice-2/bar-file1.text b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-2/bar-file1.text new file mode 100644 index 00000000000..24ca29ef55c --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-2/bar-file1.text @@ -0,0 +1 @@ +alice-2/bar-file1.text diff --git a/test/lisp/progmodes/uniquify-files-resources/Alice/alice-2/bar-file2.text b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-2/bar-file2.text new file mode 100644 index 00000000000..e3d8e7bb238 --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-2/bar-file2.text @@ -0,0 +1 @@ +alice-2/bar-file2.text diff --git a/test/lisp/progmodes/uniquify-files-resources/Alice/alice-2/foo-file1.text b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-2/foo-file1.text new file mode 100644 index 00000000000..ac4ffaa6bb5 --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-2/foo-file1.text @@ -0,0 +1 @@ +alice-2/foo-file1.text diff --git a/test/lisp/progmodes/uniquify-files-resources/Alice/alice-2/foo-file3.text b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-2/foo-file3.text new file mode 100644 index 00000000000..dbf803bc909 --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-2/foo-file3.text @@ -0,0 +1 @@ +alice-2/foo-file3.text diff --git a/test/lisp/progmodes/uniquify-files-resources/Alice/alice-2/foo-file3.texts b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-2/foo-file3.texts new file mode 100644 index 00000000000..124d83e09a0 --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-2/foo-file3.texts @@ -0,0 +1 @@ +This file name is a strict extension of foo-file3.text, to test a corner case diff --git a/test/lisp/progmodes/uniquify-files-resources/Alice/alice-3/foo-file4.text b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-3/foo-file4.text new file mode 100644 index 00000000000..7c26b346621 --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/Alice/alice-3/foo-file4.text @@ -0,0 +1 @@ +Alice/alice-3/foo-file4.text diff --git a/test/lisp/progmodes/uniquify-files-resources/Bob/alice-3/foo-file4.text b/test/lisp/progmodes/uniquify-files-resources/Bob/alice-3/foo-file4.text new file mode 100644 index 00000000000..5893d49a232 --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/Bob/alice-3/foo-file4.text @@ -0,0 +1 @@ +Bob/alice-3/foo-file4.text
diff --git a/test/lisp/progmodes/uniquify-files-resources/Bob/bob-1/foo-file1.text b/test/lisp/progmodes/uniquify-files-resources/Bob/bob-1/foo-file1.text new file mode 100644 index 00000000000..ba2e1420765 --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/Bob/bob-1/foo-file1.text @@ -0,0 +1 @@ +bob-1/foo-file1.text diff --git a/test/lisp/progmodes/uniquify-files-resources/Bob/bob-1/foo-file2.text b/test/lisp/progmodes/uniquify-files-resources/Bob/bob-1/foo-file2.text new file mode 100644 index 00000000000..6bd9bdb4b60 --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/Bob/bob-1/foo-file2.text @@ -0,0 +1 @@ +bob-1/foo-file2.text diff --git a/test/lisp/progmodes/uniquify-files-resources/Bob/bob-2/foo-file1.text b/test/lisp/progmodes/uniquify-files-resources/Bob/bob-2/foo-file1.text new file mode 100644 index 00000000000..754a1f1ad47 --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/Bob/bob-2/foo-file1.text @@ -0,0 +1 @@ +bob-2/foo-file1.text diff --git a/test/lisp/progmodes/uniquify-files-resources/Bob/bob-2/foo-file5.text b/test/lisp/progmodes/uniquify-files-resources/Bob/bob-2/foo-file5.text new file mode 100644 index 00000000000..2a3b1e9751c --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/Bob/bob-2/foo-file5.text @@ -0,0 +1 @@ +bob-2/foo-file5.text diff --git a/test/lisp/progmodes/uniquify-files-resources/foo-file1.text b/test/lisp/progmodes/uniquify-files-resources/foo-file1.text new file mode 100644 index 00000000000..00b4928cb78 --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/foo-file1.text @@ -0,0 +1 @@ +foo-file1.text diff --git a/test/lisp/progmodes/uniquify-files-resources/foo-file3.texts2 b/test/lisp/progmodes/uniquify-files-resources/foo-file3.texts2 new file mode 100644 index 00000000000..ae9773132d9 --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/foo-file3.texts2 @@ -0,0 +1 @@ +foo-file3.texts2 diff --git a/test/lisp/progmodes/uniquify-files-resources/wisitoken-generate-packrat-test.text b/test/lisp/progmodes/uniquify-files-resources/wisitoken-generate-packrat-test.text new file mode 100644 index 00000000000..cd2f5cf0d73 --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/wisitoken-generate-packrat-test.text @@ -0,0 +1 @@ +Wisitoken-generate-packrat-test.text diff --git a/test/lisp/progmodes/uniquify-files-resources/wisitoken-syntax_trees-test.text b/test/lisp/progmodes/uniquify-files-resources/wisitoken-syntax_trees-test.text new file mode 100644 index 00000000000..5035ff7c0e6 --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/wisitoken-syntax_trees-test.text @@ -0,0 +1 @@ +Wisitoken-syntax_trees-test.text diff --git a/test/lisp/progmodes/uniquify-files-resources/wisitoken-text_io_trace.text b/test/lisp/progmodes/uniquify-files-resources/wisitoken-text_io_trace.text new file mode 100644 index 00000000000..a2d8f82a7ca --- /dev/null +++ b/test/lisp/progmodes/uniquify-files-resources/wisitoken-text_io_trace.text @@ -0,0 +1 @@ +Wisitoken-text_io_trace.text |