rejeep / f.el

Modern API for working with files and directories in Emacs
GNU General Public License v3.0
680 stars 68 forks source link

Remaining file vs directory issues #91

Open sambrightman opened 6 years ago

sambrightman commented 6 years ago

A few things stand out as left over from #86 (and #89), but I'm not completely familiar with f.el and intended behaviour.

1) I think additional file-name-as-directory calls in tests (added by #86) should be removed as part of #89. 2) f-dirname/f-parent should probably return a trailing slash, and thus tests modifications in #89 should be reverted. This has knock-on effects for several other functions that could be quite tricky. 3) Potentially f-filename should return a trailing slash for inputs with a trailing slash. It sounds odd to have a function called f-filename return a directory, but it seems intended to be equivalent to basename. This also has knock-on effects for other functions.

I haven't checked the full range of tests but neither of those PRs added many tests, whilst behaviour of underlying Emacs functions became more subtle and behaviour of f.el changed in some cases. I'm looking for @phst to add to the discussion, since they seem to know more about it than I do and were responsible for those PRs. #70 also seems relevant.