Skip to content

Add f-presence, f-presence-directory, f-presence-file, f-presence-symlink, and f-presence-readable #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sylvorg
Copy link

@sylvorg sylvorg commented Nov 27, 2023

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.

Add functions to return `path` when `path` exists, is a file, is a directory, is a symlink, or is readable, similar to [`s-presence`](https://github.com/magnars/s.el#s-presence-s) from [Magnar's `s.el`](https://github.com/magnars/s.el).
@Phundrak
Copy link
Collaborator

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:

  1. Squash your commits into one. You should be able to do this with the command git reset --soft HEAD~5. You can also do a git rebase -i HEAD~5 if you prefer to.
  2. 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.

@sylvorg
Copy link
Author

sylvorg commented Dec 12, 2023

No worries, and I think that should do the trick! Just let me know if you need anything else!

@sylvorg
Copy link
Author

sylvorg commented Dec 19, 2023

Regarding the latest CI run:

Huh... Well that's disappointing... What happened?

@Phundrak
Copy link
Collaborator

Phundrak commented Jan 5, 2024

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.

@Phundrak Phundrak modified the milestones: v0.21, v0.22 Oct 3, 2024
@sylvorg
Copy link
Author

sylvorg commented Jun 18, 2025

Hello! Sorry for the severe delay, but school got in the way and I've forgotten the context of this pull request! 😅 ... And also most of my elisp to boot...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants