f.el icon indicating copy to clipboard operation
f.el copied to clipboard

Fix `f-uniquify-alist` infinite loop with `projectile-current-project…

Open FrancisMurillo opened this issue 7 years ago • 5 comments

This is my fix for the infinite loop when using f-uniquify-alist with projectile-current-project-dirs or #62 .

I simply made a wrapper for f-filename when the path has an separator at the end it also adds it.

FrancisMurillo avatar Aug 03 '16 03:08 FrancisMurillo

Coverage Status

Coverage increased (+0.05%) to 97.525% when pulling 0fbc97284b5d3082b4dfba2a08730714f10c6e02 on FrancisMurillo:uniquify-fix into de85171132fc0d3bdb8ca9264845b478e28c7b81 on rejeep:master.

coveralls avatar Aug 03 '16 03:08 coveralls

@Fuco1 Would you mind taking a look at this since you added the original function? Otherwise I'll look in to it.

rejeep avatar Aug 10 '16 11:08 rejeep

@rejeep will do. Can you assign the issue to me? I use that to track the work. (not sure if it works outside the project though)

Fuco1 avatar Aug 10 '16 13:08 Fuco1

@Fuco1 sorry, not possible to assign you

rejeep avatar Aug 10 '16 19:08 rejeep

I run into this problem now. I think it would be valuable to have a function which always returns the last component as it is, so /foo/bar/baz -> baz and /foo/bar/baz/ -> baz/. We can then use that instead of the wrapper here (which essentially is that function).

We can call it f-last-component or something like that.

Fuco1 avatar Mar 01 '18 11:03 Fuco1