emacs

Consider also joining #cider, #lsp and #inf-clojure, where most of the tool-specific discussions are happening.
dpsutton 2021-03-31T15:08:07.057200Z

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?

nivekuil 2021-03-31T15:16:31.057300Z

(string-join '("a" "b" "c") "/")

dpsutton 2021-03-31T15:28:53.057500Z

yeah that works on unix-y type things

Phil Shapiro 2021-03-31T15:29:09.057700Z

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.

dpsutton 2021-03-31T15:29:26.058Z

i think the proper way is (concat (file-name-as-directory ...))

➕ 1
nivekuil 2021-03-31T15:30:55.058300Z

oh, misread your q. I've used f.el before, it has f-join

Eamonn Sullivan 2021-03-31T15:31:26.058500Z

I use expand-file-name a lot: (add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory)) Something like that, maybe?

dpsutton 2021-03-31T15:35:33.058700Z

yeah that's what i ended up using at the top level

dpsutton 2021-03-31T15:35:39.058900Z

(expand-file-name "socket-repl.port" (file-name-as-directory (concat (file-name-as-directory proj-dir) ".shadow-cljs")))

dpsutton 2021-03-31T15:35:55.059100Z

but it requries a well formed directory at the end and only one.

dpsutton 2021-03-31T15:36:04.059300Z

but it took me a bit to get there. thanks everyone