Closed mwfogleman closed 6 years ago
Makes sense. Can you please add some docs and specs. Also move it to the predicates section.
Sure, I'm happy to add some docs. If the function that it calls, f-size, is later in the file, does that matter in ELisp? I know in Clojure you can't call functions that come later in the file.
I don't think it's an issue unless it's a macro. Either way, if you write some specs it should catch that if that's the case.
OK - how do I write specs? :)
There are tons of tests already so you should be able to figure it out by looking at them. Take a look at https://github.com/rejeep/f.el/blob/master/test/f-predicates-test.el for example. Also read this section: https://github.com/rejeep/f.el#contribution
I moved the functions, added a docstring, and wrote some tests, but I don't think they're working. I'll try to chew on this but assists are welcome :)
Ah, great suggestions! I didn't think about directories because I just needed files for my program :)
I've implemented and tested that functionality - let me know if you think there's a better way of checking if the directory is empty or not. :)
Do you want me to squash these commits?
Sure go ahead and squash and then I will merge
Squashed! Thanks for your help - I learned a little bit about how to write tests in Emacs :) Cheers!
One last thing, can you also update the readme template (https://github.com/rejeep/f.el/blob/master/README.md.tpl) and then run make docs
.
Sure, so, I added something based on what I saw in that template. However when I run make docs, I get this error: cask exec emacs -Q --script bin/docs.el Cannot open load file: No such file or directory, s make: *** [Makefile:16: docs] Error 255
You have to install Cask and run cask install
first.
Also, the docs should be in two places. Look at the other examples in the file.
Cool, thanks! Happy to squash this if it looks good to you.
Lovely, squash and I'll merge!
Done! :)
Great stuff, thanks for contributing! 👍
I needed this function and didn't find it, and thought it might be useful to others.
I realize this isn't in the predicates section, but the function it uses - f-size - comes later in the file. Any thoughts about that? Is there a better implementation?