The default layer action accessed through pressing RET from SPC h l currently insists on creating a README.org file if none exists for the layer which might be the case for private layers. Also, if one uses one of the actions to directly open one of the layer files, for example keybindings.el, and the file does not exist, only a message is displayed.
This commit changes the corresponding functions for Compleseus, Ivy and Helm to fall back to opening Dired at the layer directory if the file does not exist. When requesting to edit the README, it is still created if necessary. Note that the functions are exactly the same for Ivy and Compleseus, and the one for Helm only differs by additionally handling a prefix argument.
Here is a before/after comparison of the behaviour given the conditions (ignoring the special case of giving a prefix argument in Helm):
The default layer action accessed through pressing RET from SPC h l currently insists on creating a README.org file if none exists for the layer which might be the case for private layers. Also, if one uses one of the actions to directly open one of the layer files, for example keybindings.el, and the file does not exist, only a message is displayed.
This commit changes the corresponding functions for Compleseus, Ivy and Helm to fall back to opening Dired at the layer directory if the file does not exist. When requesting to edit the README, it is still created if necessary. Note that the functions are exactly the same for Ivy and Compleseus, and the one for Helm only differs by additionally handling a prefix argument.
Here is a before/after comparison of the behaviour given the conditions (ignoring the special case of giving a prefix argument in Helm):