How to setup a config to load on both windows and linux reddit / emacs ---------------------------------------------------------------------- timmymayes · 2022-12-13 19:20 I have a config (literate via org-babel) that I'm pretty happy with. I did a very manual setup on my work pc which uses windows (i'm not a dev yet so stuck with windows at my current marketing job). The problem is as I make new strides on my home config I cannot easily mirror the setup at work. On top of that I am also working on going all-in on org mode across my devices. I can figure out the org file syncing with syncthing no problem but as I develop my org setup I don't want to be having disparate versions of my config. Are there any guides or walkthroughs on this type of thing? I know I"ll probably need to figure several things out based on my specific setup but figure there might be something out there like resolving moving between the \~/ and C:/ locations and any other issues I might not realize I'd run into. ---------------------------------------------------------------------- MitchellMarquez42 · 2022-12-13 20:07 In general using `user-emacs-directory` instead of hardcoding paths will help. Also setting up hooks to re-tangle your config when it syncs. In the future I also recommend learning some basic powershell to access windows APIs - it can do anything c# can do, and is surprisingly lispy for something that looks like perl. The emacs package `powershell` has good syntax highlighting and there's an LSP server available. ---------------------------------------------------------------------- Motor_Mouth_ · 2022-12-13 20:09 So the idea is to have config specific to a particular OS inside an if: `(if (eq system-type 'darwin)` `; something for OS X if true` `)` See this for details [https://stackoverflow.com/questions/1817257/how-to-determine- operating-system-in- elisp](https://stackoverflow.com/questions/1817257/how-to-determine- operating-system-in-elisp) ---------------------------------------------------------------------- timmymayes · 2022-12-13 20:36 Thanks for the tip! ---------------------------------------------------------------------- timmymayes · 2022-12-13 20:37 This makes sense. I'll give it a read.