From 1c5a3526c1897582fd97c966a255982d076aaf7b Mon Sep 17 00:00:00 2001 From: James Dixon Date: Sat, 10 May 2025 13:03:32 -0400 Subject: [PATCH] Add comment on mingw and windows paths --- config/emacs/.config/emacs/init.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config/emacs/.config/emacs/init.el b/config/emacs/.config/emacs/init.el index dd668fe..55a9823 100644 --- a/config/emacs/.config/emacs/init.el +++ b/config/emacs/.config/emacs/init.el @@ -741,6 +741,7 @@ (gptel-make-openai "OpenAI" :stream t :key gptel-api-key) ;;; Platform Specifics + ;; for Win32 ;; TODO: check if fonts exists before setting (if (eq system-type 'windows-nt) @@ -758,6 +759,16 @@ (setq xfound (seq-some (lambda (x) (if (file-exists-p x) x nil)) xlist)) (when xfound (setq explicit-shell-file-name xfound)))) +;; Still handy having cygwin / mingw for minimal set of Linux CLI tools. +;; Alternative approach is installing Emacs inside WSL, which has pros and cons +;; as far as configuring PATH, SHELL, compiler and interop between Linux/Windows. +;; Overall it depends how much you are interacting with the native Windows NTFS +;; filesystem vs developing for things inside of Linux. +(when (eq system-type 'windows-nt) + (setq exec-path (cons "C:/cygwin/bin" exec-path)) + (setenv "PATH" (mapconcat #'identity exec-path path-separator))) + + ;; Have to change emacs init dir for Windows ;; https://emacs.stackexchange.com/a/12886 ;; (setenv "HOME" "C:/Users/itzja")