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

Thoughts on accepting a PR for f-contract #99

Closed wpcarro closed 4 years ago

wpcarro commented 4 years ago

You have f-expand. What about supporting f-contract?

(f-contract "/home/wpcarro/file.txt") ;; => "~/file.txt"

I often need this to write predicates that work across my different machines that return different values for ~. I'm happy to create a PR if you're open to the idea.

If this already exists, and I've missed the function, please let me know!

rejeep commented 4 years ago

Does this function do what you want? https://github.com/rejeep/f.el#f-short-path

wpcarro commented 4 years ago

Brilliant. Thank you for sharing, and I apologize for the unnecessary noise.