2012年12月18日
twittering-mode のメニュー、1行目が消えたりしておかしくなる
emacs23 で書いた以下の内容だけど、emacs24でも起きた。
color-theme で 行表示して、 twittering-mode のメニュー、1行目が消え、ミニバッファが真っ黒に。
http://quantumfluctuation.blogspot.com/2012/12/color-theme-twittering-mode-1_12.html?spref=tw
けど、何が原因なのか、削ぎ落していくと再現性がいまいちとれない。
emacs24 では
- ssh
- custom-theme-set-faces した load-theme (emacs23 の color-themeに相当)
- (add-to-list 'anything-sources 'anything-c-source-emacs-commands)
を設定しておいて、どんどん重くなると起きるような気がする。そもそも環境
が特殊すぎるのかもしれない。
最小の設定では、以下の状態で、何度か遭遇した。
~/.emacs.d/init.el
===
(add-to-list 'load-path
"~/.emacs.d/auto-install")
(require 'anything)
(require 'anything-config)
(add-to-list 'anything-sources 'anything-c-source-emacs-commands)
(add-to-list 'load-path "~/.emacs.d/twittering-mode")
(require 'twittering-mode)
(setq twittering-timer-interval 300) ; Update your timeline each 300 seconds (5 minutes)
(setq twittering-username "ゆーざー名")
(setq twittering-auth-method 'oauth)
(load-file "~/.emacs.d/twittering-mode/twitterpass.el")
(setq twittering-initial-timeline-spec-string
'(
":replies"
":home"
))
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
(load-theme 'test t)
===
~/.emacs.d/themes/test-theme.el
===
(deftheme test
"Test color theme")
(custom-theme-set-faces
'test
;; 背景・文字
'(cursor ((t (:foreground "#F8F8F0"))))
'(default ((t (:background "#1B1D1E" :foreground "#F8F8F2")))))
;;;###autoload
(when load-file-name
(add-to-list 'custom-theme-load-path
(file-name-as-directory (file-name-directory load-file-name))))
(provide-theme 'test)
===
以下、使用環境。
[client]
===
# uname -a
CYGWIN_NT-6.1 D257-A71C 1.7.16(0.262/5/3) 2012-07-20 22:55 i686 Cygwin
# mintty --version
mintty 1.1.2
# ssh -v
openssh_6.1p1, openssl 1.0.1c 10 may 2012
# ~/bin/cocot.exe -v
cocot, version 20100903
# ~/bin/cocot.exe -t CP932 -p UTF-8 ssh IPアドレス
===
[server]
===
clothoid@debian:~$ uname -a
linux debian 2.6.33.7-co-0.7.9 #1 preempt sat apr 9 20:30:51 utc 2011 i686 gnu/linux
clothoid@debian:~$ emacs --version
GNU Emacs 24.2.1
===
2012年4月3日
cygwin 1.7.11-1 + emacs 23.4.1 on Windows7 x64 の設定まとめ
-*- Mode: org ; Coding: utf-8 -*-
cygwin 1.7.11-1 + emacs 23.4.1 on Windows7 x64 の設定まとめ
* download
http://cygwin.com
から、
http://cygwin.com/setup.exe
を
c:\cygwin
にダウロードして、インストール開始。
* Select Packages
setup.exe を実行して、適当に[Next]だが、
後々のことを考えて、以下は追加
- [All]>[Devel]
- [All]>[Web]>[wget: Utility to retrieve files from the WWW via HTTP and FTP]
- [All]>[Libs]>[libncurses7:libraries for terminal handling (runtime)]
- [All]>[Python]
- [All]>[Ruby]
- [All]>[X11]
- [Search] に [emacs] と入れて、出てきたもの全て
* mintty option
bash を起動して、タイトルバーを右クリックし、[Option]
** Transparency
[Lock]ツリーをクリックし、Transparency を Medium に設定
** locale
[Text]ツリーをクリックし、[Locale]で[jp.JP]を、[Character Set]で
[UTF-8]を選択
** font の設定
*** MeiryoKe のインストール
メイリオ・メイリオ改・meiryoKe・ttfname3
http://web1.nazca.co.jp/hp/nzkchicagob/m2x0897/mrkta5bz.html
1. meiryo602.zip. meiryo_Kai602.zip. meiryoKe_gen_6.02rev1.zip をダウン
ロード
2. 同じフォルダに全部入れて、meiryoKe_gen_6.02rev1.exe を実行
3. meiryo.ttc と meiryob.ttc はもういらない。削除。その他をコンパネから
インストトール
*** 設定
[Text]ツリーをクリックし、[Font]で[Select]をクリック、MeiryoKe_Console
を選択して、12pt とし、[OK]をリリック
** Windows 設定
[Window]ツリーを選択して、[Defalt Size]で適当に変更し、OK。
** 色の設定
mintty の青色が馬鹿にみにくい
$ emacs
C-x C-f ~/.minttyrc
-------------------------------------
*** /home/user/.minttyrc.orig date.old
--- /home/user/.minttyrc date
***************
*** 8,10 ****
--- 8,26 ----
BackgroundColour=0,0,0
Rows=54
+ Black=0,0,0
+ Red=255,100,0
+ Green=183,234,17
+ Yellow=234,206,28
+ Blue=107,155,219
+ Magenta=237,157,185
+ Cyan=0,191,191
+ White=255,255,255
+ BoldBlack=64,64,64
+ BoldRed=255,100,0
+ BoldGreen=183,234,17
+ BoldYellow=234,206,28
+ BoldBlue=107,155,219
+ BoldMagenta=237,157,185
+ BoldCyan=64,255,255
+ BoldWhite=255,255,25
-------------------------------------
* proxy
** bash
$ cd ~
$ emacs
C-x C-f .bashrc
-------------------------------------------------------------------
*** /home/user/.bashrc.orig date.old
--- /home/user/.bashrc date
***************
*** 196,198 ****
--- 196,200 ----
# }
#
# alias cd=cd_func
+
+ export http_proxy=http://<user-id>:<passward>@XXX.XXX.XXX.XXX:YY/
-------------------------------------------------------------------
** wget
$ cd ~
$ emacs
C-x C-f .wgetrc
-----------------------
HTTP_PROXY=address:port
-----------------------
** subversion
$ cd ~/.subversion/
$ cp servers servers.orig
$ emacs &
C-x C-f survers
----------------------------------------------------------
*** /home/user/.subversion/servers.orig date.old
--- /home/user/.subversion/servers date
***************
*** 141,148 ****
### due to SSL.
[global]
# http-proxy-exceptions = *.exception.com, www.internal-site.org
! # http-proxy-host = defaultproxy.whatever.com
! # http-proxy-port = 7000
# http-proxy-username = defaultusername
# http-proxy-password = defaultpassword
# http-compression = no
--- 141,148 ----
### due to SSL.
[global]
# http-proxy-exceptions = *.exception.com, www.internal-site.org
! http-proxy-host = address
! http-proxy-port = port
# http-proxy-username = defaultusername
# http-proxy-password = defaultpassword
# http-compression = no
----------------------------------------------------------
* apt-cyg のインストール
----------------------------------------------------------
$ cd /bin/
$ svn --force export http://apt-cyg.googlecode.com/svn/trunk/ /bin/
A .
A apt-cyg
リビジョン 18 をエクスポートしました。
$ chmod +x /bin/apt-cyg/
$ apt-cyg -m ftp://ftp.iij.ad.jp/pub/cygwin/ update
----------------------------------------------------------
* emacs
** font
*** init.el
;; ------------------------------------------------------------------------
;; @ Font Setting
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(blink-cursor-mode nil)
'(column-number-mode t)
'(cua-mode t nil (cua-base))
'(display-time-mode t)
'(show-paren-mode t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:inherit nil :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 121 :width normal :foundry "microsoft" :family "MeiryoKe_Console")))))
** 個人的な設定
*** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ 個人的な初期設定
; 区切り文字に全角スペースや、・を含める
(setq paragraph-start '"^\\([ ・○<\t\n\f]\\|(?[0-9a-zA-Z]+)\\)")
;; startup directory
(setq default-directory "~/")
;; ファイルのカーソル内の位置を記憶
(setq-default save-place t)
;; ログの記録行数を増やす
(setq message-log-max 10000)
;; undo をいっぱい
(setq undo-limit 100000)
(setq undo-strong-limit 130000)
;; キーストロークの表示速度を上げる
(setq echo-keystrokes 0.1)
;; でかいファイルも普通に開く(デフォルトは10MB)
(setq large-file-warning-threshold (* 50 1024 1024)) ;50MB
;; いちいち yes とか無理だから y にする
(defalias 'yes-or-no-p 'y-or-n-p)
;; BS や Delete キーでリージョン内の文字を削除
(delete-selection-mode 1)
;; TAB を bacspace で消すとき、半角スペースとして消さないで、tabのまま消す
(global-set-key [backspace] 'backward-delete-char)
;; 前回編集していた場所を記憶し,ファイルを開いた時にそこへカーソルを移動
(require 'saveplace)
(setq-default save-place t)
;; 矩形選択とか便利な cua-mode
(setq cua-enable-cua-keys nil) ;;C-xでkill-regionとかになって変な感じになるので。
(cua-mode t)
;; @ クリップボード転送ができないことがある。
(cond (window-system (setq x-select-enable-clipboard t)))
;; kill-ring はテキスト属性(色情報など)を保存しなくていい
(defadvice kill-new (around my-kill-ring-disable-text-property activate)
(let ((new (ad-get-arg 0)))
(set-text-properties 0 (length new) nil new)
ad-do-it))
;; 初期画面をいきなりbuffer-menuにする
(buffer-menu)
;; 括弧の対応表示
(setq blink-matching-paren t)
(show-paren-mode t)
(setq paren-sexp-mode t)
(set-face-background 'show-paren-match "royalBlue1")
;; 対応する括弧に移動のキーバインドを C-{ と C-} に変更 (C-M-f/p相当)
(global-set-key [?\C-{] 'backward-list)
(global-set-key [?\C-}] 'forward-list)
;; 行番号の表示
(line-number-mode t)
;; 列番号の表示
(column-number-mode t)
;; 時刻の表示
(require 'time)
(setq display-time-24hr-format t)
(setq display-time-string-forms '(24-hours ":" minutes))
(display-time-mode t)
;; カーソル点滅表示
(blink-cursor-mode 0)
;; スクロール時のカーソル位置の維持
(setq scroll-preserve-screen-position t)
;; スクロール行数(一行ごとのスクロール)
(setq vertical-centering-font-regexp ".*")
(setq scroll-conservatively 35)
(setq scroll-margin 0)
(setq scroll-step 1)
;; バッファ中の行番号表示
(global-linum-mode t)
;; 行番号のフォーマット
;; (set-face-attribute 'linum nil :foreground "red" :height 0.8)
(set-face-attribute 'linum nil :height 0.8)
(setq linum-format "%4d")
;; 画面スクロール時の重複行数
(setq next-screen-context-lines 1)
;; タブ, 全角スペースを色つき表示する (色名は M-x list-color-displayで調べる)
;; http://homepage1.nifty.com/blankspace/emacs/color.html
(defface my-face-b-1 '((t (:background "red4"))) nil) ;全角スペースの色
(defface my-face-b-2 '((t (:background "gray6"))) nil) ;タブの色
(defface my-face-u-1 '((t (:foreground "MediumPurple4" :underline t))) nil) ; 無駄な半角スペースの色
(defvar my-face-b-1 'my-face-b-1)
(defvar my-face-b-2 'my-face-b-2)
(defvar my-face-u-1 'my-face-u-1)
(defadvice font-lock-mode (before my-font-lock-mode ())
(font-lock-add-keywords
major-mode
'(("\t" 0 my-face-b-2 append)
(" " 0 my-face-b-1 append)
("[ \t]+$" 0 my-face-u-1 append)
)))
(ad-enable-advice 'font-lock-mode 'before 'my-font-lock-mode)
(ad-activate 'font-lock-mode)
;;起動時のフレームサイズを設定する
;; *scratch*バッファを開き,(frame-width), (frame-height) と書き,C-jする
(setq initial-frame-alist
(append
'((width . 120) ; フレーム幅(文字数)
(height . 55) ; フレーム高(文字数)
(top . 30) ; フレームの Y 位置(ピクセル数)
(left . 10) ; フレームの X 位置(ピクセル数)
) initial-frame-alist))
;ツールバー(アイコン)を消す
(tool-bar-mode -1)
;; 同名のファイルのバッファ名にディレクトリ名を追加する uniquify.el
(require 'uniquify)
(setq uniquify-buffer-name-style 'post-forward-angle-brackets)
-----------------------------------------------------------------------------
** software/packages
*** ddskk
**** install
以下から拾ってくる
Daredevil SKK (DDSKK)
http://openlab.ring.gr.jp/skk/ddskk-ja.html
-----------------------------------------------------------------------------
$ wget http://www.ring.gr.jp/archives/elisp/skk/maintrunk/ddskk-14.4.tar.gz
$ wget http://openlab.jp/skk/dic/SKK-JISYO.L.gz
$ gzip -cd ddskk-14.4.tar.gz | tar xvf -
$ gunzip SKK-JISYO.L.gz
$ mv SKK-JISYO.L ddskk-14.4/dic/
$ cd ddskk-14.4/
$ make what-where
$ make cdb
$ make install
-----------------------------------------------------------------------------
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ ddskk
;; http://openlab.ring.gr.jp/skk/ddskk-ja.html
;; ~/ddskk-14.4/etc/dot.emacs
;; ~/ddskk-14.4/etc/dot.skk
(require 'skk-autoloads) ; XEmacs でパッケージとしてインストールした場合は不要
(global-set-key "\C-x\C-j" 'skk-mode)
(global-set-key "\C-xj" 'skk-auto-fill-mode)
(global-set-key "\C-xt" 'skk-tutorial)
(setq skk-cdb-large-jisyo "/usr/share/skk/SKK-JISYO.L.cdb")
-----------------------------------------------------------------------------
*** auto-install
**** install
---------------------------------------------------------------------------------
~ $ mkdir ~/.emacs.d/auto-install
~ $ cd ~/.emacs.d/auto-install/
~/.emacs.d/auto-install $ wget http://www.emacswiki.org/emacs/download/auto-install.el
---------------------------------------------------------------------------------
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ auto-install.el
;; ロードパスの追加
(add-to-list 'load-path
"~/.emacs.d/auto-install")
(require 'auto-install)
(setq auto-install-directory "~/.emacs.d/auto-install")
(auto-install-update-emacswiki-package-name t)
;; (when (y-or-n-p "ネットに繋がっていますか?")
;; (auto-install-update-emacswiki-package-name t)) ; 通信遅れ対策
;; install-elisp.el 互換モードにする
(auto-install-compatibility-setup)
;; ediff 関連のバッファを 1 つのフレームにまとめる
(setq ediff-window-setup-function 'ediff-setup-windows-plain)
(put 'downcase-region 'disabled nil)
-----------------------------------------------------------------------------
*** aspell
**** install
$ apt-cyg install aspell aspell-en
C-x C-f ~/.aspell.conf
-----------------------
lang en_US
-----------------------
C-x C-s
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;;ispell が無いから、 aspell を使う
(setq-default ispell-program-name "aspell")
(eval-after-load "ispell"
'(add-to-list 'ispell-skip-region-alist '("[^\000-\377]+")))
-----------------------------------------------------------------------------
*** 日本語の info を導入する
**** install
M-x eshell
--------------------------------------------------------------------------
~ $ wget http://www.rubyist.net/~rubikitch/archive/emacs-elisp-info-ja.tgz
~ $ tar xzvf emacs-elisp-info-ja.tgz
--------------------------------------------------------------------------
C-x C-f /usr/share/info/dir
--------------------------------------------------------------------------
*** /usr/share/info/dir.orig date.old
--- /usr/share/info/dir date
***************
*** 213,215 ****
--- 213,219 ----
GNU Emacs Lisp
* SKK: (skk). Simple Kana to Kanji conversion program.
+
+ * Elisp-ja: (elisp-ja). Emacs Lisp Reference Manual(Japanease)
+ * Emacs-ja: (emacs-ja). The extensible self-documenting text editor(Japanease)
+
--------------------------------------------------------------------------
**** init.el
;; ------------------------------------------------------------------------
;; @ 日本語 info をいれる
(require 'info)
;; (add-to-list 'Info-additional-directory-list "/usr/share/info")
(add-to-list 'Info-directory-list "~/info")
*** cmigemo
**** install
M-x eshell
--------------------------------------------------------------------------
~ $ mkdir download
~ $ cd download/
~/download $ wget http://hp.vector.co.jp/authors/VA000501/qkcc100.zip
~/download $ unzip qkcc100.zip
~/download $ make
~/download $ cp -p qkc.exe /usr/local/bin/
~/download $ wget http://cmigemo.googlecode.com/files/cmigemo-default-src-20110227.zip
~/download $ unzip cmigemo-default-src-20110227.zip
~/download $ cd cmigemo-default-src/
~/download/cmigemo-default-src $ chmod 755 *
~/download/cmigemo-default-src $ ./configure
--------------------------------------------------------------------------
C-x C-f /cmigemo-default-src/src/wordbuf.c
-----------------------------------------------------------------------------
*** /home/user/download/cmigemo-default-src/src/wordbuf.c.orig date.old
--- /home/user/download/cmigemo-default-src/src/wordbuf.c date
***************
*** 9,14 ****
--- 9,15 ----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+ #include <limits.h>
#include "wordbuf.h"
#define WORDLEN_DEF 64
-----------------------------------------------------------------------------
M-x eshell
-----------------------------------------------------------------------------
~/download/cmigemo-default-src $ make cyg
~/download/cmigemo-default-src $ cd build/
~/download/cmigemo-default-src/build $ cp cygmigemo1.dll /usr/bin/
~/download/cmigemo-default-src/build $ cp cmigemo.exe /usr/bin/
~/download/cmigemo-default-src $ export http_proxy="http://XXX.XXX.XXX.XXX:YY"
~/download/cmigemo-default-src $ make cyg-dict
~/download/cmigemo-default-src $ cd dict/
~/download/cmigemo-default-src/dict $ make utf-8
~/download/cmigemo-default-src $ cd ..
~/download $ wget http://0xcc.net/migemo/migemo-0.40.tar.gz
~/download $ tar zxvf migemo-0.40.tar.gz
~/download $ mkdir -p ~/.emacs.d/cmigemo
~/download $ mv migemo-0.40/migemo.el.in ~/.emacs.d/cmigemo/migemo.el
-----------------------------------------------------------------------------
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ cmigemo
;; ロードパスの追加
(add-to-list 'load-path
"~/.emacs.d/cmigemo")
(setq migemo-command "cmigemo")
(setq migemo-options '("-q" "--emacs" "-i" "\a"))
(setq migemo-dictionary "/usr/local/share/migemo/utf-8/migemo-dict")
(setq migemo-user-dictionary nil)
(setq migemo-regex-dictionary nil)
(setq migemo-coding-system 'utf-8-unix)
(load-library "migemo")
(migemo-init)
-----------------------------------------------------------------------------
*** recentf-ext.el
**** install
M-x install-elisp-from-emacswiki
recentf-ext.el
C-c
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ 最近使ったファイルを開く recentf-ext.el
;; 最近のファイルを 3000 個保存する
(setq recentf-max-saved-items 3000)
;; 読み込み
(require 'recentf-ext)
-----------------------------------------------------------------------------
*** open-junk-file.el
**** install
M-x install-elisp-from-emacswiki
open-junk-file.el
C-c
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ 使い捨てのファイルを開く open-junk-file.el
;; 読み込み
(require 'open-junk-file)
;; ファイル名およびファイル場所の指定
(setq open-junk-file-format "~/junk/%Y-%m-%d-%H%M%S.")
-----------------------------------------------------------------------------
*** anything.el
**** install
M-x auto-install-batch anything
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ anything
(require 'anything-startup)
(setq extended-command-history '(
"open-junk-file"
"untabify"
"align-regexp"
"recentf-open-files"
"toggle-truncate-lines"
"describe-prefix-bindings"
))
-----------------------------------------------------------------------------
*** bat-mode.el
**** install
M-x eshell
---------------------------------------------------------------------------------
~ $ mkdir -p ~/.emacs.d/bat-mode
~ $ cd ~/.emacs.d/bat-mode/
~/.emacs.d/bat-mode $ wget http://ftp.gnu.org/old-gnu/emacs/windows/contrib/bat-mode.el
---------------------------------------------------------------------------------
M-x byte-complie-file bat-mode.el
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ windows batch-mode
;; ロードパスの追加
(add-to-list 'load-path
"~/.emacs.d/bat-mode")
(setq auto-mode-alist
(append
(list (cons "\\.[bB][aA][tT]$" 'bat-mode))
;; For DOS init files
(list (cons "CONFIG\\." 'bat-mode))
(list (cons "AUTOEXEC\\." 'bat-mode))
auto-mode-alist))
(autoload 'bat-mode "bat-mode"
"DOS and WIndows BAT files" t)
-----------------------------------------------------------------------------
*** auto-complete.el
**** install
M-x eshell
-------------------------------------------
~/ $ cd ~/download/
~/download $ unzip auto-complete-1.3.1.zip
~/download $ mv auto-complete-1.3.1 ~/.emacs.d/
-------------------------------------------
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ 入力補完支援 auto-complete.el
;; ロードパスの追加
(add-to-list 'load-path
"~/.emacs.d/auto-complete-1.3.1")
(require 'cl)
(require 'auto-complete)
;; 3.2. インストールスクリト
;; http://cx4a.org/software/auto-complete/manual.ja.html
(add-to-list 'ac-dictionary-directories "~/.emacs.d/auto-complete-1.3.1/dict")
(require 'auto-complete-config)
(ac-config-default)
;; 7.4. TAB で補完を完了する( RET は使わない)
;; http://cx4a.org/software/auto-complete/manual.ja.html
(define-key ac-completing-map "\t" 'ac-complete)
(define-key ac-completing-map "\r" nil)
;; 7.8. 特定のモードで自動で auto-complete-mode を有効にする
;; http://cx4a.org/software/auto-complete/manual.ja.html
(add-to-list 'ac-modes 'org-mode) ;; org-mode になったら、 auto-complete をスタートさせる
(add-to-list 'ac-modes 'text-mode)
(add-to-list 'ac-modes 'ruby-mode)
(add-to-list 'ac-modes 'pyhon-mode)
-----------------------------------------------------------------------------
*** text-transrator.el
**** install
M-x auto-install-batch
text translator
C-c
var なんたらが無いとエラーが発生する場合もあるが、2ー3回やれば大丈夫っ
ぽい。
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; Emacs でテキスト翻訳をする elisp
;; http://quantumfluctuation.blogspot.com/2011/05/text-translatorel_22.html
(require 'text-translator)
(setq text-translator-auto-selection-func
'text-translator-translate-by-auto-selection-enja)
;; 自動選択に使用する関数を設定
(setq text-translator-auto-selection-func
'text-translator-translate-by-auto-selection-enja)
;; ;; グローバルキーを設定
;; (global-set-key "\C-xt" 'text-translator-translate-by-auto-selection)
;; ;; if you are setting environment variables HTTP_PROXY,
;; ;; you have not to set this.
(setq text-translator-proxy-server "XXX.XXX.XXX.XXX")
(setq text-translator-proxy-port YY)
-----------------------------------------------------------------------------
*** emacs-w3m
**** download
CVS は HTTP Port でないため、 Proxy CVS 用に Proxy の設定をしなければな
らないが、よく分からない。
HTTP Proxy だけ与えられているので、トンネルする方法もあるようだが、そん
なことはできるだけやりたくない。
しかたないので、 proxy が不要な環境で、 emacs-w3m のファイルをとってく
る。 bash での手順は以下のとおり。
-----------------------------------------------------------------------------
~ $ apt-cyg install w3m
~ $ wget http://emacs-w3m.namazu.org/emacs-w3m-1.4.4.tar.gz
~ $ cvs -d :pserver:anonymous@cvs.namazu.org:/storage/cvsroot login
~ $ CVS password: [RET]
~ $ cvs -d :pserver:anonymous@cvs.namazu.org:/storage/cvsroot co emacs-w3m
~ $ tar zxf emacs-w3m-1.4.4.tar.gz
~ $ cp -r emacs-w3m-1.4.4 emacs-w3m-cvs
~ $ cp -f emacs-w3m/* emacs-w3m-cvs
-----------------------------------------------------------------------------
上記できた emacs-w3m-cvs フォルダの中身をとっておけば OK 。
**** install
-----------------------------------------------------------------------------
~/download/emacs-w3m-cvs $ chmod 755 *
~/download/emacs-w3m-cvs $ ./configure
~/download/emacs-w3m-cvs $ make
~/download/emacs-w3m-cvs $ make install
-----------------------------------------------------------------------------
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ w3m-emacs
(require 'w3m-load)
(setq w3m-use-cookies t)
(setq w3m-home-page "www.google.co.jp")
-----------------------------------------------------------------------------
cygwin 1.7.11-1 + emacs 23.4.1 on Windows7 x64 の設定まとめ
* download
http://cygwin.com
から、
http://cygwin.com/setup.exe
を
c:\cygwin
にダウロードして、インストール開始。
* Select Packages
setup.exe を実行して、適当に[Next]だが、
後々のことを考えて、以下は追加
- [All]>[Devel]
- [All]>[Web]>[wget: Utility to retrieve files from the WWW via HTTP and FTP]
- [All]>[Libs]>[libncurses7:libraries for terminal handling (runtime)]
- [All]>[Python]
- [All]>[Ruby]
- [All]>[X11]
- [Search] に [emacs] と入れて、出てきたもの全て
* mintty option
bash を起動して、タイトルバーを右クリックし、[Option]
** Transparency
[Lock]ツリーをクリックし、Transparency を Medium に設定
** locale
[Text]ツリーをクリックし、[Locale]で[jp.JP]を、[Character Set]で
[UTF-8]を選択
** font の設定
*** MeiryoKe のインストール
メイリオ・メイリオ改・meiryoKe・ttfname3
http://web1.nazca.co.jp/hp/nzkchicagob/m2x0897/mrkta5bz.html
1. meiryo602.zip. meiryo_Kai602.zip. meiryoKe_gen_6.02rev1.zip をダウン
ロード
2. 同じフォルダに全部入れて、meiryoKe_gen_6.02rev1.exe を実行
3. meiryo.ttc と meiryob.ttc はもういらない。削除。その他をコンパネから
インストトール
*** 設定
[Text]ツリーをクリックし、[Font]で[Select]をクリック、MeiryoKe_Console
を選択して、12pt とし、[OK]をリリック
** Windows 設定
[Window]ツリーを選択して、[Defalt Size]で適当に変更し、OK。
** 色の設定
mintty の青色が馬鹿にみにくい
$ emacs
C-x C-f ~/.minttyrc
-------------------------------------
*** /home/user/.minttyrc.orig date.old
--- /home/user/.minttyrc date
***************
*** 8,10 ****
--- 8,26 ----
BackgroundColour=0,0,0
Rows=54
+ Black=0,0,0
+ Red=255,100,0
+ Green=183,234,17
+ Yellow=234,206,28
+ Blue=107,155,219
+ Magenta=237,157,185
+ Cyan=0,191,191
+ White=255,255,255
+ BoldBlack=64,64,64
+ BoldRed=255,100,0
+ BoldGreen=183,234,17
+ BoldYellow=234,206,28
+ BoldBlue=107,155,219
+ BoldMagenta=237,157,185
+ BoldCyan=64,255,255
+ BoldWhite=255,255,25
-------------------------------------
* proxy
** bash
$ cd ~
$ emacs
C-x C-f .bashrc
-------------------------------------------------------------------
*** /home/user/.bashrc.orig date.old
--- /home/user/.bashrc date
***************
*** 196,198 ****
--- 196,200 ----
# }
#
# alias cd=cd_func
+
+ export http_proxy=http://<user-id>:<passward>@XXX.XXX.XXX.XXX:YY/
-------------------------------------------------------------------
** wget
$ cd ~
$ emacs
C-x C-f .wgetrc
-----------------------
HTTP_PROXY=address:port
-----------------------
** subversion
$ cd ~/.subversion/
$ cp servers servers.orig
$ emacs &
C-x C-f survers
----------------------------------------------------------
*** /home/user/.subversion/servers.orig date.old
--- /home/user/.subversion/servers date
***************
*** 141,148 ****
### due to SSL.
[global]
# http-proxy-exceptions = *.exception.com, www.internal-site.org
! # http-proxy-host = defaultproxy.whatever.com
! # http-proxy-port = 7000
# http-proxy-username = defaultusername
# http-proxy-password = defaultpassword
# http-compression = no
--- 141,148 ----
### due to SSL.
[global]
# http-proxy-exceptions = *.exception.com, www.internal-site.org
! http-proxy-host = address
! http-proxy-port = port
# http-proxy-username = defaultusername
# http-proxy-password = defaultpassword
# http-compression = no
----------------------------------------------------------
* apt-cyg のインストール
----------------------------------------------------------
$ cd /bin/
$ svn --force export http://apt-cyg.googlecode.com/svn/trunk/ /bin/
A .
A apt-cyg
リビジョン 18 をエクスポートしました。
$ chmod +x /bin/apt-cyg/
$ apt-cyg -m ftp://ftp.iij.ad.jp/pub/cygwin/ update
----------------------------------------------------------
* emacs
** font
*** init.el
;; ------------------------------------------------------------------------
;; @ Font Setting
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(blink-cursor-mode nil)
'(column-number-mode t)
'(cua-mode t nil (cua-base))
'(display-time-mode t)
'(show-paren-mode t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:inherit nil :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 121 :width normal :foundry "microsoft" :family "MeiryoKe_Console")))))
** 個人的な設定
*** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ 個人的な初期設定
; 区切り文字に全角スペースや、・を含める
(setq paragraph-start '"^\\([ ・○<\t\n\f]\\|(?[0-9a-zA-Z]+)\\)")
;; startup directory
(setq default-directory "~/")
;; ファイルのカーソル内の位置を記憶
(setq-default save-place t)
;; ログの記録行数を増やす
(setq message-log-max 10000)
;; undo をいっぱい
(setq undo-limit 100000)
(setq undo-strong-limit 130000)
;; キーストロークの表示速度を上げる
(setq echo-keystrokes 0.1)
;; でかいファイルも普通に開く(デフォルトは10MB)
(setq large-file-warning-threshold (* 50 1024 1024)) ;50MB
;; いちいち yes とか無理だから y にする
(defalias 'yes-or-no-p 'y-or-n-p)
;; BS や Delete キーでリージョン内の文字を削除
(delete-selection-mode 1)
;; TAB を bacspace で消すとき、半角スペースとして消さないで、tabのまま消す
(global-set-key [backspace] 'backward-delete-char)
;; 前回編集していた場所を記憶し,ファイルを開いた時にそこへカーソルを移動
(require 'saveplace)
(setq-default save-place t)
;; 矩形選択とか便利な cua-mode
(setq cua-enable-cua-keys nil) ;;C-xでkill-regionとかになって変な感じになるので。
(cua-mode t)
;; @ クリップボード転送ができないことがある。
(cond (window-system (setq x-select-enable-clipboard t)))
;; kill-ring はテキスト属性(色情報など)を保存しなくていい
(defadvice kill-new (around my-kill-ring-disable-text-property activate)
(let ((new (ad-get-arg 0)))
(set-text-properties 0 (length new) nil new)
ad-do-it))
;; 初期画面をいきなりbuffer-menuにする
(buffer-menu)
;; 括弧の対応表示
(setq blink-matching-paren t)
(show-paren-mode t)
(setq paren-sexp-mode t)
(set-face-background 'show-paren-match "royalBlue1")
;; 対応する括弧に移動のキーバインドを C-{ と C-} に変更 (C-M-f/p相当)
(global-set-key [?\C-{] 'backward-list)
(global-set-key [?\C-}] 'forward-list)
;; 行番号の表示
(line-number-mode t)
;; 列番号の表示
(column-number-mode t)
;; 時刻の表示
(require 'time)
(setq display-time-24hr-format t)
(setq display-time-string-forms '(24-hours ":" minutes))
(display-time-mode t)
;; カーソル点滅表示
(blink-cursor-mode 0)
;; スクロール時のカーソル位置の維持
(setq scroll-preserve-screen-position t)
;; スクロール行数(一行ごとのスクロール)
(setq vertical-centering-font-regexp ".*")
(setq scroll-conservatively 35)
(setq scroll-margin 0)
(setq scroll-step 1)
;; バッファ中の行番号表示
(global-linum-mode t)
;; 行番号のフォーマット
;; (set-face-attribute 'linum nil :foreground "red" :height 0.8)
(set-face-attribute 'linum nil :height 0.8)
(setq linum-format "%4d")
;; 画面スクロール時の重複行数
(setq next-screen-context-lines 1)
;; タブ, 全角スペースを色つき表示する (色名は M-x list-color-displayで調べる)
;; http://homepage1.nifty.com/blankspace/emacs/color.html
(defface my-face-b-1 '((t (:background "red4"))) nil) ;全角スペースの色
(defface my-face-b-2 '((t (:background "gray6"))) nil) ;タブの色
(defface my-face-u-1 '((t (:foreground "MediumPurple4" :underline t))) nil) ; 無駄な半角スペースの色
(defvar my-face-b-1 'my-face-b-1)
(defvar my-face-b-2 'my-face-b-2)
(defvar my-face-u-1 'my-face-u-1)
(defadvice font-lock-mode (before my-font-lock-mode ())
(font-lock-add-keywords
major-mode
'(("\t" 0 my-face-b-2 append)
(" " 0 my-face-b-1 append)
("[ \t]+$" 0 my-face-u-1 append)
)))
(ad-enable-advice 'font-lock-mode 'before 'my-font-lock-mode)
(ad-activate 'font-lock-mode)
;;起動時のフレームサイズを設定する
;; *scratch*バッファを開き,(frame-width), (frame-height) と書き,C-jする
(setq initial-frame-alist
(append
'((width . 120) ; フレーム幅(文字数)
(height . 55) ; フレーム高(文字数)
(top . 30) ; フレームの Y 位置(ピクセル数)
(left . 10) ; フレームの X 位置(ピクセル数)
) initial-frame-alist))
;ツールバー(アイコン)を消す
(tool-bar-mode -1)
;; 同名のファイルのバッファ名にディレクトリ名を追加する uniquify.el
(require 'uniquify)
(setq uniquify-buffer-name-style 'post-forward-angle-brackets)
-----------------------------------------------------------------------------
** software/packages
*** ddskk
**** install
以下から拾ってくる
Daredevil SKK (DDSKK)
http://openlab.ring.gr.jp/skk/ddskk-ja.html
-----------------------------------------------------------------------------
$ wget http://www.ring.gr.jp/archives/elisp/skk/maintrunk/ddskk-14.4.tar.gz
$ wget http://openlab.jp/skk/dic/SKK-JISYO.L.gz
$ gzip -cd ddskk-14.4.tar.gz | tar xvf -
$ gunzip SKK-JISYO.L.gz
$ mv SKK-JISYO.L ddskk-14.4/dic/
$ cd ddskk-14.4/
$ make what-where
$ make cdb
$ make install
-----------------------------------------------------------------------------
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ ddskk
;; http://openlab.ring.gr.jp/skk/ddskk-ja.html
;; ~/ddskk-14.4/etc/dot.emacs
;; ~/ddskk-14.4/etc/dot.skk
(require 'skk-autoloads) ; XEmacs でパッケージとしてインストールした場合は不要
(global-set-key "\C-x\C-j" 'skk-mode)
(global-set-key "\C-xj" 'skk-auto-fill-mode)
(global-set-key "\C-xt" 'skk-tutorial)
(setq skk-cdb-large-jisyo "/usr/share/skk/SKK-JISYO.L.cdb")
-----------------------------------------------------------------------------
*** auto-install
**** install
---------------------------------------------------------------------------------
~ $ mkdir ~/.emacs.d/auto-install
~ $ cd ~/.emacs.d/auto-install/
~/.emacs.d/auto-install $ wget http://www.emacswiki.org/emacs/download/auto-install.el
---------------------------------------------------------------------------------
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ auto-install.el
;; ロードパスの追加
(add-to-list 'load-path
"~/.emacs.d/auto-install")
(require 'auto-install)
(setq auto-install-directory "~/.emacs.d/auto-install")
(auto-install-update-emacswiki-package-name t)
;; (when (y-or-n-p "ネットに繋がっていますか?")
;; (auto-install-update-emacswiki-package-name t)) ; 通信遅れ対策
;; install-elisp.el 互換モードにする
(auto-install-compatibility-setup)
;; ediff 関連のバッファを 1 つのフレームにまとめる
(setq ediff-window-setup-function 'ediff-setup-windows-plain)
(put 'downcase-region 'disabled nil)
-----------------------------------------------------------------------------
*** aspell
**** install
$ apt-cyg install aspell aspell-en
C-x C-f ~/.aspell.conf
-----------------------
lang en_US
-----------------------
C-x C-s
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;;ispell が無いから、 aspell を使う
(setq-default ispell-program-name "aspell")
(eval-after-load "ispell"
'(add-to-list 'ispell-skip-region-alist '("[^\000-\377]+")))
-----------------------------------------------------------------------------
*** 日本語の info を導入する
**** install
M-x eshell
--------------------------------------------------------------------------
~ $ wget http://www.rubyist.net/~rubikitch/archive/emacs-elisp-info-ja.tgz
~ $ tar xzvf emacs-elisp-info-ja.tgz
--------------------------------------------------------------------------
C-x C-f /usr/share/info/dir
--------------------------------------------------------------------------
*** /usr/share/info/dir.orig date.old
--- /usr/share/info/dir date
***************
*** 213,215 ****
--- 213,219 ----
GNU Emacs Lisp
* SKK: (skk). Simple Kana to Kanji conversion program.
+
+ * Elisp-ja: (elisp-ja). Emacs Lisp Reference Manual(Japanease)
+ * Emacs-ja: (emacs-ja). The extensible self-documenting text editor(Japanease)
+
--------------------------------------------------------------------------
**** init.el
;; ------------------------------------------------------------------------
;; @ 日本語 info をいれる
(require 'info)
;; (add-to-list 'Info-additional-directory-list "/usr/share/info")
(add-to-list 'Info-directory-list "~/info")
*** cmigemo
**** install
M-x eshell
--------------------------------------------------------------------------
~ $ mkdir download
~ $ cd download/
~/download $ wget http://hp.vector.co.jp/authors/VA000501/qkcc100.zip
~/download $ unzip qkcc100.zip
~/download $ make
~/download $ cp -p qkc.exe /usr/local/bin/
~/download $ wget http://cmigemo.googlecode.com/files/cmigemo-default-src-20110227.zip
~/download $ unzip cmigemo-default-src-20110227.zip
~/download $ cd cmigemo-default-src/
~/download/cmigemo-default-src $ chmod 755 *
~/download/cmigemo-default-src $ ./configure
--------------------------------------------------------------------------
C-x C-f /cmigemo-default-src/src/wordbuf.c
-----------------------------------------------------------------------------
*** /home/user/download/cmigemo-default-src/src/wordbuf.c.orig date.old
--- /home/user/download/cmigemo-default-src/src/wordbuf.c date
***************
*** 9,14 ****
--- 9,15 ----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+ #include <limits.h>
#include "wordbuf.h"
#define WORDLEN_DEF 64
-----------------------------------------------------------------------------
M-x eshell
-----------------------------------------------------------------------------
~/download/cmigemo-default-src $ make cyg
~/download/cmigemo-default-src $ cd build/
~/download/cmigemo-default-src/build $ cp cygmigemo1.dll /usr/bin/
~/download/cmigemo-default-src/build $ cp cmigemo.exe /usr/bin/
~/download/cmigemo-default-src $ export http_proxy="http://XXX.XXX.XXX.XXX:YY"
~/download/cmigemo-default-src $ make cyg-dict
~/download/cmigemo-default-src $ cd dict/
~/download/cmigemo-default-src/dict $ make utf-8
~/download/cmigemo-default-src $ cd ..
~/download $ wget http://0xcc.net/migemo/migemo-0.40.tar.gz
~/download $ tar zxvf migemo-0.40.tar.gz
~/download $ mkdir -p ~/.emacs.d/cmigemo
~/download $ mv migemo-0.40/migemo.el.in ~/.emacs.d/cmigemo/migemo.el
-----------------------------------------------------------------------------
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ cmigemo
;; ロードパスの追加
(add-to-list 'load-path
"~/.emacs.d/cmigemo")
(setq migemo-command "cmigemo")
(setq migemo-options '("-q" "--emacs" "-i" "\a"))
(setq migemo-dictionary "/usr/local/share/migemo/utf-8/migemo-dict")
(setq migemo-user-dictionary nil)
(setq migemo-regex-dictionary nil)
(setq migemo-coding-system 'utf-8-unix)
(load-library "migemo")
(migemo-init)
-----------------------------------------------------------------------------
*** recentf-ext.el
**** install
M-x install-elisp-from-emacswiki
recentf-ext.el
C-c
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ 最近使ったファイルを開く recentf-ext.el
;; 最近のファイルを 3000 個保存する
(setq recentf-max-saved-items 3000)
;; 読み込み
(require 'recentf-ext)
-----------------------------------------------------------------------------
*** open-junk-file.el
**** install
M-x install-elisp-from-emacswiki
open-junk-file.el
C-c
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ 使い捨てのファイルを開く open-junk-file.el
;; 読み込み
(require 'open-junk-file)
;; ファイル名およびファイル場所の指定
(setq open-junk-file-format "~/junk/%Y-%m-%d-%H%M%S.")
-----------------------------------------------------------------------------
*** anything.el
**** install
M-x auto-install-batch anything
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ anything
(require 'anything-startup)
(setq extended-command-history '(
"open-junk-file"
"untabify"
"align-regexp"
"recentf-open-files"
"toggle-truncate-lines"
"describe-prefix-bindings"
))
-----------------------------------------------------------------------------
*** bat-mode.el
**** install
M-x eshell
---------------------------------------------------------------------------------
~ $ mkdir -p ~/.emacs.d/bat-mode
~ $ cd ~/.emacs.d/bat-mode/
~/.emacs.d/bat-mode $ wget http://ftp.gnu.org/old-gnu/emacs/windows/contrib/bat-mode.el
---------------------------------------------------------------------------------
M-x byte-complie-file bat-mode.el
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ windows batch-mode
;; ロードパスの追加
(add-to-list 'load-path
"~/.emacs.d/bat-mode")
(setq auto-mode-alist
(append
(list (cons "\\.[bB][aA][tT]$" 'bat-mode))
;; For DOS init files
(list (cons "CONFIG\\." 'bat-mode))
(list (cons "AUTOEXEC\\." 'bat-mode))
auto-mode-alist))
(autoload 'bat-mode "bat-mode"
"DOS and WIndows BAT files" t)
-----------------------------------------------------------------------------
*** auto-complete.el
**** install
M-x eshell
-------------------------------------------
~/ $ cd ~/download/
~/download $ unzip auto-complete-1.3.1.zip
~/download $ mv auto-complete-1.3.1 ~/.emacs.d/
-------------------------------------------
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ 入力補完支援 auto-complete.el
;; ロードパスの追加
(add-to-list 'load-path
"~/.emacs.d/auto-complete-1.3.1")
(require 'cl)
(require 'auto-complete)
;; 3.2. インストールスクリト
;; http://cx4a.org/software/auto-complete/manual.ja.html
(add-to-list 'ac-dictionary-directories "~/.emacs.d/auto-complete-1.3.1/dict")
(require 'auto-complete-config)
(ac-config-default)
;; 7.4. TAB で補完を完了する( RET は使わない)
;; http://cx4a.org/software/auto-complete/manual.ja.html
(define-key ac-completing-map "\t" 'ac-complete)
(define-key ac-completing-map "\r" nil)
;; 7.8. 特定のモードで自動で auto-complete-mode を有効にする
;; http://cx4a.org/software/auto-complete/manual.ja.html
(add-to-list 'ac-modes 'org-mode) ;; org-mode になったら、 auto-complete をスタートさせる
(add-to-list 'ac-modes 'text-mode)
(add-to-list 'ac-modes 'ruby-mode)
(add-to-list 'ac-modes 'pyhon-mode)
-----------------------------------------------------------------------------
*** text-transrator.el
**** install
M-x auto-install-batch
text translator
C-c
var なんたらが無いとエラーが発生する場合もあるが、2ー3回やれば大丈夫っ
ぽい。
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; Emacs でテキスト翻訳をする elisp
;; http://quantumfluctuation.blogspot.com/2011/05/text-translatorel_22.html
(require 'text-translator)
(setq text-translator-auto-selection-func
'text-translator-translate-by-auto-selection-enja)
;; 自動選択に使用する関数を設定
(setq text-translator-auto-selection-func
'text-translator-translate-by-auto-selection-enja)
;; ;; グローバルキーを設定
;; (global-set-key "\C-xt" 'text-translator-translate-by-auto-selection)
;; ;; if you are setting environment variables HTTP_PROXY,
;; ;; you have not to set this.
(setq text-translator-proxy-server "XXX.XXX.XXX.XXX")
(setq text-translator-proxy-port YY)
-----------------------------------------------------------------------------
*** emacs-w3m
**** download
CVS は HTTP Port でないため、 Proxy CVS 用に Proxy の設定をしなければな
らないが、よく分からない。
HTTP Proxy だけ与えられているので、トンネルする方法もあるようだが、そん
なことはできるだけやりたくない。
しかたないので、 proxy が不要な環境で、 emacs-w3m のファイルをとってく
る。 bash での手順は以下のとおり。
-----------------------------------------------------------------------------
~ $ apt-cyg install w3m
~ $ wget http://emacs-w3m.namazu.org/emacs-w3m-1.4.4.tar.gz
~ $ cvs -d :pserver:anonymous@cvs.namazu.org:/storage/cvsroot login
~ $ CVS password: [RET]
~ $ cvs -d :pserver:anonymous@cvs.namazu.org:/storage/cvsroot co emacs-w3m
~ $ tar zxf emacs-w3m-1.4.4.tar.gz
~ $ cp -r emacs-w3m-1.4.4 emacs-w3m-cvs
~ $ cp -f emacs-w3m/* emacs-w3m-cvs
-----------------------------------------------------------------------------
上記できた emacs-w3m-cvs フォルダの中身をとっておけば OK 。
**** install
-----------------------------------------------------------------------------
~/download/emacs-w3m-cvs $ chmod 755 *
~/download/emacs-w3m-cvs $ ./configure
~/download/emacs-w3m-cvs $ make
~/download/emacs-w3m-cvs $ make install
-----------------------------------------------------------------------------
**** init.el
-----------------------------------------------------------------------------
;; ------------------------------------------------------------------------
;; @ w3m-emacs
(require 'w3m-load)
(setq w3m-use-cookies t)
(setq w3m-home-page "www.google.co.jp")
-----------------------------------------------------------------------------
src/wordbuf.c:118:19: error: ‘INT_MAX’ undeclared (first use in this function)
migemo で ハマッタ ハマッタ
そして、なんでうごいたのかわからん
M-x eshell
---------------------------------------------------------------------------------
~ $ mkdir download
~ $ cd download/
~/download $ wget http://hp.vector.co.jp/authors/VA000501/qkcc100.zip
~/download $ unzip qkcc100.zip
~/download $ make
~/download $ cp -p qkc.exe /usr/local/bin/
~/download $ rm -rf *
~/download $ wget http://cmigemo.googlecode.com/files/cmigemo-default-src-20110227.zip
~/download $ unzip cmigemo-default-src-20110227.zip
~/download $ cd cmigemo-default-src/
---------------------------------------------------------------------------------
ここまではいい感じ
---------------------------------------------------------------------------------------
~/download/cmigemo-default-src $ ./configure
./configure: Permission denied
---------------------------------------------------------------------------------------
なんでやねん!
ーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src $ chmod 755 *
~/download/cmigemo-default-src $ ./configure
ーーーーーーーーーーーーーーーーーーーーーーーーーーー
ふむふむ
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src $ make cyg
/usr/bin/make -f compile/Make_cyg.mak
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' に入ります
cc -O2 -Wall -o build/object/main.o -c src/main.c
src/main.c: In function ‘query_loop’:
src/main.c:34:2: 警告: pointer targets in passing argument 1 of ‘fgets’ differ in signedness
/usr/include/stdio.h:195:9: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/main.c:41:2: 警告: pointer targets in passing argument 1 of ‘strchr’ differ in signedness
/usr/include/string.h:29:8: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
src/main.c:41:11: 警告: pointer targets in assignment differ in signedness
src/main.c: In function ‘main’:
src/main.c:169:6: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:170:6: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:171:6: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:173:3: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:177:6: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:178:6: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:179:6: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:181:3: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:188:6: 警告: pointer targets in passing argument 2 of ‘migemo_query’ differ in signedness
src/migemo.h:51:32: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
cc -O2 -Wall -o build/object/charset.o -c src/charset.c
cc -O2 -Wall -o build/object/filename.o -c src/filename.c
cc -O2 -Wall -o build/object/migemo.o -c src/migemo.c
src/migemo.c: In function ‘migemo_load’:
src/migemo.c:178:2: 警告: pointer targets in passing argument 2 of ‘romaji_load’ differ in signedness
src/romaji.h:24:5: note: expected ‘const unsigned char *’ but argument is of type ‘const char *’
src/migemo.c: In function ‘migemo_open’:
src/migemo.c:255:6: 警告: pointer targets in passing argument 2 of ‘romaji_load’ differ in signedness
src/romaji.h:24:5: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/migemo.c:256:6: 警告: pointer targets in passing argument 2 of ‘romaji_load’ differ in signedness
src/romaji.h:24:5: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/migemo.c:257:6: 警告: pointer targets in passing argument 2 of ‘romaji_load’ differ in signedness
src/romaji.h:24:5: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/migemo.c:258:6: 警告: pointer targets in passing argument 2 of ‘romaji_load’ differ in signedness
src/romaji.h:24:5: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/migemo.c: In function ‘add_dubious_roma’:
src/migemo.c:376:5: 警告: pointer targets in passing argument 1 of ‘my_strlen’ differ in signedness
src/migemo.c:56:1: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
src/migemo.c:389:5: 警告: pointer targets in passing argument 1 of ‘strchr’ differ in signedness
/usr/include/string.h:29:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/migemo.c:391:2: 警告: pointer targets in passing argument 2 of ‘add_dubious_vowels’ differ in signedness
src/migemo.c:355:1: note: expected ‘unsigned char *’ but argument is of type ‘char *’
src/migemo.c:393:2: 警告: pointer targets in passing argument 1 of ‘strchr’ differ in signedness
/usr/include/string.h:29:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/migemo.c:399:3: 警告: pointer targets in passing argument 2 of ‘add_roma’ differ in signedness
src/migemo.c:322:1: note: expected ‘unsigned char *’ but argument is of type ‘char *’
src/migemo.c:406:3: 警告: pointer targets in passing argument 2 of ‘add_dubious_vowels’ differ in signedness
src/migemo.c:355:1: note: expected ‘unsigned char *’ but argument is of type ‘char *’
src/migemo.c: In function ‘query_a_word’:
src/migemo.c:466:5: 警告: pointer targets in passing argument 1 of ‘my_strlen’ differ in signedness
src/migemo.c:56:1: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
cc -O2 -Wall -o build/object/mnode.o -c src/mnode.c
cc -O2 -Wall -o build/object/romaji.o -c src/romaji.c
src/romaji.c: In function ‘strdup_lower’:
src/romaji.c:208:5: 警告: pointer targets in passing argument 1 of ‘strdup’ differ in signedness
/usr/include/string.h:67:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:208:26: 警告: pointer targets in initialization differ in signedness
src/romaji.c: In function ‘romaji_add_table’:
src/romaji.c:245:5: 警告: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
/usr/include/string.h:35:9: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:255:5: 警告: pointer targets in passing argument 1 of ‘strdup’ differ in signedness
/usr/include/string.h:67:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:255:24: 警告: pointer targets in assignment differ in signedness
src/romaji.c:259:6: 警告: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness
/usr/include/string.h:30:6: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:262:2: 警告: pointer targets in passing argument 1 of ‘strdup’ differ in signedness
/usr/include/string.h:67:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:262:22: 警告: pointer targets in assignment differ in signedness
src/romaji.c:265:6: 警告: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness
/usr/include/string.h:30:6: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:268:2: 警告: pointer targets in passing argument 1 of ‘strdup’ differ in signedness
/usr/include/string.h:67:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:268:23: 警告: pointer targets in assignment differ in signedness
src/romaji.c: In function ‘romaji_load’:
src/romaji.c:376:5: 警告: pointer targets in passing argument 1 of ‘charset_detect_file’ differ in signedness
src/charset.h:35:5: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:379:5: 警告: pointer targets in passing argument 1 of ‘fopen’ differ in signedness
/usr/include/stdio.h:225:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c: In function ‘romaji_convert2’:
src/romaji.c:454:2: 警告: pointer targets in passing argument 1 of ‘strdup’ differ in signedness
/usr/include/string.h:67:8: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
src/romaji.c:454:9: 警告: pointer targets in assignment differ in signedness
cc -O2 -Wall -o build/object/rxgen.o -c src/rxgen.c
src/rxgen.c: In function ‘rxgen_open’:
src/rxgen.c:156:2: 警告: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/rxgen.c:157:2: 警告: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/rxgen.c:158:2: 警告: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/rxgen.c:159:2: 警告: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/rxgen.c:160:2: 警告: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/rxgen.c:161:2: 警告: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/rxgen.c: In function ‘rxgen_generate’:
src/rxgen.c:322:2: 警告: pointer targets in passing argument 1 of ‘strdup’ differ in signedness
/usr/include/string.h:67:8: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
src/rxgen.c:322:9: 警告: pointer targets in assignment differ in signedness
src/rxgen.c: In function ‘rxgen_set_operator’:
src/rxgen.c:383:5: 警告: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
/usr/include/string.h:35:9: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/rxgen.c:387:5: 警告: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/rxgen.c:387:5: 警告: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
cc -O2 -Wall -o build/object/wordbuf.o -c src/wordbuf.c
src/wordbuf.c: In function ‘wordbuf_cat’:
src/wordbuf.c:117:9: 警告: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
/usr/include/string.h:35:9: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/wordbuf.c:118:19: error: ‘INT_MAX’ undeclared (first use in this function)
src/wordbuf.c:118:19: note: each undeclared identifier is reported only once for each function it appears in
compile/unix.mak:33: recipe for target `build/object/wordbuf.o' failed
make[1]: *** [build/object/wordbuf.o] Error 1
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' から出ます
Makefile:33: recipe for target `cyg-rel' failed
make: *** [cyg-rel] Error 2
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
えー、なにこれ、なんか一杯でたよ
C-x C-f /cmigemo-default-src/src/wordbuf.c
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
*** /home/user/download/cmigemo-default-src/src/wordbuf.c.orig date.old
--- /home/user/download/cmigemo-default-src/src/wordbuf.c date
***************
*** 9,14 ****
--- 9,15 ----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+ #include <limits.h>
#include "wordbuf.h"
#define WORDLEN_DEF 64
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
M-x eshell
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src $ make cyg
/usr/bin/make -f compile/Make_cyg.mak
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' に入ります
cc -O2 -Wall -o build/object/wordbuf.o -c src/wordbuf.c
src/wordbuf.c: In function ‘wordbuf_cat’:
src/wordbuf.c:118:9: 警告: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
/usr/include/string.h:35:9: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
cc -O2 -Wall -o build/object/wordlist.o -c src/wordlist.c
src/wordlist.c: In function ‘wordlist_open_len’:
src/wordlist.c:27:14: 警告: pointer targets in assignment differ in signedness
src/wordlist.c: In function ‘wordlist_open’:
src/wordlist.c:51:9: 警告: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
/usr/include/string.h:35:9: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
dllwrap -o ./build/cygmigemo1.dll --dllname cygmigemo1.dll --implib ./build/libmigemo.dll.a --def ./src/migemo.def ./build/object/charset.o ./build/object/filename.o ./build/object/migemo.o ./build/object/mnode.o ./build/object/romaji.o ./build/object/rxgen.o ./build/object/wordbuf.o ./build/object/wordlist.o
cc -o build/cmigemo.exe ./build/object/main.o -L. -L./build/ -lmigemo
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' から出ます
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー-
んー、なんか へったし、できてたからコピー
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src $ cd build/
~/download/cmigemo-default-src/build $ cp cygmigemo1.dll /usr/bin/
~/download/cmigemo-default-src/build $ cp cmigemo.exe /usr/bin/
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
えっと、辞書をつくるです。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src/build $ cd ..
~/download/cmigemo-default-src $ make cyg-dict
/usr/bin/make -f compile/Make_cyg.mak dictionary
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' に入ります
cd dict && /usr/bin/make cyg
make[2]: ディレクトリ `/home/user/download/cmigemo-default-src/dict' に入ります
curl -O http://openlab.ring.gr.jp/skk/dic/SKK-JISYO.L.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:21 --:--:-- 0curl: (7) couldn't connect to host
dict.mak:24: recipe for target `SKK-JISYO.L' failed
make[2]: *** [SKK-JISYO.L] Error 7
make[2]: ディレクトリ `/home/user/download/cmigemo-default-src/dict' から出ます
compile/Make_cyg.mak:41: recipe for target `dictionary' failed
make[1]: *** [dictionary] Error 2
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' から出ます
Makefile:35: recipe for target `cyg-dict' failed
make: *** [cyg-dict] Error 2
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
えー、もーやだ。あ、でも、curl とか、もしかして
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src $ export http_proxy="http://XXX.XXX.XXX.XXX:YY"
~/download/cmigemo-default-src $ make cyg-dict
/usr/bin/make -f compile/Make_cyg.mak dictionary
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' に入ります
cd dict && /usr/bin/make cyg
make[2]: ディレクトリ `/home/user/download/cmigemo-default-src/dict' に入ります
curl -O http://openlab.ring.gr.jp/skk/dic/SKK-JISYO.L.gz
gzip -d SKK-JISYO.L.gz
perl ../tools/skk2migemo.pl < SKK-JISYO.L > dict.tmp
perl ../tools/optimize-dict.pl < dict.tmp > base-dict
rm -f dict.tmp
qkc -q -u -s < base-dict > migemo-dict
mkdir -p euc-jp.d
qkc -q -u -e < migemo-dict > euc-jp.d/migemo-dict
qkc -q -u -e < zen2han.dat > euc-jp.d/zen2han.dat
qkc -q -u -e < han2zen.dat > euc-jp.d/han2zen.dat
qkc -q -u -e < hira2kata.dat > euc-jp.d/hira2kata.dat
qkc -q -u -e < roma2hira.dat > euc-jp.d/roma2hira.dat
make[2]: ディレクトリ `/home/user/download/cmigemo-default-src/dict' から出ます
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' から出ます
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
きたわー。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src $ cd dict/
~/download/cmigemo-default-src/dict $ make utf-8
mkdir -p utf-8.d
iconv -t utf-8 -f cp932 < migemo-dict > utf-8.d/migemo-dict
iconv -t utf-8 -f cp932 < zen2han.dat > utf-8.d/zen2han.dat
iconv -t utf-8 -f cp932 < han2zen.dat > utf-8.d/han2zen.dat
iconv -t utf-8 -f cp932 < hira2kata.dat > utf-8.d/hira2kata.dat
iconv -t utf-8 -f cp932 < roma2hira.dat > utf-8.d/roma2hira.dat
~/download/cmigemo-default-src/dict $ cd ../
~/download/cmigemo-default-src $ make cyg-install
/usr/bin/make -f compile/Make_cyg.mak
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' に入ります
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' から出ます
/usr/bin/make -f compile/Make_cyg.mak dictionary
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' に入ります
cd dict && /usr/bin/make cyg
make[2]: ディレクトリ `/home/user/download/cmigemo-default-src/dict' に入ります
make[2]: `cyg' に対して行うべき事はありません.
make[2]: ディレクトリ `/home/user/download/cmigemo-default-src/dict' から出ます
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' から出ます
/usr/bin/make -f compile/Make_cyg.mak install
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' に入ります
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
mkdir -p /usr/local/include
mkdir -p /usr/local/doc/migemo
mkdir -p /usr/local/share/migemo
mkdir -p /usr/local/share/migemo/cp932
mkdir -p /usr/local/share/migemo/euc-jp
mkdir -p /usr/local/share/migemo/utf-8
/usr/bin/install -c -m 644 dict/migemo-dict /usr/local/share/migemo/cp932
/usr/bin/install -c -m 644 dict/han2zen.dat /usr/local/share/migemo/cp932
/usr/bin/install -c -m 644 dict/hira2kata.dat /usr/local/share/migemo/cp932
/usr/bin/install -c -m 644 dict/roma2hira.dat /usr/local/share/migemo/cp932
/usr/bin/install -c -m 644 dict/zen2han.dat /usr/local/share/migemo/cp932
if [ -d dict/euc-jp.d ]; then \
/usr/bin/install -c -m 644 dict/euc-jp.d/migemo-dict /usr/local/share/migemo/euc-jp; \
/usr/bin/install -c -m 644 dict/euc-jp.d/han2zen.dat /usr/local/share/migemo/euc-jp; \
/usr/bin/install -c -m 644 dict/euc-jp.d/hira2kata.dat /usr/local/share/migemo/euc-jp; \
/usr/bin/install -c -m 644 dict/euc-jp.d/roma2hira.dat /usr/local/share/migemo/euc-jp; \
/usr/bin/install -c -m 644 dict/euc-jp.d/zen2han.dat /usr/local/share/migemo/euc-jp; \
fi
if [ -d dict/utf-8.d ]; then \
/usr/bin/install -c -m 644 dict/utf-8.d/migemo-dict /usr/local/share/migemo/utf-8; \
/usr/bin/install -c -m 644 dict/utf-8.d/han2zen.dat /usr/local/share/migemo/utf-8; \
/usr/bin/install -c -m 644 dict/utf-8.d/hira2kata.dat /usr/local/share/migemo/utf-8; \
/usr/bin/install -c -m 644 dict/utf-8.d/roma2hira.dat /usr/local/share/migemo/utf-8; \
/usr/bin/install -c -m 644 dict/utf-8.d/zen2han.dat /usr/local/share/migemo/utf-8; \
fi
/usr/bin/install -c -m 644 ./build/libmigemo.dll.a /usr/local/lib
/usr/bin/install -c -m 755 ./build/cygmigemo1.dll /usr/local/bin
/usr/bin/install -c -m 644 ./src/migemo.h /usr/local/include
/usr/bin/install -c -m 644 doc/README_j.txt /usr/local/doc/migemo
/usr/bin/install -c -m 755 ./build/cmigemo.exe /usr/local/bin
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' から出ます
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
おうおう。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src $ cd ..
~/download $ wget http://0xcc.net/migemo/migemo-0.40.tar.gz
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
ここまではいい感じだが
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download $ gzip -dc migemo-0.40.tar.gz | tar xvf -
migemo-0.40/
migemo-0.40/Makefile.in
migemo-0.40/README
migemo-0.40/AUTHORS
migemo-0.40/COPYING
migemo-0.40/ChangeLog
migemo-0.40/INSTALL
migemo-0.40/Makefile.am
migemo-0.40/NEWS
migemo-0.40/acinclude.m4
migemo-0.40/aclocal.m4
migemo-0.40/configure
migemo-0.40/configure.in
migemo-0.40/elisp-comp
migemo-0.40/install-sh
migemo-0.40/migemo.rb.in
migemo-0.40/missing
migemo-0.40/mkinstalldirs
migemo-0.40/migemo
migemo-0.40/migemo-grep
migemo-0.40/migemo-server
migemo-0.40/migemo-client
migemo-0.40/migemo-dict.rb
migemo-0.40/migemo-regex.rb
migemo-0.40/migemo-convert.rb
migemo-0.40/migemo-index.rb
migemo-0.40/migemo-cache.rb
migemo-0.40/migemo.el.in
migemo-0.40/genchars.sh
migemo-0.40/ngram.sh
migemo-0.40/frequent-chars
migemo-0.40/migemo-dict
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
とここでフリーズ。もーいやでしょ。だが、
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download $ tar zxvf migemo-0.40.tar.gz
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
で、きたー。正常展開。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download $ mkdir -p ~/.emacs.d/cmigemo
~/download $ mv migemo-0.40/migemo.el.in ~/.emacs.d/cmigemo/migemo.el
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
C-x C-f
~/.emacs.d/init.el
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
;; ------------------------------------------------------------------------
;; @ cmigemo
;; ロードパスの追加
(add-to-list 'load-path
"~/.emacs.d/cmigemo")
(setq migemo-command "cmigemo")
(setq migemo-options '("-q" "--emacs" "-i" "\a"))
(setq migemo-dictionary "/usr/local/share/migemo/utf-8/migemo-dict")
(setq migemo-user-dictionary nil)
(setq migemo-regex-dictionary nil)
(setq migemo-coding-system 'utf-8-unix)
(load-library "migemo")
(migemo-init)
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
として、今は正常に動作したけど、なぜか最初うごかなかった。再起動かな?
そして、なんでうごいたのかわからん
M-x eshell
---------------------------------------------------------------------------------
~ $ mkdir download
~ $ cd download/
~/download $ wget http://hp.vector.co.jp/authors/VA000501/qkcc100.zip
~/download $ unzip qkcc100.zip
~/download $ make
~/download $ cp -p qkc.exe /usr/local/bin/
~/download $ rm -rf *
~/download $ wget http://cmigemo.googlecode.com/files/cmigemo-default-src-20110227.zip
~/download $ unzip cmigemo-default-src-20110227.zip
~/download $ cd cmigemo-default-src/
---------------------------------------------------------------------------------
ここまではいい感じ
---------------------------------------------------------------------------------------
~/download/cmigemo-default-src $ ./configure
./configure: Permission denied
---------------------------------------------------------------------------------------
なんでやねん!
ーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src $ chmod 755 *
~/download/cmigemo-default-src $ ./configure
ーーーーーーーーーーーーーーーーーーーーーーーーーーー
ふむふむ
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src $ make cyg
/usr/bin/make -f compile/Make_cyg.mak
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' に入ります
cc -O2 -Wall -o build/object/main.o -c src/main.c
src/main.c: In function ‘query_loop’:
src/main.c:34:2: 警告: pointer targets in passing argument 1 of ‘fgets’ differ in signedness
/usr/include/stdio.h:195:9: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/main.c:41:2: 警告: pointer targets in passing argument 1 of ‘strchr’ differ in signedness
/usr/include/string.h:29:8: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
src/main.c:41:11: 警告: pointer targets in assignment differ in signedness
src/main.c: In function ‘main’:
src/main.c:169:6: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:170:6: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:171:6: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:173:3: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:177:6: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:178:6: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:179:6: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:181:3: 警告: pointer targets in passing argument 3 of ‘migemo_set_operator’ differ in signedness
src/migemo.h:56:21: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/main.c:188:6: 警告: pointer targets in passing argument 2 of ‘migemo_query’ differ in signedness
src/migemo.h:51:32: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
cc -O2 -Wall -o build/object/charset.o -c src/charset.c
cc -O2 -Wall -o build/object/filename.o -c src/filename.c
cc -O2 -Wall -o build/object/migemo.o -c src/migemo.c
src/migemo.c: In function ‘migemo_load’:
src/migemo.c:178:2: 警告: pointer targets in passing argument 2 of ‘romaji_load’ differ in signedness
src/romaji.h:24:5: note: expected ‘const unsigned char *’ but argument is of type ‘const char *’
src/migemo.c: In function ‘migemo_open’:
src/migemo.c:255:6: 警告: pointer targets in passing argument 2 of ‘romaji_load’ differ in signedness
src/romaji.h:24:5: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/migemo.c:256:6: 警告: pointer targets in passing argument 2 of ‘romaji_load’ differ in signedness
src/romaji.h:24:5: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/migemo.c:257:6: 警告: pointer targets in passing argument 2 of ‘romaji_load’ differ in signedness
src/romaji.h:24:5: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/migemo.c:258:6: 警告: pointer targets in passing argument 2 of ‘romaji_load’ differ in signedness
src/romaji.h:24:5: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
src/migemo.c: In function ‘add_dubious_roma’:
src/migemo.c:376:5: 警告: pointer targets in passing argument 1 of ‘my_strlen’ differ in signedness
src/migemo.c:56:1: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
src/migemo.c:389:5: 警告: pointer targets in passing argument 1 of ‘strchr’ differ in signedness
/usr/include/string.h:29:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/migemo.c:391:2: 警告: pointer targets in passing argument 2 of ‘add_dubious_vowels’ differ in signedness
src/migemo.c:355:1: note: expected ‘unsigned char *’ but argument is of type ‘char *’
src/migemo.c:393:2: 警告: pointer targets in passing argument 1 of ‘strchr’ differ in signedness
/usr/include/string.h:29:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/migemo.c:399:3: 警告: pointer targets in passing argument 2 of ‘add_roma’ differ in signedness
src/migemo.c:322:1: note: expected ‘unsigned char *’ but argument is of type ‘char *’
src/migemo.c:406:3: 警告: pointer targets in passing argument 2 of ‘add_dubious_vowels’ differ in signedness
src/migemo.c:355:1: note: expected ‘unsigned char *’ but argument is of type ‘char *’
src/migemo.c: In function ‘query_a_word’:
src/migemo.c:466:5: 警告: pointer targets in passing argument 1 of ‘my_strlen’ differ in signedness
src/migemo.c:56:1: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
cc -O2 -Wall -o build/object/mnode.o -c src/mnode.c
cc -O2 -Wall -o build/object/romaji.o -c src/romaji.c
src/romaji.c: In function ‘strdup_lower’:
src/romaji.c:208:5: 警告: pointer targets in passing argument 1 of ‘strdup’ differ in signedness
/usr/include/string.h:67:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:208:26: 警告: pointer targets in initialization differ in signedness
src/romaji.c: In function ‘romaji_add_table’:
src/romaji.c:245:5: 警告: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
/usr/include/string.h:35:9: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:255:5: 警告: pointer targets in passing argument 1 of ‘strdup’ differ in signedness
/usr/include/string.h:67:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:255:24: 警告: pointer targets in assignment differ in signedness
src/romaji.c:259:6: 警告: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness
/usr/include/string.h:30:6: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:262:2: 警告: pointer targets in passing argument 1 of ‘strdup’ differ in signedness
/usr/include/string.h:67:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:262:22: 警告: pointer targets in assignment differ in signedness
src/romaji.c:265:6: 警告: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness
/usr/include/string.h:30:6: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:268:2: 警告: pointer targets in passing argument 1 of ‘strdup’ differ in signedness
/usr/include/string.h:67:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:268:23: 警告: pointer targets in assignment differ in signedness
src/romaji.c: In function ‘romaji_load’:
src/romaji.c:376:5: 警告: pointer targets in passing argument 1 of ‘charset_detect_file’ differ in signedness
src/charset.h:35:5: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c:379:5: 警告: pointer targets in passing argument 1 of ‘fopen’ differ in signedness
/usr/include/stdio.h:225:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/romaji.c: In function ‘romaji_convert2’:
src/romaji.c:454:2: 警告: pointer targets in passing argument 1 of ‘strdup’ differ in signedness
/usr/include/string.h:67:8: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
src/romaji.c:454:9: 警告: pointer targets in assignment differ in signedness
cc -O2 -Wall -o build/object/rxgen.o -c src/rxgen.c
src/rxgen.c: In function ‘rxgen_open’:
src/rxgen.c:156:2: 警告: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/rxgen.c:157:2: 警告: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/rxgen.c:158:2: 警告: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/rxgen.c:159:2: 警告: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/rxgen.c:160:2: 警告: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/rxgen.c:161:2: 警告: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/rxgen.c: In function ‘rxgen_generate’:
src/rxgen.c:322:2: 警告: pointer targets in passing argument 1 of ‘strdup’ differ in signedness
/usr/include/string.h:67:8: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
src/rxgen.c:322:9: 警告: pointer targets in assignment differ in signedness
src/rxgen.c: In function ‘rxgen_set_operator’:
src/rxgen.c:383:5: 警告: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
/usr/include/string.h:35:9: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/rxgen.c:387:5: 警告: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘char *’ but argument is of type ‘unsigned char *’
src/rxgen.c:387:5: 警告: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness
/usr/include/string.h:32:8: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
cc -O2 -Wall -o build/object/wordbuf.o -c src/wordbuf.c
src/wordbuf.c: In function ‘wordbuf_cat’:
src/wordbuf.c:117:9: 警告: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
/usr/include/string.h:35:9: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
src/wordbuf.c:118:19: error: ‘INT_MAX’ undeclared (first use in this function)
src/wordbuf.c:118:19: note: each undeclared identifier is reported only once for each function it appears in
compile/unix.mak:33: recipe for target `build/object/wordbuf.o' failed
make[1]: *** [build/object/wordbuf.o] Error 1
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' から出ます
Makefile:33: recipe for target `cyg-rel' failed
make: *** [cyg-rel] Error 2
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
えー、なにこれ、なんか一杯でたよ
C-x C-f /cmigemo-default-src/src/wordbuf.c
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
*** /home/user/download/cmigemo-default-src/src/wordbuf.c.orig date.old
--- /home/user/download/cmigemo-default-src/src/wordbuf.c date
***************
*** 9,14 ****
--- 9,15 ----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+ #include <limits.h>
#include "wordbuf.h"
#define WORDLEN_DEF 64
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
M-x eshell
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src $ make cyg
/usr/bin/make -f compile/Make_cyg.mak
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' に入ります
cc -O2 -Wall -o build/object/wordbuf.o -c src/wordbuf.c
src/wordbuf.c: In function ‘wordbuf_cat’:
src/wordbuf.c:118:9: 警告: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
/usr/include/string.h:35:9: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
cc -O2 -Wall -o build/object/wordlist.o -c src/wordlist.c
src/wordlist.c: In function ‘wordlist_open_len’:
src/wordlist.c:27:14: 警告: pointer targets in assignment differ in signedness
src/wordlist.c: In function ‘wordlist_open’:
src/wordlist.c:51:9: 警告: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
/usr/include/string.h:35:9: note: expected ‘const char *’ but argument is of type ‘const unsigned char *’
dllwrap -o ./build/cygmigemo1.dll --dllname cygmigemo1.dll --implib ./build/libmigemo.dll.a --def ./src/migemo.def ./build/object/charset.o ./build/object/filename.o ./build/object/migemo.o ./build/object/mnode.o ./build/object/romaji.o ./build/object/rxgen.o ./build/object/wordbuf.o ./build/object/wordlist.o
cc -o build/cmigemo.exe ./build/object/main.o -L. -L./build/ -lmigemo
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' から出ます
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー-
んー、なんか へったし、できてたからコピー
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src $ cd build/
~/download/cmigemo-default-src/build $ cp cygmigemo1.dll /usr/bin/
~/download/cmigemo-default-src/build $ cp cmigemo.exe /usr/bin/
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
えっと、辞書をつくるです。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src/build $ cd ..
~/download/cmigemo-default-src $ make cyg-dict
/usr/bin/make -f compile/Make_cyg.mak dictionary
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' に入ります
cd dict && /usr/bin/make cyg
make[2]: ディレクトリ `/home/user/download/cmigemo-default-src/dict' に入ります
curl -O http://openlab.ring.gr.jp/skk/dic/SKK-JISYO.L.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:21 --:--:-- 0curl: (7) couldn't connect to host
dict.mak:24: recipe for target `SKK-JISYO.L' failed
make[2]: *** [SKK-JISYO.L] Error 7
make[2]: ディレクトリ `/home/user/download/cmigemo-default-src/dict' から出ます
compile/Make_cyg.mak:41: recipe for target `dictionary' failed
make[1]: *** [dictionary] Error 2
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' から出ます
Makefile:35: recipe for target `cyg-dict' failed
make: *** [cyg-dict] Error 2
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
えー、もーやだ。あ、でも、curl とか、もしかして
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src $ export http_proxy="http://XXX.XXX.XXX.XXX:YY"
~/download/cmigemo-default-src $ make cyg-dict
/usr/bin/make -f compile/Make_cyg.mak dictionary
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' に入ります
cd dict && /usr/bin/make cyg
make[2]: ディレクトリ `/home/user/download/cmigemo-default-src/dict' に入ります
curl -O http://openlab.ring.gr.jp/skk/dic/SKK-JISYO.L.gz
gzip -d SKK-JISYO.L.gz
perl ../tools/skk2migemo.pl < SKK-JISYO.L > dict.tmp
perl ../tools/optimize-dict.pl < dict.tmp > base-dict
rm -f dict.tmp
qkc -q -u -s < base-dict > migemo-dict
mkdir -p euc-jp.d
qkc -q -u -e < migemo-dict > euc-jp.d/migemo-dict
qkc -q -u -e < zen2han.dat > euc-jp.d/zen2han.dat
qkc -q -u -e < han2zen.dat > euc-jp.d/han2zen.dat
qkc -q -u -e < hira2kata.dat > euc-jp.d/hira2kata.dat
qkc -q -u -e < roma2hira.dat > euc-jp.d/roma2hira.dat
make[2]: ディレクトリ `/home/user/download/cmigemo-default-src/dict' から出ます
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' から出ます
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
きたわー。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src $ cd dict/
~/download/cmigemo-default-src/dict $ make utf-8
mkdir -p utf-8.d
iconv -t utf-8 -f cp932 < migemo-dict > utf-8.d/migemo-dict
iconv -t utf-8 -f cp932 < zen2han.dat > utf-8.d/zen2han.dat
iconv -t utf-8 -f cp932 < han2zen.dat > utf-8.d/han2zen.dat
iconv -t utf-8 -f cp932 < hira2kata.dat > utf-8.d/hira2kata.dat
iconv -t utf-8 -f cp932 < roma2hira.dat > utf-8.d/roma2hira.dat
~/download/cmigemo-default-src/dict $ cd ../
~/download/cmigemo-default-src $ make cyg-install
/usr/bin/make -f compile/Make_cyg.mak
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' に入ります
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' から出ます
/usr/bin/make -f compile/Make_cyg.mak dictionary
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' に入ります
cd dict && /usr/bin/make cyg
make[2]: ディレクトリ `/home/user/download/cmigemo-default-src/dict' に入ります
make[2]: `cyg' に対して行うべき事はありません.
make[2]: ディレクトリ `/home/user/download/cmigemo-default-src/dict' から出ます
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' から出ます
/usr/bin/make -f compile/Make_cyg.mak install
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' に入ります
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
mkdir -p /usr/local/include
mkdir -p /usr/local/doc/migemo
mkdir -p /usr/local/share/migemo
mkdir -p /usr/local/share/migemo/cp932
mkdir -p /usr/local/share/migemo/euc-jp
mkdir -p /usr/local/share/migemo/utf-8
/usr/bin/install -c -m 644 dict/migemo-dict /usr/local/share/migemo/cp932
/usr/bin/install -c -m 644 dict/han2zen.dat /usr/local/share/migemo/cp932
/usr/bin/install -c -m 644 dict/hira2kata.dat /usr/local/share/migemo/cp932
/usr/bin/install -c -m 644 dict/roma2hira.dat /usr/local/share/migemo/cp932
/usr/bin/install -c -m 644 dict/zen2han.dat /usr/local/share/migemo/cp932
if [ -d dict/euc-jp.d ]; then \
/usr/bin/install -c -m 644 dict/euc-jp.d/migemo-dict /usr/local/share/migemo/euc-jp; \
/usr/bin/install -c -m 644 dict/euc-jp.d/han2zen.dat /usr/local/share/migemo/euc-jp; \
/usr/bin/install -c -m 644 dict/euc-jp.d/hira2kata.dat /usr/local/share/migemo/euc-jp; \
/usr/bin/install -c -m 644 dict/euc-jp.d/roma2hira.dat /usr/local/share/migemo/euc-jp; \
/usr/bin/install -c -m 644 dict/euc-jp.d/zen2han.dat /usr/local/share/migemo/euc-jp; \
fi
if [ -d dict/utf-8.d ]; then \
/usr/bin/install -c -m 644 dict/utf-8.d/migemo-dict /usr/local/share/migemo/utf-8; \
/usr/bin/install -c -m 644 dict/utf-8.d/han2zen.dat /usr/local/share/migemo/utf-8; \
/usr/bin/install -c -m 644 dict/utf-8.d/hira2kata.dat /usr/local/share/migemo/utf-8; \
/usr/bin/install -c -m 644 dict/utf-8.d/roma2hira.dat /usr/local/share/migemo/utf-8; \
/usr/bin/install -c -m 644 dict/utf-8.d/zen2han.dat /usr/local/share/migemo/utf-8; \
fi
/usr/bin/install -c -m 644 ./build/libmigemo.dll.a /usr/local/lib
/usr/bin/install -c -m 755 ./build/cygmigemo1.dll /usr/local/bin
/usr/bin/install -c -m 644 ./src/migemo.h /usr/local/include
/usr/bin/install -c -m 644 doc/README_j.txt /usr/local/doc/migemo
/usr/bin/install -c -m 755 ./build/cmigemo.exe /usr/local/bin
make[1]: ディレクトリ `/home/user/download/cmigemo-default-src' から出ます
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
おうおう。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download/cmigemo-default-src $ cd ..
~/download $ wget http://0xcc.net/migemo/migemo-0.40.tar.gz
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
ここまではいい感じだが
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download $ gzip -dc migemo-0.40.tar.gz | tar xvf -
migemo-0.40/
migemo-0.40/Makefile.in
migemo-0.40/README
migemo-0.40/AUTHORS
migemo-0.40/COPYING
migemo-0.40/ChangeLog
migemo-0.40/INSTALL
migemo-0.40/Makefile.am
migemo-0.40/NEWS
migemo-0.40/acinclude.m4
migemo-0.40/aclocal.m4
migemo-0.40/configure
migemo-0.40/configure.in
migemo-0.40/elisp-comp
migemo-0.40/install-sh
migemo-0.40/migemo.rb.in
migemo-0.40/missing
migemo-0.40/mkinstalldirs
migemo-0.40/migemo
migemo-0.40/migemo-grep
migemo-0.40/migemo-server
migemo-0.40/migemo-client
migemo-0.40/migemo-dict.rb
migemo-0.40/migemo-regex.rb
migemo-0.40/migemo-convert.rb
migemo-0.40/migemo-index.rb
migemo-0.40/migemo-cache.rb
migemo-0.40/migemo.el.in
migemo-0.40/genchars.sh
migemo-0.40/ngram.sh
migemo-0.40/frequent-chars
migemo-0.40/migemo-dict
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
とここでフリーズ。もーいやでしょ。だが、
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download $ tar zxvf migemo-0.40.tar.gz
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
で、きたー。正常展開。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
~/download $ mkdir -p ~/.emacs.d/cmigemo
~/download $ mv migemo-0.40/migemo.el.in ~/.emacs.d/cmigemo/migemo.el
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
C-x C-f
~/.emacs.d/init.el
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
;; ------------------------------------------------------------------------
;; @ cmigemo
;; ロードパスの追加
(add-to-list 'load-path
"~/.emacs.d/cmigemo")
(setq migemo-command "cmigemo")
(setq migemo-options '("-q" "--emacs" "-i" "\a"))
(setq migemo-dictionary "/usr/local/share/migemo/utf-8/migemo-dict")
(setq migemo-user-dictionary nil)
(setq migemo-regex-dictionary nil)
(setq migemo-coding-system 'utf-8-unix)
(load-library "migemo")
(migemo-init)
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
として、今は正常に動作したけど、なぜか最初うごかなかった。再起動かな?
Symbol's value as variable is void: Info-directory-list
M-x eshell
--------------------------------------------------------------------------
Welcome to the Emacs shell
$ cd ~
~ $ wget http://www.rubyist.net/~rubikitch/archive/emacs-elisp-info-ja.tgz
~ $ tar xzvf emacs-elisp-info-ja.tgz
--------------------------------------------------------------------------
C-x C-f /usr/share/info/dir
--------------------------------------------------------------------------
*** /usr/share/info/dir.orig date.old
--- /usr/share/info/dir date.new
***************
*** 213,215 ****
--- 213,219 ----
GNU Emacs Lisp
* SKK: (skk). Simple Kana to Kanji conversion program.
+
+ * Elisp-ja: (elisp-ja). Emacs Lisp Reference Manual(Japanease)
+ * Emacs-ja: (emacs-ja). The extensible self-documenting text editor(Japanease)
+
--------------------------------------------------------------------------
C-x C-f ~/.emacs.d/init.el
(add-to-list 'Info-directory-list "~/info")
としたら
--------------------------------------------------------------------------
Warning (initialization): An error occurred while loading `/home/user/.emacs.d/init.el':
Symbol's value as variable is void: Info-directory-list
--------------------------------------------------------------------------
といわれ
(require 'info)
(add-to-list 'Info-directory-list "~/info")
としたら、
---------------------------------------------------
Info-insert-dir: Can't find the Info directory node
---------------------------------------------------
といわれる。以下にしたら正常に動作したけど、よくわからない。
;; ------------------------------------------------------------------------
;; @ 日本語 info をいれる
(require 'info)
(add-to-list 'Info-additional-directory-list "/usr/share/info")
(add-to-list 'Info-directory-list "~/info")
2012年3月29日
Loaded to different address
emacs 23.4 with cygwin 1.7.11 on Win7 x64 で ediff が取れない。
ediff をとっておこうと思ったら、以下のエラー発生
-----------------------------------------------------------------------
0 [main] xemacs-21.4.22 7744 child_info_fork::abort:
cygcrypto-1.0.0.dll: Loaded to different address: parent(0x 6A0000) !=
child(0x850000)
-----------------------------------------------------------------------
eshell でもエラー
-------------------------------------------
$ diff
Doing fork: Resource temporarily unavailable
-------------------------------------------
1. cygwin関連のプログラムをすべて終了する
2. C:\cygwin\bin\ash.exe を右クリックメニューから 管理者権限で起動する
3. /bin/rebaseall を実行する。(数分かかり、おわると $ に戻る)
4. ashを終了(exitコマンド)して、cygwin の setup.exeを実行する
5. Packages で [All]>[Libs]>[libncurses7:libraries for terminal handling (runtime)] を reinstall する
6. ediff などでエラーが出ないことを確認する
2011年12月21日
gnupack 7.02 (cygiwin) on Windows7 64bit
-*- mode: org; coding: cp932-dos -*-
* はじめに
gnupack 7.02 が出たので、Windows 7 64bit に入れる
* システムの概要
Microsoft Windows 7 Professional
6.1.7601 Service Pack 1 ビルド 7601
Intel(R) Xeon(R) CPU W3530 @ 2.80GHz
合計物理メモリ 6.00 GB
* インストール手順および設定
gnupack 本体、bashの設定、emacs の設定をする。vim の設定はしない。使わないから。
** gnupack
まずは本体のインストール
*** install
1. gnupack gnupack_devel-7.02.exe を以下からダウンロードする
http://sourceforge.jp/projects/gnupack/releases/?package_id=10360
2. [gnupack_devel-7.02.exe] を実行
3. [解凍先] を [C:\gnupack\] にして、 右クリックメニュー[管理者として実行] をクリック
4. c:\gnupack を右クリックし、[セキュリティ]>[編集]を選択
5. 使用したいユーザーを登録し、フルコントロール権限を与える
これをやらないと、以下の異常終了が発生する
-------------------------------------------------------------
ログの名前: Application
ソース: Application Error
日付: 2011/12/20 14:12:00
イベント ID: 1000
タスクのカテゴリ: (100)
レベル: エラー
キーワード: クラシック
ユーザー: N/A
コンピューター: hostname
説明:
障害が発生しているアプリケーション名: emacs.exe、バージョン: 1.2.3.4、タイム スタンプ: 0x4e7bfce7
障害が発生しているモジュール名: ntdll.dll、バージョン: 6.1.7601.17514、タイム スタンプ: 0x4ce7ba58
例外コード: 0xc0000374
障害オフセット: 0x000ce653
障害が発生しているプロセス ID: 0x16c0
障害が発生しているアプリケーションの開始時刻: 0x01ccbed5e61db755
障害が発生しているアプリケーション パス: C:\gnupack\gnupack_devel-7.02\emacs.exe
障害が発生しているモジュール パス: C:\Windows\SysWOW64\ntdll.dll
レポート ID: 24dc0055-2ac9-11e1-aa7d-d067e5ea3430
イベント XML:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2011-12-20T05:12:00.000000000Z" />
<EventRecordID>3373</EventRecordID>
<Channel>Application</Channel>
<Computer><hostname></Computer>
<Security />
</System>
<EventData>
<Data>emacs.exe</Data>
<Data>1.2.3.4</Data>
<Data>4e7bfce7</Data>
<Data>ntdll.dll</Data>
<Data>6.1.7601.17514</Data>
<Data>4ce7ba58</Data>
<Data>c0000374</Data>
<Data>000ce653</Data>
<Data>16c0</Data>
<Data>01ccbed5e61db755</Data>
<Data>C:\gnupack\gnupack_devel-7.02\emacs.exe</Data>
<Data>C:\Windows\SysWOW64\ntdll.dll</Data>
<Data>24dc0055-2ac9-11e1-aa7d-d067e5ea3430</Data>
</EventData>
</Event>
-------------------------------------------------------------
6. 以下の exe を起動して、それぞれ起動確認
C:\gnupack\gnupack_devel-7.02\bash.exe
C:\gnupack\gnupack_devel-7.02\emacs.exe
C:\gnupack\gnupack_devel-7.02\gvim.exe
** config.ini の 設定
1. C-x C-f で、 c:\gnupack\gnupack_devel-7.02\config.ini を開く
2. 以下のように修正
*** c:/gnupack/gnupack_devel-7.02/config.ini.orig 2011-12-20 14:28:02.176440500 +0900
--- c:/gnupack/gnupack_devel-7.02/config.ini 2011-12-20 14:34:51.346840500 +0900
***************
*** 32,37 ****
--- 32,46 ----
;http_proxy = http://proxy.example.co.jp:8080
;ftp_proxy< = ftp://proxy.example.co.jp:8080
+ http_proxy = http://<user>:<pass>@<address>:<port>
+ PATH = %EMACS_DIR%\bin;%INST_DIR%\app\vim;%INST_DIR%\app\script
+ PATH = %PATH%;%INST_DIR%\app\mingw\tdm\bin;%_local_%\bin;%CYGWIN_DIR%\bin
+ PATH = %PATH%;%windir%\system32;%windir%;%windir%\system32\Wbem
+ PATH = %PATH%;C:\Program Files\ANSYS Inc\v130\ansys\bin\intel
+ PATH = %PATH%;C:\usr\local\share\InnoSetup5
+ PATH = %PATH%;C:\w32tex\bin;C:\gs\gs7.07\bin;C:\gs\gs7.07\lib
+ PATH = %PATH%;%INST_DIR%\launcher
+
[UnSetEnv]
_font_ =
_local_ =
***************
*** 59,74 ****
windowSize = 91,27
position = 70,27
fontName = %_font_%
! fontSize = 12
title = bash
icon = %INST_DIR%\app\icon\mintty.ico
[Emacs]
! ;foreground = white
! ;background = black
! geometry = 91x31+70+28
fontName = %_font_%
! fontSize = 12
; see also http://gnupack.sourceforge.jp/docs/latest/UsersGuide_technical_info.html#_color_theme
colorTheme = simple-1
--- 68,83 ----
windowSize = 91,27
position = 70,27
fontName = %_font_%
! fontSize = 14
title = bash
icon = %INST_DIR%\app\icon\mintty.ico
[Emacs]
! foreground = white
! background = black
! geometry = 120x50+70+10
fontName = %_font_%
! fontSize = 14
; see also http://gnupack.sourceforge.jp/docs/latest/UsersGuide_technical_info.html#_color_theme
colorTheme = simple-1
** mintty (bash)
bash で install したもの
*** w3m
apt-cyg install w3m
*** ruby
apt-cyg install ruby subversion-ruby
ruby -v
*** emacs-w3m
**** ファイルの入手について
CVS は HTTP Port でないため、 Proxy CVS 用に Proxy の設定をしなけれ
ばならないが、よく分からない。
HTTP Proxy だけ与えられているので、トンネルする方法もあるようだが、
そんなことはできるだけやりたくない。
しかたないので、 proxy が不要な環境で、 emacs-w3m のファイルをとって
くる。 bash での手順は以下のとおり。
apt-cyg install cvs autoconf
wget http://emacs-w3m.namazu.org/emacs-w3m-1.4.4.tar.gz
cvs -d :pserver:anonymous@cvs.namazu.org:/storage/cvsroot login
CVS password: [RET]
cvs -d :pserver:anonymous@cvs.namazu.org:/storage/cvsroot co emacs-w3m
tar zxf emacs-w3m-1.4.4.tar.gz
cp -r emacs-w3m-1.4.4 emacs-w3m-cvs
\cp -f emacs-w3m/* emacs-w3m-cvs
上記できた emacs-w3m-cvs フォルダの中身をとっておけば OK 。
**** インストール手順
apt-cyg install cvs autoconf
cd emacs-w3m-cvs
./configure --with-emacs=/app/emacs/emacs/bin/emacs --with-lispdir=/app/emacs/site-lisp/w3m --with-icondir=/app/emacs/emacs/etc/w3m
make
make install
*** aspell
apt-cyg install aspell aspell-en
*** git
apt-cyg install git
** NTemacs
*** 個人的な設定
;; ------------------------------------------------------------------------
;; @ 個人的な初期設定
;; デフォルトの文字コード指定
(set-default-coding-systems 'cp932-dos)
; 区切り文字に全角スペースや、・を含める
(setq paragraph-start '"^\\([ ・○<\t\n\f]\\|(?[0-9a-zA-Z]+)\\)")
;; startup directory
(setq default-directory "~/")
;; ファイルのカーソル内の位置を記憶
(setq-default save-place t)
;; ガベッジコレクション閾値 を 40MB に
;; (setq gc-cons-threshold 524288000)
;; ログの記録行数を増やす
(setq message-log-max 10000)
;; undo をいっぱい
(setq undo-limit 100000)
(setq undo-strong-limit 130000)
;; キーストロークの表示速度を上げる
(setq echo-keystrokes 0.1)
;; でかいファイルも普通に開く(デフォルトは10MB)
(setq large-file-warning-threshold (* 50 1024 1024)) ;50MB
;; いちいち yes とか無理だから y にする
(defalias 'yes-or-no-p 'y-or-n-p)
;; BS や Delete キーでリージョン内の文字を削除
(delete-selection-mode 1)
;; TAB を bacspace で消すとき、半角スペースとして消さないで、tabのまま消す
(global-set-key [backspace] 'backward-delete-char)
;; 前回編集していた場所を記憶し,ファイルを開いた時にそこへカーソルを移動
(require 'saveplace)
(setq-default save-place t)
;; 矩形選択とか便利な cua-mode
(cua-mode t)
(setq cua-enable-cua-keys nil) ;;C-xでkill-regionとかになって変な感じになるので。
;; @ クリップボード転送ができないことがある。
(cond (window-system (setq x-select-enable-clipboard t)))
;; kill-ring はテキスト属性(色情報など)を保存しなくていい
(defadvice kill-new (around my-kill-ring-disable-text-property activate)
(let ((new (ad-get-arg 0)))
(set-text-properties 0 (length new) nil new)
ad-do-it))
;; 初期画面をいきなりbuffer-menuにする
(buffer-menu)
; キー入力中にマウスポインタを右上隅へ移動
(mouse-avoidance-mode 'banish)
;; @ 括弧の対応表示
(setq blink-matching-paren t)
(show-paren-mode t)
(setq paren-sexp-mode t)
(set-face-background 'show-paren-match "royalBlue1")
;; 対応する括弧に移動のキーバインドを C-{ と C-} に変更 (C-M-f/p相当)
(global-set-key [?\C-{] 'backward-list)
(global-set-key [?\C-}] 'forward-list)
;; タブ, 全角スペースを色つき表示する (色名は M-x list-color-displayで調べる)
;; http://homepage1.nifty.com/blankspace/emacs/color.html
(defface my-face-b-1 '((t (:background "red4"))) nil) ;全角スペースの色
(defface my-face-b-2 '((t (:background "gray6"))) nil) ;タブの色
(defface my-face-u-1 '((t (:foreground "MediumPurple4" :underline t))) nil) ; 無駄な半角スペースの色
(defvar my-face-b-1 'my-face-b-1)
(defvar my-face-b-2 'my-face-b-2)
(defvar my-face-u-1 'my-face-u-1)
(defadvice font-lock-mode (before my-font-lock-mode ())
(font-lock-add-keywords
major-mode
'(("\t" 0 my-face-b-2 append)
(" " 0 my-face-b-1 append)
("[ \t]+$" 0 my-face-u-1 append)
)))
(ad-enable-advice 'font-lock-mode 'before 'my-font-lock-mode)
(ad-activate 'font-lock-mode)
;;; フレームサイズをトグルで切り替え
;; http://www.bookshelf.jp/soft/meadow_30.html#SEC416
;; 現在のフレームサイズを調べる方法
;; *scratch*バッファを開き,(frame-width), (frame-height) と書き,C-jする
(setq my-frame-max-flag nil)
(defun my-toggle-frame-size ()
(interactive)
(if my-frame-max-flag
(progn
(setq my-frame-max-flag nil)
(if (functionp 'w32-restore-frame)
(w32-restore-frame)
(set-frame-configuration my-last-frame-conf)
(message "not MAX.") (sit-for 2)
))
(setq my-frame-max-flag t)
(if (functionp 'w32-maximize-frame)
(w32-maximize-frame)
(setq my-last-frame-conf (current-frame-configuration))
(set-frame-position (selected-frame) 0 0)
;; フレーム最大化時に (frame-height) で得た値
(set-frame-height (selected-frame) 53) ; ここがうまく効かない
;; フレーム最大化時に (frame-width) で得た値
(set-frame-width (selected-frame) 173)
(message "to MAX.") (sit-for 2)
)))
(add-hook 'ediff-before-setup-hook 'my-toggle-frame-size) ; ediff 立ち上げ時に、画面を最大化
(add-hook 'ediff-quit-hook 'my-toggle-frame-size) ; ediff 終了時に、画面を元に戻す
(global-set-key [f11] 'my-toggle-frame-size) ; f11 に割り当て
;; @ 定型文の挿入 my-template-select
;; http://www.bookshelf.jp/soft/meadow_37.html#SEC554
(defvar my-template-text-file "~/.template")
(defvar my-template-buffer nil)
(defvar my-template-point nil)
(defun my-template-insert ()
(interactive)
(let (content)
(when (setq
content
(get-text-property (point) :content))
(save-excursion
(set-buffer my-template-buffer)
(save-excursion
(goto-char my-template-point)
(insert content))))))
(defun my-template-select ()
(interactive)
(let ((buffer
(get-buffer-create "*select template*"))
templates begin template-map text)
(setq my-template-buffer (current-buffer)
my-template-point (point))
(unless (file-readable-p my-template-text-file)
(error "Couldn't read template file: %s"))
(with-temp-buffer
(insert-file-contents my-template-text-file)
(goto-char (point-min))
(while (re-search-forward "^\\*\\(.*\\)$" nil t)
(when begin
(setq templates
(cons
(cons
(car templates)
(buffer-substring
begin (1- (match-beginning 0))))
(cdr templates))))
(setq templates (cons (match-string 1) templates))
(setq begin (1+ (match-end 0))))
(when begin
(setq templates
(cons
(cons
(car templates)
(buffer-substring begin (point-max)))
(cdr templates)))))
(pop-to-buffer buffer)
(setq buffer-read-only nil
major-mode 'template-select-mode
mode-name "Select Template"
template-map (make-keymap))
(suppress-keymap template-map)
(define-key template-map " " 'my-template-insert)
(define-key template-map "\C-m" 'my-template-insert)
(define-key template-map "n" 'next-line)
(define-key template-map "p" 'previous-line)
(define-key template-map "q" 'kill-buffer-and-window)
(use-local-map template-map)
(buffer-disable-undo)
(delete-region (point-min) (point-max))
(dolist (tt templates)
(setq text (concat (car tt) "\n"))
(put-text-property
0 (length text) :content (cdr tt) text)
(insert text)
(goto-char (point-min)))
(delete-region (1- (point-max)) (point-max))
(setq buffer-read-only t)
(set-buffer-modified-p nil)))
;; iserarchで日本語を使う
;; (defun w32-isearch-update ()
;; (interactive)
;; (isearch-update))
;; (define-key isearch-mode-map [compend] 'w32-isearch-update)
;; (define-key isearch-mode-map [kanji] 'isearch-toggle-input-method)
;; (add-hook 'isearch-mode-hook
;; (lambda () (setq w32-ime-composition-window (minibuffer-window))))
;; (add-hook 'isearch-mode-end-hook
;; (lambda () (setq w32-ime-composition-window nil)))
;;ispell が無いから、 aspell を使う
(setq-default ispell-program-name "aspell")
(eval-after-load "ispell"
'(add-to-list 'ispell-skip-region-alist '("[^\000-\377]+")))
*** auto-install.el
自動で el をダウンロード、インストールするやつ
**** download
M-x eshell
mkdir -p ~/.emacs.d/auto-install
cd ~/.emacs.d/auto-install
wget http://www.emacswiki.org/emacs/download/auto-install.el
M-x byte-compile-file
auto-install.el
**** init.el (.emacs,emacs.el)
;; ------------------------------------------------------------------------
;; @ auto-install.el
;; ロードパスの追加
(add-to-list 'load-path
"~\\.emacs.d\\auto-install")
(require 'auto-install)
(setq auto-install-directory "~\\.emacs.d\\auto-install")
;; 起動時に EmacsWiki のページ名を補完候補に加えない
(auto-install-update-emacswiki-package-name t)
;; install-elisp.el 互換モードにする
(auto-install-compatibility-setup)
;; ediff 関連のバッファを 1 つのフレームにまとめる
(setq ediff-window-setup-function 'ediff-setup-windows-plain)
(put 'downcase-region 'disabled nil)
*** recentf.el
最近使ったファイルリストを表示するやつ
**** download
M-x install-elisp-from-emacswiki
recentf-ext.el
C-c C-c
C-x k
[RET]
**** init.el (.emacs,emacs.el)
;; ------------------------------------------------------------------------
;; @ 最近使ったファイルを開く recentf-ext.el
;; 最近のファイルを 3000 個保存する
(setq recentf-max-saved-items 3000)
;; 読み込み
(require 'recentf-ext)
*** open-junk-file.el
使い捨てのファイルをサクサクつくる
**** download
M-x install-elisp-from-emacswiki
open-junk-file.el
C-c C-c
C-x k
[RET]
**** init.el (.emacs,emacs.el)
;; ------------------------------------------------------------------------
;; @ 使い捨てのファイルを開く open-junk-file.el
;; 読み込み
(require 'open-junk-file)
;; ファイル名およびファイル場所の指定
(setq open-junk-file-format "~/junk/%Y-%m-%d-%H%M%S.")
*** anything.el
便利なんだって。使い方、まだ、よくわかんない。
**** download
M-x auto-install-batch
anything
C-c C-c を連打
anything-matich-plugin.el でエラー
-------------------------------------------------------
Compiling file c:/gnupack/gnupack_devel-7.02/home/.emacs.d/auto-install/anything-config.el at Tue Dec 20 15:23:04 2011
anything-config.el:740:1:Error: Cannot open load file: anything-match-plugin
-------------------------------------------------------
だが、もう一度、C-c としたらつづいた。
さらに、anything-migemo.el で、*文字コードエラー*
---------------------------------------------------------------------
These default coding systems were tried to encode text
in the buffer `anything-migemo.el':
(undecided-unix (5157 . 35660) (5158 . 65381) (5159 . 35675) (5160
. 65388) (5161 . 38577) (5162 . 27115) (5163 . 4194181) (5164
. 65381) (5165 . 34569) (5166 . 4194203) (5219 . 35660)) (utf-8-unix
(5163 . 4194181) (5166 . 4194203) (5225 . 4194181) (5228 . 4194203)
(5281 . 4194181) (5284 . 4194203) (7386 . 4194206) (7529 . 4194206)
(7669 . 4194206) (8168 . 4194206) (8313 . 4194206))
However, each of them encountered characters it couldn't encode:
undecided-unix cannot encode these: 譌 ・ 譛 ャ 隱 槫 ・ 蜉 ...
utf-8-unix cannot encode these: ...
lick on a character (or switch to this window by `C-x o'
nd select the characters by RET) to jump to the place it appears,
here `C-u C-x =' will give information about it.
elect one of the safe coding systems listed below,
r cancel the writing with C-g and edit the buffer
o remove or modify the problematic characters,
r specify any other coding system (and risk losing
he problematic characters).
raw-text emacs-mule no-conversion
---------------------------------------------------------------------
が出るが euc-jp とかしてたら、とりあえず大丈夫っぽいんで、続けて
C-c C-c を連打し、C-x k を連打。
M-x eshell
cd ~/.emacs.d/auto-install/
rm -rf anything-migemo.*
rm -rf anything-match-plugin.*
wget http://www.emacswiki.org/emacs/download/anything-match-plugin.el
wget http://www.emacswiki.org/emacs/download/anything-migemo.el
M-x byte-compile-file
~/.emacs.d/auto-install/anything-migemo.el
でいいけど、
M-x byte-compile-file
~/.emacs.d/auto-install/anything-match-plugin.el
とすると、cl がみつからない・・・ってんなわけないと思うんだが。
現状回避不能なため、el のまま。
----------------------------------------------------------------------
Compiling file c:/gnupack/gnupack_devel-7.02/home/.emacs.d/auto-install/anything-match-plugin.el at Tue Dec 20 15:56:28 2011
anything-match-plugin.el:155:1:Warning: cl package required at runtime
----------------------------------------------------------------------
**** init.el (.emacs,emacs.el)
;; ------------------------------------------------------------------------
;; @ anything
(require 'anything-startup)
*** aspell (ispell)
**** init.el (.emacs, emacs.el)
;; ------------------------------------------------------------------------
;; @ ispell が無いから、 aspell を使う
(setq-default ispell-program-name "aspell")
(eval-after-load "ispell"
'(add-to-list 'ispell-skip-region-alist '("[^\000-\377]+")))
**** .aspell.conf
C-x C-f ~/.aspell.conf を作って
lang en_US
とする
*** emacs-w3m
**** init.el (.emacs, emacs.el)
;; ------------------------------------------------------------------------
;; @ w3m-emacs
(require 'w3m-load)
(setq w3m-use-cookies t)
(setq w3m-home-page "www.google.co.jp")
*** bat-mode.el
**** download
M-x eshell
mkdir -p ~/.emacs.d/bat-mode
cd ~/.emacs.d/bat-mode
wget http://ftp.gnu.org/old-gnu/emacs/windows/contrib/bat-mode.el
M-x byte-complie-file [RET]
bat-mode.el [RET]
**** init.el (.emacs, emacs.el)
;; ------------------------------------------------------------------------
;; @ windows batch-mode
;; ロードパスの追加
(add-to-list 'load-path
"~\\.emacs.d\\bat-mode")
(add-to-list 'auto-mode-alist '("\\.bat\\'" . bat-mode))
(autoload 'bat-mode "bat-mode"
"DOS and Windows BAT files" t)
*** tail.el
**** download
M-x install-elisp-from-emacswiki
tail.el
C-c
C-x k
[RET]
**** init.el (.emacs, emacs.el)
;; ------------------------------------------------------------------------
;; @ emacs で tail を動かす
(require 'tail)
(setq tail-volatile nil) ;前の記載を消さない
(setq tail-hide-delay 100000) ;隠すまで 100000sec
(setq tail-max-size 15) ;Window のサイズ
**** jtail.bat
以下のような jatail.bat を作っておき、 PATH の通ったところに置いてお
いたほうが良い。 eshell も bash も出力が ja_JP.cp932 になっているか
ら。
tail -f %1 | nkf -u -s
*** auto-complete.el
**** download
auto-install だとうまくいかないので、注意。
M-x eshell
cd ~/tmp
wget http://cx4a.org/pub/auto-complete/auto-complete-1.3.1.zip
unzip auto-complete-1.3.1.zip
mv auto-complete-1.3.1 ~/.emacs.d/
**** init.el (.emacs, emacs.el)
7.8 のようなダサい書き方やめたいけど、分からない。
;; ------------------------------------------------------------------------
;; @ 入力補完支援 auto-complete.el
;; ロードパスの追加
(add-to-list 'load-path
"~\\.emacs.d\\auto-complete-1.3.1")
(require 'auto-complete)
;; 3.2. インストールスクリプト
;; http://cx4a.org/software/auto-complete/manual.ja.html
(add-to-list 'ac-dictionary-directories "~//.emacs.d//auto-complete-1.3.1//dict")
(require 'auto-complete-config)
(ac-config-default)
;; 7.4. TAB で補完を完了する( RET は使わない)
;; http://cx4a.org/software/auto-complete/manual.ja.html
(define-key ac-completing-map "\t" 'ac-complete)
(define-key ac-completing-map "\r" nil)
;; 7.8. 特定のモードで自動で auto-complete-mode を有効にする
;; http://cx4a.org/software/auto-complete/manual.ja.html
(add-to-list 'ac-modes 'org-mode) ;; org-mode になったら、 auto-complete をスタートさせる
(add-to-list 'ac-modes 'text-mode)
(add-to-list 'ac-modes 'ruby-mode)
(add-to-list 'ac-modes 'pyhon-mode)
(add-to-list 'ac-modes 'ansys-mode)
*** ansys-mode.el
**** download
M-x eshell
mkdir ~/tmp/ansys-mode
cd ~/tmp/ansys-mode
wget http://ansys-mode.googlecode.com/files/ansys-mode-13.0.1.tgz
tar zxvf ansys-mode-13.0.1.tgz
mv ~/tmp/ansys-mode/ ~/.emacs.d/
**** anshelp130.bat
C-x C-f
~/.emacs.d/ansys-mode/anshelp130.bat
start hh "c:\Program Files\ANSYS Inc\v130\commonfiles\help\ja\ansys130.chm"
C-x C-s
**** dict/ansys-mode (dynprompt)
ぜったい、もっと簡単な方法ある気がするから、誰か教えてほしい。
C-x C-f
C:/Program Files/ANSYS Inc/v130/ansys/docu/dynaprompt130.ans
C-x C-w
~/.emacs.d/auto-complete-1.3.1/dict/ansys-mode
C-x h C-x r t |
M-x replace-string , [RET] | [RET]
M-x org-mode
TAB
M-S-<left> を連打
M-x replace-string |[space] [RET] [RET]
M-<
M-x replace-string | [RET] [RET]
C-h
M-x delete-trailing-whitespace
C-x C-s
**** init.el (.emacs, emacs.el)
;; ------------------------------------------------------------------------
;; @ ansys-mode の設定
;; ロードパスの追加
(add-to-list 'load-path
"~\\.emacs.d\\ansys-mode")
;; 拡張子によって ansys-mode に
(add-to-list 'auto-mode-alist '("\\.mac\\'" . ansys-mode))
(add-to-list 'auto-mode-alist '("\\.dat\\'" . ansys-mode))
(add-to-list 'auto-mode-alist '("\\.inp\\'" . ansys-mode))
(autoload 'ansys-mode "ansys-mode" nil t)
;; ansys-mode の時は、アウトラインマイナーモードに
(add-hook 'ansys-mode-hook
'(lambda ()
(outline-minor-mode 1)
))
;; chm ヘルプを起動する
(custom-set-variables
'(ansys-help-program "~\\.emacs.d\\ansys-mode\\anshelp130.bat"))
*** text-translator.el
**** download
auto-install-bathch だと、 var.el が無いだの、 var.el は文字化けするだので、
正常にインストールできないので注意
M-x eshell
mkdir -p ~/.emacs.d/text-translator
cd ~/.emacs.d/text-translator
wget http://www.emacswiki.org/emacs/download/text-translator.el
wget http://www.emacswiki.org/emacs/download/text-translator-vars.el
wget http://www.emacswiki.org/emacs/download/text-translator-load.el
**** init.el (.emacs, emacs.el)
;; ------------------------------------------------------------------------
;; Emacs でテキスト翻訳をする elisp
;; http://quantumfluctuation.blogspot.com/2011/05/text-translatorel_22.html
;; ロードパスの追加
(add-to-list 'load-path "~\\.emacs.d\\text-translator")
(require 'text-translator)
(setq text-translator-auto-selection-func
'text-translator-translate-by-auto-selection-enja)
;; 自動選択に使用する関数を設定
(setq text-translator-auto-selection-func
'text-translator-translate-by-auto-selection-enja)
;; グローバルキーを設定
(global-set-key "\C-xt" 'text-translator-translate-by-auto-selection)
;; ;; if you are setting environment variables HTTP_PROXY,
;; ;; you have not to set this.
(setq text-translator-proxy-server "<proxy-address>")
(setq text-translator-proxy-port <portnum>)
*** yatex
**** download
wget http://www.yatex.org/yatex1.74.tar.gz
**** install
tar xzvf yatex1.74.tar.gz
cd yatex1.74/
C-x C-f makefile
C-x C-q
で以下のように編集
====== ここから =====
*** c:/gnupack/gnupack_devel-7.02/home/.emacs.d/yatex1.74/makefile.orig 2011-12-21 17:41:34.404481100 +0900
--- c:/gnupack/gnupack_devel-7.02/home/.emacs.d/yatex1.74/makefile 2011-12-21 17:39:59.512481100 +0900
***************
*** 3,13 ****
#
# Edit these variables to be suitable for your site
! PREFIX = /usr/local
## mule2
! EMACS = mule
! EMACSDIR= ${PREFIX}/lib/${EMACS}
## emacs20
#EMACS = emacs
#EMACSDIR= ${PREFIX}/share/${EMACS}
--- 3,13 ----
#
# Edit these variables to be suitable for your site
! PREFIX = c:/gnupack/gnupack_devel-7.02/app/emacs/emacs/
## mule2
! # EMACS = mule
! # EMACSDIR= ${PREFIX}/lib/${EMACS}
## emacs20
#EMACS = emacs
#EMACSDIR= ${PREFIX}/share/${EMACS}
***************
*** 21,26 ****
--- 21,30 ----
#EMACS = /Applications/Emacs.app/Contents/MacOS/Emacs
#PREFIX = /Applications/Emacs.app/Contents/Resources
#EMACSDIR = ${PREFIX}
+ ## NTemacs23.3
+ EMACS = emacs
+ EMACSDIR = c:/gnupack/gnupack_devel-7.02/app/emacs/emacs/
+
LISPDIR = ${EMACSDIR}/site-lisp/yatex
# LISPDIR = ${EMACSDIR}/site-packages/lisp/yatex
***************
*** 35,41 ****
# Comment out below if you are using Emacs Windows(meadow, etc)
! GEO = -geometry 80x20+0+0
###################
# Do not edit below
--- 39,45 ----
# Comment out below if you are using Emacs Windows(meadow, etc)
! # GEO = -geometry 80x20+0+0
###################
# Do not edit below
====== ここまで =====
eshell に戻って
export DISPLAY=":0.0"
make install
としてインストール
C-x C-f
c:/gnupack_devel-7.00/app/emacs/emacs/info/dir
として、以下のように編集
===== ここから =====
*** c:/gnupack/gnupack_devel-7.02/app/emacs/emacs/info/dir.orig 2011-12-21 17:47:25.223281100 +0900
--- c:/gnupack/gnupack_devel-7.02/app/emacs/emacs/info/dir 2011-12-21 17:47:55.096081100 +0900
***************
*** 94,96 ****
--- 94,101 ----
* Widget: (widget). The "widget" package used by the Emacs
Customization facility.
* SMTP: (smtpmail). Emacs library for sending mail via SMTP.
+
+ * YaTeX: (yatexj). Yet Another tex-mode for Emacs. (Japanese).
+ * YaTeX-e: (yatexe). Yet Another tex-mode for Emacs. (English).
+ * yahtml: (yahtmlj). Yet Another HTML-mode for Emacs. (Japanese).
+ * yahtml-e: (yahtmle). Yet Another HTML-mode for Emacs. (English).
===== ここまで =====
**** init.el
C-x C-f
~/.emacs.d/init.el
として、以下を追記
;; ------------------------------------------------------------------------
;; @ yatex
(setq load-path
(cons "c:/gnupack/gnupack_devel-7.02/app/emacs/emacs/site-lisp/yatex" load-path))
(setq auto-mode-alist
(cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))
(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
(setq tex-command "c:/w32tex/bin/platex")
(setq dvi2-command "C:/w32tex/dviout/dviout")
(setq YaTeX-use-LaTeX2e t)
(setq YaTeX-use-AMS-LaTeX t)
(setq
YaTeX-math-sign-alist-private
'(
("q" "Q" "(Q)")
("z" "Z" "ZZ")
("t""text""text")
("qu" "quad" "__")
("qq" "qquad" "____")
("ls" "varlimsup" "___\nlim")
("li" "varliminf" "lim\n---")
("il" "varinjlim" "lim\n-->")
("pl" "varprojlim" "lim\n<--")
("st" "text{ s.t. }" "s.t.")
("bigop" "bigoplus" "_\n(+)~")
("bigot" "bigotimes" "_\n(x)\n ~")
))
; dviからpdfを作成する%sはファイル名
(setq dviprint-command-format "C:/w32tex/bin/dvipdfmx %s")
* 現状の問題点
- (set-frame-height (selected-frame) 53) が効かない
- auto-install で文字化け起こるの何とかならないかなぁ。
- eddif-buffers で config.ini を比較すると 改行コードが ^M になっちゃう
- (set-frame-height (selected-frame) 40) が うまく効かない
- org-mode が変。たくさんかくと org-mode でカーソル移動が遅くなる、カクカク動く。
- anything.el は履歴保存してくれないのかな。デフォルトの設定じゃ駄目なのかしらん。
- w3m で shift 選択できない。同様に、 org-mode でもできない。
- org-mode が auto-complete とかぶる。 auto-complete のキーバインドを強制上書きしても org-mode に聞かない。うざい。
- ansys-mode のカスタマイズ方法が不明。 unix/linux のみ対応を windows 対応にしたいけど、 elisp とか分からない。
登録:
投稿 (Atom)
