How can I use ediff under Windows + NTEmacs?

后端 未结 5 1616
闹比i
闹比i 2020-12-20 11:46

I have Emacs version 23 on Windows and it seem the ediff executable is missing?

From where can I download ediff for Emacs on Windows?

相关标签:
5条回答
  • 2020-12-20 12:22

    When you run ediff from emacs, it does indeed look for an executable diff. One way to get it is to install cygwin. You don't have to use Emacs from cygwin to use diff. Just add c:\cygwin\bin (use your cygwin install path) to %PATH% and restart emacs.

    Now when you run ediff, it will find diff.exe in your %PATH%.

    Ediff in emacs on Windows 7

    0 讨论(0)
  • 2020-12-20 12:25

    There isn't an executable for ediff.

    ediff is a lisp program that runs within emacs. If you would like to run it from the command line, take a look at this documentation.

    0 讨论(0)
  • 2020-12-20 12:28

    It's probably a Windows-native diff that you're missing. You really want to have access to a suite of additional Unix-like tools when you run NTEmacs.

    Cygwin is probably the most common solution. Many people use the GNUWin32 tools instead ("much faster, though less complete, than the Cygwin ones").

    See here for more details: How to best integrate Emacs and Cygwin?

    Emacs Wiki: http://www.emacswiki.org/emacs/CygWin

    Be aware that as well as NTEmacs, there is a Cygwin-native Emacs as well. So you can either use NTEmacs with Cygwin providing all the additional tools; or you can ignore NTEmacs entirely, and install Cygwin's Emacs package and just use that. NTEmacs is faster, but Cygwin Emacs integrates better with the rest of Cygwin in a few areas.

    0 讨论(0)
  • 2020-12-20 12:44

    You can download diffUtils, extract it, add the path to %PATH% and emacs exec-path in your Emacs init file like that.

    (when (string-equal system-type "windows-nt")
      (progn
        (setq diff-path "your-diff-path")
        (setenv "PATH"
                (concat diff-path ";"))
        (setq exec-path
              '(diff-path))))
    

    finally, using M-x diff to compare what you want.

    0 讨论(0)
  • 2020-12-20 12:47

    If you have git for windows installed, then it is enough to add

    C:\Program Files\Git\usr\bin\
    

    to your PATH environment variable, because git for windows already ships with a diff executable and installs it in that folder.

    0 讨论(0)
提交回复
热议问题