How to best integrate Emacs and Cygwin?

后端 未结 12 1117
予麋鹿
予麋鹿 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:53

    I investigated three options, all with windowed (but not X11) versions of Emacs. (The terminal is too hardcore for me.) Here goes:

    1. The XEmacs that comes with Cygwin
    2. EmacsW32
    3. Standard Emacs for Windows

    The Cygwin folks want to steer you to their Emacs/XEmacs. In http://cygwin.com/faq/faq-nochunks.html#faq.using.ntemacs, they write "Note that all of this ``just works'' if you use the Cygwin port of Emacs or XEmacs from Cygwin Setup".

    Be sure to install the xemacs-sumo package in addition to xemacs; otherwise M-x shell won't work. You can launch xemacs without using X11 as

    DISPLAY= xemacs &
    

    Drawbacks: 1) Boy, this is an old Emacs. I didn't really want to soldier on with this when everyone else is using Emacs 23. 2) I found it mildly annoying that the install required a whole bunch of X11 libs even if you aren't running X11. 3) No cua-mode out of the box.

    EmacsW32 (http://ourcomments.org/Emacs/EmacsW32.html) has a one-click installer, a M-x cygwin-shell command, and CUA mode. But tab completion in the Cygwin shell uses Windows paths, which drove me crazy. The W32 port doesn't seem to be actively improved since 2008, but they provide installers with more recent Emacs versions.

    The standard Emacs for Windows seems to be the best bet. Download from http://ftp.gnu.org/pub/gnu/emacs/windows/, unzip, and launch from inside Cygwin. Then it picks up the home directory etc. Paste the mumbo-jumbo from http://cygwin.com/faq/faq-nochunks.html#faq.using.ntemacs into ~/.emacs. Restart Emacs and run M-x shell. All works as expected.

提交回复
热议问题