[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to *properly* set up Emacs on Windows?
From: |
Arash Esbati |
Subject: |
Re: How to *properly* set up Emacs on Windows? |
Date: |
Wed, 09 Feb 2022 13:28:31 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 |
Joost <joostkremers@fastmail.fm> writes:
> To be honest, though, I'm not entirely sure how I got myself into that
> situation. I don't even have a good understanding of MSYS2 and MinGW
> and the differences between them.
Others gave more elaborate answers, but for me as a not versed user, it
always worked to ignore MSYS2 when I was looking for binaries to use and
just searched for their MinGW versions.
> I *think* it happened when I tried to use some external utilities from
> within Emacs, mainly git and diff, for which I modified my PATH
> variable.
>
> So, does anyone have any advice on how to get out of this situation
> and get a better Emacs setup on Windows? Any and all hints very much
> appreciated!
Here is the way I set it up:
- Don't touch Windows $PATH and make any additions to it
- Only set $HOME (or %HOME% to be in Windows parlance) as a system-wide
variable to a directory of your choice
- Install the portable version of Msys2, here the latest version[1]
- In the install directory, double click 'msys2_shell.cmd', let is run
its opening ceremony, and do 'pacman -Syu'
- In your $HOME, touch .bash_profile and put things you want to have in
it. For example, I use Ghostscript installed on my C drive, and this
is what I have:
export PATH=$PATH:/c/Program\ Files/gs/gs9.55.0/bin
export PATH=$PATH:/c/Program\ Files/gs/gs9.55.0/lib
- Install Emacs from a source of your choice (or even compile it
yourself) and add an entry to $PATH like above
- In your Msys2 install directory, double click 'mingw64.exe' and then
'emacs &' to see if it all works
- If you're happy, then start dropping wintty and use another terminal;
I'm currently using Windows Terminal and I'm quite happy with it
N.B. I was never fond of setting environment variables within Emacs, so
I set everything in the shell and then start Emacs from it. So I have
no "Shortcut to Emacs" on the desktop.
Reg. Git: I use git provided by Msys2. It works for my workflow, but I
don't use Magit, so I can't tell how it goes.
HTH. Best, Arash
Footnotes:
[1]
https://github.com/msys2/msys2-installer/releases/download/2022-01-28/msys2-base-x86_64-20220128.tar.xz
- Re: How to *properly* set up Emacs on Windows?, (continued)
Re: How to *properly* set up Emacs on Windows?, Óscar Fuentes, 2022/02/08
- Re: How to *properly* set up Emacs on Windows?, Joost, 2022/02/09
- Re: How to *properly* set up Emacs on Windows?, H. Dieter Wilhelm, 2022/02/09
- Re: How to *properly* set up Emacs on Windows?, Óscar Fuentes, 2022/02/09
- Re: How to *properly* set up Emacs on Windows?, Joost Kremers, 2022/02/10
- Re: How to *properly* set up Emacs on Windows?, Óscar Fuentes, 2022/02/10
- Re: How to *properly* set up Emacs on Windows?, Joost, 2022/02/11
- Re: How to *properly* set up Emacs on Windows?, Eli Zaretskii, 2022/02/11
Re: How to *properly* set up Emacs on Windows?,
Arash Esbati <=