reddit / emacs

emacs + win10

zsome · 2022-09-10 06:40
Hi, I use emacs in linux and win10 as well. I would like to discuss about win10 deploy, because I should install: \- a release from here: [https://github.com/kiennq/emacs-build](https://github.com/kiennq/emacs-build) \- a release from the gitforwindows: [https://git-scm.com/download/win](https://git-scm.com/download/win) because the magit handle itt well (emacsclient not found problem if I use msys2 package) \- deploy the msys2 and install: diffutils, ripgrep and it is necessary for the dired and ripgrep-mode, consult ... \- I should clone my configuration from github and start emacs and clone the mode's repositories (I use straight ...) \- I have to set the PATH and HOME envvars So it is not easy to deploy to a new computer. My question is that do you know any project or manual description about how I can copy these ones to a directory and create a zip file what I can download and unzip and it works what I want ? :) I can make this folder I have idea but I just would like to know is there any project about this ... ? My plan is roughly that I will copy everything to the .emacs.d folder and create a powershell script to set the $Env:vars ... folders: \- \~/.emacs.d/bin/emacs.exe|emacslient.exe|runemacs.exe|git.exe ... \- \~/.emacs.d/mingw64/bin ... \- \~/.emacs.d/usr/... \- \~/.emacs.d/straight/repo|build ... \- \~/.emacs.d/install.ps1
DrReadIt · 2022-09-10 06:53
Why not just use WSL and have a way better experience?
zsome · 2022-09-10 07:10
to start a vm just for emacs ... and my aim with it is that I'd like to use this package as an emergency sw ... have attaching to a process and debugging
Hagge5 · 2022-09-10 08:18
Hope this isn't off-topic. Bit unorthodox, but my personal solution is a set of utility functions that verify dependencies and produce warnings with install instructions on startup (for windows, on Linux it just installs them automatically). Here's the library: https://github.com/HannesHaglund/my-emacs/blob/master/elisp/ensure-system-package.el And you'll find my usage here: https://github.com/HannesHaglund/my-emacs/blob/4b21e528fdada34d5f21f2279437d34cb6c66659/init.el#L924 The setup doesn't become automatic, but it clearly shows what's missing, so it's not too bad imo. It's also way easier to add new deps this way, rather than packaging them in an archive. Just an idea, your solution may be preferable.
Alternative-Sign-206 · 2022-09-10 08:30
I have never tried using ansible for windows but in Linux world it's a preferred way for automatic installations. But you have to learn it a bit to actually understand what happens: after all, it's intended for devops usage in big systems - if you need to deploy your emacs once in a year, it would be overkill. If you're striving to learn something new, then this is certainly a good solution. For example you can use this post (it's about vim, though, but illustrates my point): https://medium.com/espinola-designs/manage-your-dotfiles-with-ansible-6dbedd5532bb
Alternative-Sign-206 · 2022-09-10 08:34
One more way, that comes to my mind, is really similar to your zip approach but instead uses docker containers such as in this repo for nvim: [https://github.com/MashMB/nvim-ide](https://github.com/MashMB/nvim-ide) It also scales well with ansible-based automated configurations. But it's quite a pain to make everything run smoothly, I would prefer this approach only if you benefit from using docker in your work.
zsome · 2022-09-10 09:40
I've created a docker to separate my devenv \~1years ago because I could use emacs in console and aws ... it was okay :)
zsome · 2022-09-10 09:43
Maybe I looked for this one: [https://github.com/alexsarmiento/gitportable-pacman](https://github.com/alexsarmiento/gitportable-pacman) I can remove the msys2 installation from my list ...
kiennq · 2022-09-10 12:51
I've created a simple Powershell script that automatically installs emacs from scoop + git + diffutils + ripgrep..., It's a breeze to set up a new computer. Here is an example template https://gist.github.com/kiennq/ed235d57d9637f179562dc7d3fc3cf86 You will need your own dotfiles repo on Github though (a private repo and a token are also fine). Also, the emacs release that you got from https://github.com/kiennq/emacs-build should have all the executables (gzip, as, gccjit ...) included, you can change your `early-init.el` to include the Emacs path to take advantage of that and no need for msys2 anymore. ``` elisp ;; Add emacs bin directory to path (add-to-list 'exec-path invocation-directory) (setenv "PATH" (concat invocation-directory path-separator (getenv "PATH"))) ```
zsome · 2022-09-10 14:12
Thanks! This is what I looked for :)