[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to *properly* set up Emacs on Windows?
From: |
Eli Zaretskii |
Subject: |
Re: How to *properly* set up Emacs on Windows? |
Date: |
Wed, 09 Feb 2022 16:04:08 +0200 |
> Date: Wed, 09 Feb 2022 09:14:20 +0100
> From: Joost <joostkremers@fastmail.fm>
>
> > . The above policy will not work with Git, because it _must_ be able
> > to call the MSYS2 Bash and other MSYS2 programs. If you want to
> > invoke Git from Emacs, have a git.cmd batch file on your Path
> > which will use SETLOCAL to add Git's bin directory to Path
> > temporarily, for the duration of the Git command, and invoke
> > git.exe. This will work for most simple Git commands; for more
> > complex Git commands that don't work from Emacs, use Git Bash
> > window to invoke them, and set up emacsclient to be the EDITOR for
> > Git commands instead.
>
> I use magit on Linux, and have so far continued to do so on Windows, even
> though it's extremely slow (apparently a known problem.) Git itself is
> installed from <https://gitforwindows.org/>, which adds to my confusion,
> because it is apparently a separate (and minimal) MSYS2 installation, which
> one is advised to keep separate from a "normal" MSYS2 installation. In order
> to use it inside Emacs, I add "C:/Program Files/Git/usr/bin" to `exec-path`
> (it's not in my system path). Does that make sense?
Yes: don't do that! Git/usr/bin is a directory where MSYS2 programs
used by Git are kept; you do NOT want them on your exec-path. That's
exactly why I wrote the above exception for Git. Óscar mentioned 2
other possible arrangements:
> MSYS2 does not provide git as a MinGW package, so [...] install "Git for
> Windows", which provide an almost native port. [...] the
> installer will ask if you want its executables added to PATH, either all
> or just git.exe. My advice is to not modify PATH or to add just git.exe.
> You can set vc-git-program to where git.exe is and VC will work without
> git.exe on PATH.
Any of these alternatives will save you from introducing MSYS2
programs into your exec-path, and will avoid the kind of problems you
encountered.
- How to *properly* set up Emacs on Windows?, Joost, 2022/02/08
- 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, 2022/02/09