NTEmacs Binary Build by Cygwin
You can choose install my build package or build it by your self.
If you want to install build package, please see "Distributed Package Install" section.
If you want to build it by yourself, please see "How to Build the NTEmacs and Wanderlust by Cygwin" section.
Cygwin Install
Before starting to use NTEmacs either using build package or buid it by yourself, I strongly recommend to use cygwin with NTEmacs.
The some feature of build package expects the cygwin is in installed on machine which you want to use NTEmacs.
Get the setup.exe from http://www.cygwin.org/ and install it.
Get cygwin32-mount.el from http://ontosys.com/src/cygwin32-mount.el and compile it and copy it to site-lisp directory.
Distributed Package Install
Download
GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-08-19 on JINKUDO - Wanderlust/2.15.7 (Almost Unreal)
emacs_nt_23.1.1_wl_2.15.7.tar.gz - base source emacs-23.1.tar.gz
GNU Emacs 22.1.50.1 (i386-mingw-nt5.1.2600) of 2007-05-28 on JKUDO01 - Wanderlust/2.15.6 (Almost Unreal)
emacs_nt_22.1.50.1_wl_2.15.6.tar.gz - base source emacs-22.1.tar.gz
Installation
cd c:/; tar zxvf emacs_nt_XXX.tar.gz
mv emacs23(or emacs22) emacs
Launch c:\emacs\bin\addpm.exe
Change the path environment to c:\cygwin\usr\local\bin;c:\cygwin\usr\bin;c:\cygwin\bin;c:\cygwin\usr\X11R6\bin;%PATH%
Launch c:/emacs/bin/capstoctrl.reg (Switch Caps key to Ctrl key - Optional)
Launch c:/emacs/gs/setupgs.exe (Printing - Optional)
Launch c:/emacs/src/gsv49w32.exe (Printing - Optional)
Configure .emacs, please see "Emacs Configuration by .emacs file" section how to configure.
Original NTEmacs
Original NTEmacs is also available the following information resources.
http://www.gnu.org/software/emacs/windows/ntemacs.html
http://sourceforge.jp/projects/ntemacsjp/releases/ (with IME Patch)
How to Build the NTEmacs and Wanderlust by Cygwin
This is only required to create the build by yourself, if you just install the distributed package in this page, you don't need to do anything in this section.
Emacs
Get the following files and put it to c:\emacs\src\include
gif_lib.h jmorecfg.h pngconf.h tiffconf.h xpm.h
jconfig.h jpeglib.h simx.h tiffio.h zconf.h
jerror.h png.h tiff.h tiffvers.h zlib.h
jpeg62.dll libpng13.dll libungif.dll
libXpm-noX4.dll libtiff3.dll zlib1.dll
cd c:/emacs/src
cvs -d:pserver:anonymous@cvs.gnu.org:/sources/emacs login
cvs -d:pserver:anonymous@cvs.gnu.org:/sources/emacs co emacs
Get IME patch from http://sourceforge.jp/projects/ntemacsjp/releases/
Get Transparancy patch from http://sourceforge.jp/projects/macemacsjp/files/
Apply the patches
emacs22
nkf --overwrite -Lu patch/emacs-cvs-20070111-IME.patch
cd c:/emacs/src/emacs
patch -p0 <../../patch/emacs-cvs-20070111-IME.patch
patch -p0 <../../patch/transparency3/transparency3.patch
emacs23
nkf --overwrite -Lu patch/Emacs-23.1-IME.patch
cd c:/emacs/src/emacs-23.1
patch -p0 <../../patch/Emacs-23.1-IME.patch
patch -p0 <../../patch/configure-23.1.patch (this is only available in the distributed package)
cd nt
Modify the gmake.defs and remove the comment out for the following lines
#ifeq "$(shell cygpath $(CURDIR))" "$(CURDIR)"
#CURDIR := $(shell cygpath -m $(CURDIR))
#endif
Run configuration
./configure.bat --with-gcc --no-cygwin --prefix c:/emacs --cflags -DIME_CONTROL --cflags -DRECONVERSION --cflags -DCLIENTEDGE --no-debug --cflags -Ic:/emacs/src/include (emacs22)
./configure.bat --enable-w32-ime --with-gcc --no-cygwin --no-debug --cflags -UNICODE --cflags -DRECONVERSION --cflags=-I/tmp/include -- ----prefix=c:/emacs (emacs23)
make bootstrap (make version must 3.8 do not use 3.8.1)
make info
make install
Wanderlust
Get the following packages
Apel 10.6 ftp://ftp.m17n.org/pub/mule/apel/
Flim 1.14.6 ftp://ftp.m17n.org/pub/mule/flim/
Semi 1.14.6 ftp://ftp.m17n.org/pub/mule/semi/
Wanderlust 2.14.0 http://www.gohome.org/wl/ (Only the case of you don't use cvs version)
Get the source from cvs server
cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root login
cd c:/emacs/src
cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root checkout wanderlust
cd wanderlust
make
make install
make info
make install-info
There is not SSH Utility Library in normal installation, so get the utils directory and put it to your site-lisp directory and Byte Compile(M-x byte-compile-file)
Use the openssl.exe on cygwin
Emacs-W3M
Get the source from cvs server
cvs -d :pserver:anonymous@cvs.namazu.org:/storage/cvsroot login
cvs -d :pserver:anonymous@cvs.namazu.org:/storage/cvsroot co emacs-w3m
Or just get the Emacs W3M 1.4.4 from http://emacs-w3m.namazu.org/ (This is emacs22 only, doesn't work emacs23 in this version)
Install it by:
% ./configure --with-addpath=//c/emacs/lisp/gnus://c/emacs/site-lisp/apel://c/emacs/site-lisp/flim
% make
% make install
% make install-icons
If you compile w3m itself,
Get GC from http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/ and try configure, make, make install
export LDFLAGS='-Xlinker -R/usr/local/lib'
Get W3M from http://w3m.sourceforge.net/ and try configure, make, make install
Get emacs-w3m http://emacs-w3m.namazu.org/ configure, make, make install
Ghost Script/View
Get the GS7.0.7(gs707w32full.zip) and the font files (acro5-cmaps-2001.zip,adobe-cmaps-200204.zip) from http://www.ring.gr.jp/pub/text/TeX/ptex-win32/gs/
Extract gs707w32full.zip and run setupgs.exe
Extract acro5-cmaps-2001.zip,adobe-cmaps-200204.zip to c:\emacs\gs\gs7.07\Resource
Modify the line of 249, 250 of c:\emacs\gs\gs7.07\lib\gs_res.ps to your gs install path
Install gsview from http://pages.cs.wisc.edu/~ghost/gsview/
Mule-UCS
Get Mule-UCS (mule-ucs-20061127-1) from http://www.meadowy.org/~shirai/elisp/mule-ucs.tar.gz
After extract it, run the following.
% emacs -q --no-site-file -batch -l mucs-comp.el
% cd lisp/jisx0213/
% emacs -q --no-site-file -batch -l x0213-comp.el
% cd ../big5conv/
% emacs -q --no-site-file -batch -l big5-comp.el
Copy this directory to your site-lisp directory.
Eblook for Dictionary Search
Get the eblook from http://openlab.ring.gr.jp/edict/eblook/
Get the lookup from http://openlab.ring.gr.jp/edict/lookup/
Add eblook.exe, eb.dll to bin directory
Add lookup/lisp to site-lisp directory
Perforce Emacs Integration
Get the p4.el from http://p4el.sourceforge.net/p4.el.html
Byte compile by the following and specify the p4.exe path
emacs -batch -f batch-byte-compile p4.el
Add it to site-lisp directory
Emacs Configuration by .emacs file
Shell Configuration
(setq explicit-shell-file-name "bash")
(setq shell-file-name "bash")
Emacs-W3M Configuration
(autoload 'w3m "w3m" "Interface for w3m on Emacs." t)
(autoload 'w3m-find-file "w3m" "Interface for w3m on Emacs." t)
(autoload 'w3m-search "w3m-search" "Search QUERY using SEARCH-ENGINE." t)
(setq w3m-command "w3m")
(setq w3m-type 'w3m)
(setq w3m-use-filter t)
(setq w3m-display-inline-image t)
(setq mime-setup-enable-inline-html t)
(eval-after-load "mime-view"
'(progn
(autoload 'mime-w3m-preview-text/html "mime-w3m")
(ctree-set-calist-strictly
'mime-preview-condition
'((type . text)
(subtype . html)
(body . visible)
(body-presentation-method . mime-w3m-preview-text/html)))
(set-alist 'mime-view-type-subtype-score-alist
'(text . html) 3)))
(require 'mime-w3m)
Mail User Agent(Wanderlust) Configuration
(autoload 'wl "wl" "Wanderlust" t)
(autoload 'wl-other-frame "wl" "Wanderlust on new frame." t)
(autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
(autoload 'wl-user-agent-compose "wl-draft" nil t)
(if (boundp 'mail-user-agent)
(setq mail-user-agent 'wl-user-agent))
(if (fboundp 'define-mail-user-agent)
(define-mail-user-agent
'wl-user-agent
'wl-user-agent-compose
'wl-draft-send
'wl-draft-kill
'mail-send-hook))
Create the .wl,.folders,.address files followed by the http://www.gohome.org/wl/index.ja.html example
Windows IME Setting (with IME Patch Only)
(if (string-match "22." emacs-version)
(progn
;;; IME
(when (fboundp 'mw32-ime-initialize)
(setq default-input-method "MW32-IME")
(setq-default mw32-ime-mode-line-state-indicator "[--]")
(setq mw32-ime-mode-line-state-indicator-list '("[--]" "[あ]" "[--]"))
(mw32-ime-initialize)
(wrap-function-to-control-ime 'y-or-n-p nil nil)
(wrap-function-to-control-ime 'yes-or-no-p nil nil)
(wrap-function-to-control-ime 'universal-argument t nil)
(wrap-function-to-control-ime 'read-string nil nil)
(wrap-function-to-control-ime 'read-from-minibuffer nil nil)
(wrap-function-to-control-ime 'read-key-sequence nil nil)
(wrap-function-to-control-ime 'map-y-or-n-p nil nil)
(wrap-function-to-control-ime 'read-passwd t t) ; don't work as we expect.
(add-hook 'mw32-ime-on-hook
(function (lambda () (set-cursor-color "blue"))))
(add-hook 'mw32-ime-off-hook
(function (lambda () (set-cursor-color "black"))))
(add-hook 'minibuffer-setup-hook
(function (lambda ()
(if (fep-get-mode)
(set-cursor-color "blue")
(set-cursor-color "black"))))))
))
(if (string-match "23." emacs-version)
(progn
;;; IME
(when (fboundp 'w32-ime-initialize)
(setq default-input-method "W32-IME")
(setq-default w32-ime-mode-line-state-indicator "[--]")
(setq w32-ime-mode-line-state-indicator-list '("[--]" "[あ]" "[--]"))
(w32-ime-initialize)
(wrap-function-to-control-ime 'y-or-n-p nil nil)
(wrap-function-to-control-ime 'yes-or-no-p nil nil)
(wrap-function-to-control-ime 'universal-argument t nil)
(wrap-function-to-control-ime 'read-string nil nil)
(wrap-function-to-control-ime 'read-from-minibuffer nil nil)
(wrap-function-to-control-ime 'read-key-sequence nil nil)
(wrap-function-to-control-ime 'map-y-or-n-p nil nil)
(wrap-function-to-control-ime 'read-passwd t t) ; don't work as we expect.
(add-hook 'w32-ime-on-hook
(function (lambda () (set-cursor-color "red"))))
(add-hook 'w32-ime-off-hook
(function (lambda () (set-cursor-color "black"))))
; (add-hook 'minibuffer-setup-hook
; (function (lambda ()
; (if (fep-get-mode)
; (set-cursor-color "blue")
; (set-cursor-color "black")))))
)))
Windows Font Configuration
(setq w32-use-w32-font-dialog nil)
(setq scalable-fonts-allowed t)
(setq w32-enable-synthesized-fonts t)
(if (string-match "22." emacs-version)
(progn
(create-fontset-from-ascii-font "-outline-Courier New-normal-r-normal-normal-12-*-*-*-*-*-iso8859-1" nil "u1")
))
(if (string-match "23." emacs-version)
(progn
(create-fontset-from-ascii-font "Courier New 9" nil "u1")
))
(set-fontset-font "fontset-u1" 'japanese-jisx0208
'("メイリオ" . "jisx0208-sjis"))
(set-fontset-font "fontset-u1" 'katakana-jisx0201
'("メイリオ" . "jisx0208-sjis"))
(set-fontset-font "fontset-u1" 'japanese-jisx0208-1978
'("メイリオ" . "jisx0208-sjis"))
(set-fontset-font "fontset-u1" 'latin-iso8859-1
'("Courier New" . "iso8859-1"))
(set-fontset-font "fontset-u1" 'latin-iso8859-2
'("Courier New" . "iso8859-2"))
(set-fontset-font "fontset-u1" 'latin-iso8859-3
'("Courier New" . "iso8859-3"))
(set-fontset-font "fontset-u1" 'latin-iso8859-4
'("Courier New" . "iso8859-4"))
(set-fontset-font "fontset-u1" 'cyrillic-iso8859-5
'("Courier New" . "iso8859-5"))
(set-fontset-font "fontset-u1" 'greek-iso8859-7
'("Courier New" . "iso8859-7"))
(set-fontset-font "fontset-u1" 'hebrew-iso8859-8
'("Arial Unicode MS" . "iso8859-8"))
(set-fontset-font "fontset-u1" 'latin-iso8859-9
'("Courier New" . "iso8859-9"))
(set-fontset-font "fontset-u1" 'thai-tis620
'("Arial Unicode MS" . "tis620-0"))
(if (string-match "23." emacs-version)
(progn
(set-fontset-font "fontset-u1" 'korean-ksc5601
'("Arial Unicode MS" . "ksc5601.1987-0") nil 'append)
(set-fontset-font "fontset-u1" 'chinese-big5-1
'("Arial Unicode MS" . "big5-0") nil 'append)
(set-fontset-font "fontset-u1" 'chinese-big5-2
'("Arial Unicode MS" . "big5-0") nil 'append)
(set-fontset-font "fontset-u1" 'chinese-gb2312
'("Arial Unicode MS" . "gb2312.1980-0") nil 'append)
(set-fontset-font "fontset-u1" 'mule-unicode-0100-24ff
"Arial Unicode MS" nil 'append)
(set-fontset-font "fontset-u1" 'mule-unicode-2500-33ff
"Arial Unicode MS" nil 'append)
(set-fontset-font "fontset-u1" 'mule-unicode-e000-ffff
"Arial Unicode MS" nil 'append)
(set-fontset-font "fontset-u1" 'ethiopic
'("Arial Unicode MS" . "iso10646-1") nil 'append)
(set-fontset-font "fontset-u1" 'mule-unicode-0100-24ff
'("Arial Unicode MS" . "iso10646-1") nil 'append)
(set-fontset-font "fontset-u1" 'mule-unicode-0100-24ff
'("Arial Unicode MS" . "iso10646-1") nil 'append)
(set-fontset-font "fontset-u1" 'mule-unicode-0100-24ff
'("Arial Unicode MS" . "iso10646-1") nil 'append)
(set-fontset-font "fontset-u1" 'mule-unicode-0100-24ff
'("Arial Unicode MS" . "iso10646-1") nil 'append)
(set-fontset-font "fontset-u1" nil "Arial Unicode MS" nil 'append)
))
;;; Frame parameters
(setq default-frame-alist
(append (list
'(foreground-color . "grey20")
'(background-color . "white smoke")
'(cursor-color . "black")
'(alpha . (85 85))
;'(font . "fontset-TT12M")
'(font . "fontset-u1")
)
default-frame-alist))
(setq initial-frame-alist default-frame-alist)
Print Configuration
(require 'ps-print)
(setq ps-multibyte-buffer 'non-latin-printer)
(setq ps-lpr-command "c:/Program Files/Ghostgum/gsview/gsview32.exe")
(setq ps-printer-name nil)
(setq ps-printer-name-option nil)
(setq ps-line-number t)
(setq ps-line-number-font "Times Italic")
(setq ps-line-number-font-size 6)
(setq ps-font-family 'Courier)
(setq ps-paper-type 'a4)
(setq ps-landscape-mode t)
(setq ps-number-of-columns 2)
Mule-UCS Configuration
(require 'un-define)
(require 'jisx0213)
Eblook and Lookup Configuration
(autoload 'lookup "lookup" nil t)
(autoload 'lookup-region "lookup" nil t)
(autoload 'lookup-pattern "lookup" nil t)
(autoload 'lookup-current-word "lookup" nil t)
(define-key ctl-x-map "l" 'lookup)
(define-key ctl-x-map "y" 'lookup-region)
(define-key ctl-x-map "w" 'lookup-word)
(define-key ctl-x-map "\C-y" 'lookup-pattern)
(setq lookup-search-agents '((ndeb "c:/emacs/dict/")))
(setq lookup-default-dictionary-options '((:stemmer .
stem-english)))
(setq lookup-use-kakasi nil)
(setq ndeb-process-coding-system 'sjis-dos)
Perforce Emacs Integration Configuration
(load-library "p4")
(setenv "P4PORT" "hostname:6999")
(setenv "P4CLIENT" "client name")
(setenv "P4USER" "user name")
(setenv "P4PASSWD" "password")
Additional .emacs configuration
Linux, Cygwin Emacs, Meadow, NTEmacs Dispatch
;; Unix/Linux.
(cond
((or (string= system-type "usg-unix-v")
(string= system-type "gnu/linux")
)
;; Linux Setting is here
))
;; Cygwin Emacs
(cond
((or (string= system-type "cygwin")
)
;; Cygwin Setting is here
))
;; NTEmacs and Meadow for Meadow1.99/2.X(Emacs21)
(cond
((or
(string= system-type "windows-nt")
(string= system-type "windows")
)
(cond
((featurep 'meadow)
;; Meadow Setting is here
)
(t
(if (string-match "22." emacs-version)
(progn
;; NTEmacs22 Setting is here
))
(if (string-match "23." emacs-version)
(progn
;; NTEmacs23 Setting is here
))
))
))
Emacs Tips
Using emacs as binary editor
M-x hexl-find-file
multiple shell-mode
C-u M-x shell
Change font encoding
C-x RET f utf-8
Change process encoding in shell mode
C-x RET p utf-8 RET utf-8
Open file specify the encoding
C-x RET c utf-8 RET C-x C-f
Re-Open file specify the encoding
C-x RET c utf-8 RET C-x C-v RET
Change buffer display encoding
C-x RET r utf-8
Face Display
M-x list-faces-display
NTEmacs Font Listing
(insert (prin1-to-string (x-list-fonts "*")))
Meadow Font Listing
(w32-query-get-logfont)
Emacs Reference
NTEMacs CVS Build - http://ntemacs.sourceforge.net/
NTEmacs JP Project - http://ntemacsjp.sourceforge.jp/
IME Patch - http://sourceforge.jp/projects/ntemacsjp/releases/
Meadow - http://www.meadowy.org/meadow/
Emacs Manual - http://www.geocities.co.jp/SiliconValley-Oakland/3432/man/emacs/emacs-ja.html
Easy Reference - http://homepage3.nifty.com/kaku-chan/emacs/index.html