How to best integrate Emacs and Cygwin?

后端 未结 12 1155
予麋鹿
予麋鹿 2020-12-22 18:22

There are a ton of ways to integrate Cygwin with Emacs on Windows. EmacsWiki shows a few ideas. Here are the options that I\'ve found:

  1. Use the Emacs that com
12条回答
  •  余生分开走
    2020-12-22 18:57

    The third option. I am using NTEmacs + EmacsW32 + Cygwin. This way I have a native Windows application with Unix utilities and bash shell. The makefiles work, I have never used M-x whois though. I cannot think of any immediate drawbacks of this setup.

    Here are interesting bits of my setup, basically very similar to http://www.emacswiki.org/emacs/NTEmacsWithCygwin:

    (setq cygwin-root "c:/cygwin/")
    (setq private-bin (concat home-dir "/usr/bin"))
    (setq exec-path (cons private-bin exec-path))
    (setenv "PATH" (concat private-bin ";" (getenv "PATH")))
    ; Add Cygwin Emacs stuff
    (add-to-load-path "/usr/share/emacs/site-lisp")
    ; Add Cygwin Info pages
    (add-to-list 'Info-default-directory-list
                 (concat cygwin-root "usr/share/info/"))
    
    (setq shell-file-name "bash")
    (setenv "SHELL" shell-file-name)
    (setq explicit-shell-file-name shell-file-name)
    
    (setq w32shell-cygwin-bin "c:\\cygwin\\bin")
    (require 'w32shell)
    (w32shell-add-emacs)
    (w32shell-set-shell "cygwin")
    

提交回复
热议问题