my emacs fu is drawing a blank. is there a proper way to combine parts of a path into a single path? ie (f "project" ".shadow-cljs" "socket-repl.port")
will return the path to project/.shadow-cljs/socket-repl.port
using proper separator, etc?
(string-join '("a" "b" "c") "/")
yeah that works on unix-y type things
If you’re wondering how emacs knows what the path separator character is, I think it hardcodes it to /
. I haven’t run emacs on windows in a while but I seem to recall there’s cygwin APIs to munge paths back & forth.
i think the proper way is (concat (file-name-as-directory ...))
oh, misread your q. I've used f.el before, it has f-join
I use expand-file-name a lot: (add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory))
Something like that, maybe?
yeah that's what i ended up using at the top level
(expand-file-name "socket-repl.port" (file-name-as-directory (concat (file-name-as-directory proj-dir) ".shadow-cljs")))
but it requries a well formed directory at the end and only one.
but it took me a bit to get there. thanks everyone