The dk.salza.liq.modes.findfilemode should be more flexible in the following senses:
Callback
The mode should be able to take a callback function, which will operate on the found file or folder, so it can be used in a variety of situations, including:
- To open a file in the editor
- To insert the path as text
- To evaluate the file
Selection
If there are any choices in the typeahead the first one should be selected as default (At the moment of writing this, none is selected until "next-res" command executed C-k.)
Choosing file
The rules below for choosing a file should be implemented.
There are 4 cases:
- Choosing a new file
- Choosing existing file
- Choosing existing folder
- Navigate to folder
On enter press
- If a file is choosen in the typehead, the path to that should be the result.
- If a folder is choosen in the typeahead the path to that should be the result.
- If there are no typeahead results asume the search is a new file. Use that as result.
On M-enter (3611)
The typed search content is the result (To create a new file although there is non empty typeahead results.)
On C-k
If a folder is choosen, use C-k to navigate to that folder
The dk.salza.liq.modes.findfilemode should be more flexible in the following senses:
Callback
The mode should be able to take a callback function, which will operate on the found file or folder, so it can be used in a variety of situations, including:
Selection
If there are any choices in the typeahead the first one should be selected as default (At the moment of writing this, none is selected until "next-res" command executed C-k.)
Choosing file
The rules below for choosing a file should be implemented.
There are 4 cases:
On enter press
On M-enter (3611)
The typed search content is the result (To create a new file although there is non empty typeahead results.)
On C-k
If a folder is choosen, use C-k to navigate to that folder