all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joost <joostkremers@fastmail.fm>
To: help-gnu-emacs@gnu.org
Subject: Re: How to *properly* set up Emacs on Windows?
Date: Wed, 09 Feb 2022 09:48:09 +0100	[thread overview]
Message-ID: <329e100c-bdc0-4dd3-9f8b-64af1b4cc90e@www.fastmail.com> (raw)
In-Reply-To: <871r0drus2.fsf@telefonica.net>

Hi Óscar,

Thanks for your elaborate answer. It clears up some questions, but unfortunately also raises a few:

On Tue, 8 Feb 2022, at 21:02, Óscar Fuentes wrote:
>> I can set `package-gnupghome-dir` to
>> "/c/Users/joost.kremers/.emacs.d/elpa/gnupg" and that will fix this
>> issue, but it doesn't feel like it's the right solution.
>
> Why do you need to set package-gnupghome-dir at all?

I didn't set the original value with the Windows-style path, that was done automatically. I tried the POSIX-style path just to see if it worked. (There's a StackExchange answer somewhere suggesting this, but I posted here because I didn't think this was the right way to go about it.)

>> 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.
>
> First of all, undo those changes to PATH and any other change to .emacs
> related to Windows support.

I had C:/msys64/usr/bin in my system PATH and replaced it with C:/msys64/mingw64/bin. The only other change I made was to add C:/Program Files/Git/usr/bin to `exec-path` in Emacs, in order to use git from <https://gitforwindows.org/>.

> MSYS2 provides many utilities as MinGW packages.
>
> For instance, if you installed emacs with:
>
> $ pacman -S mingw-w64-x86_64-emacs

I didn't, I installed Emacs from gnu.org (installed to C:/Program\
Files/emacs-27.2-x86_64/). Would there be an advantage in installing Emacs with
pacman instead? Will that give me a graphical Emacs or just a console one?

> you should install those utilities as:
>
> $ pacman -S mingw-w64-x86_64-grep
> $ pacman -S mingw-w64-x86_64-diffutils
> $ pacman -S mingw-w64-x86_64-ag

Any point in installing those given that I didn't install Emacs with pacman? Can they be used with Emacs from gnu.org?

> For communicating with ELPA:
>
> $ pacman -S mingw-w64-x86_64-gnupg

Currently, after modifying the system PATH as described above, I can install packages from GNU Elpa again (Melpa was never a problem).

> For nativecomp support:
>
> $ pacman -S mingw-w64-x86_64-libgccjit

Is there an Emacs 28 pretest available that will work with this? (The Windows binaries that were anounced on emacs-devel the other day appear to be MSYS2 binaries? And `pacman -Ss emacs` doesn't return any Emacs 28 packages.)

> MSYS2 does not provide git as a MinGW package, so you have two options:
> either install the MSYS2 package (pacman -S git) or install "Git for
> Windows", which provide an almost native port.

I'm using the latter and added "C:/Program Files/Git/usr/bin" to `exec-path`, as mentioned above. Wrong decision?

> If you are a Magit user, you can also set magit-git-executable.

OK, I can try that instead.

> Now, a very important detail. Emacs does not follow the Windows
> convention of searching executables from the current process' directory.
> This means that you must explicitly tell Emacs where to look for all
> those utilities. You can add c:\msys64\mingw64\bin (change it if you
> installed MSYS2 elsewhere) to PATH or set PATH directly within Emacs:

I've now added that directory to the system PATH.

> You shouldn't need further modifications to your .emacs or to the
> environment (*), so ask here before adding something else.

I've been using Git Bash (alongside eshell) as my shell of choice. Would the MinGW-x64 shell provided by MSYS2 be a better choice? Or doesn't it really matter?

Thanks!

Joost


-- 
Joost Kremers
Life has its moments



  reply	other threads:[~2022-02-09  8:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 17:06 How to *properly* set up Emacs on Windows? Joost
2022-02-08 18:52 ` Eli Zaretskii
2022-02-09  8:14   ` Joost
2022-02-09 14:04     ` Eli Zaretskii
2022-02-10 21:05       ` Joost Kremers
2022-02-08 20:02 ` Óscar Fuentes
2022-02-09  8:48   ` Joost [this message]
2022-02-09 11:22     ` H. Dieter Wilhelm
2022-02-09 13:19     ` Óscar Fuentes
2022-02-10 21:58       ` Joost Kremers
2022-02-10 22:37         ` Óscar Fuentes
2022-02-11  9:30           ` Joost
2022-02-11  7:00         ` Eli Zaretskii
2022-02-09 12:28 ` Arash Esbati

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=329e100c-bdc0-4dd3-9f8b-64af1b4cc90e@www.fastmail.com \
    --to=joostkremers@fastmail.fm \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.