Add `f-presence`, `f-presence-directory`, `f-presence-file`, `f-presence-symlink`, and `f-presence-readable`
The same as the previous pull request, but hopefully with everything rebased and merged properly:
Add functions to return path when path exists, is a file, is a directory, is a symlink, or is readable, similar to s-presence from Magnar's s.el.
This should be useful in situations such as (cond), where you might want to see if a file, directory, symlink, etc. exists before returning it, all in one go.
Hi, sorry for the delayed response. Your code looks good to me, I just need you to do two things before I can merge this PR:
- Squash your commits into one. You should be able to do this with the command
git reset --soft HEAD~5. You can also do agit rebase -i HEAD~5if you prefer to. - Then you should be able to commit again to modify your commit message. As mentioned in [CONTRIBUTING.org] (https://github.com/rejeep/f.el/blob/master/CONTRIBUTING.org#git-commit-messages), your commit messages should not contain lines longer than 72 characters. As you can see, your commit message gets truncated here. Something like
Add \f-presence` and related functions` ought to do the job, and you could mention the other functions in the body of your commit.
In the meantime, I’ll run the workflow to check your workflow to verify if everything checks out.
No worries, and I think that should do the trick! Just let me know if you need anything else!
Regarding the latest CI run:
Huh... Well that's disappointing... What happened?
Running the tests locally, it seems like they either are incorrect, the function they are supposed to be testing is incorrect, or they contain syntax errors.
Ran 261 tests in 0.728 seconds
10 unexpected results:
FAILED f-presence-directory/directory-paths
FAILED f-presence-directory/non-directory-paths
FAILED f-presence-file/file-paths
FAILED f-presence-file/non-file-paths
FAILED f-presence-readable/readable-paths
FAILED f-presence-readable/unreadable-paths
FAILED f-presence-symlink/non-symlink-paths
FAILED f-presence-symlink/symlink-paths
FAILED f-presence/existent-paths
FAILED f-presence/nonexistent-paths
make[1]: *** [Makefile:14: unit] Error 1
make[1]: Leaving directory '/home/phundrak/.config/emacs/straight/repos/f.el'
make: *** [Makefile:8: test] Error 2
Please make sure you run make test (after make install-deps if necessary) and that all tests pass.