「システム」→「システム管理」→「Software Sources」で、「restricted」と「multiverse」にチェック。
$ sudo apt-get update $ sudo apt-get upgrade
$ sudo apt-get install tcsh
$ chsh
Password:
ログインシェル[/bin/bash]: /usr/bin/tcsh
FreeBSDの設定ファイルを転用する。
# $FreeBSD: src/share/skel/dot.cshrc,v 1.13 2001/01/10 17:35:28 archie Exp $
#
# .cshrc - csh resource script, read at beginning of execution by each shell
#
# see also csh(1), environ(7).
#
# A righteous umask
umask 22
set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin /usr/X11R6/bin $HOME/bin)
if ($?prompt) then
# An interactive shell -- set some stuff up
set prompt = '[%n@%m]%B%~%b%# '
set filec
set history = 1000
set savehist = (1000 merge)
set mail = (/var/mail/$USER)
if ( $?tcsh ) then
bindkey "^W" backward-delete-word
bindkey -k up history-search-backward
bindkey -k down history-search-forward
endif
endif
#options
set noclobber
set autolist
set autocorrect
set fignore = (.o \~ .aux .log)
set dspmbyte = euc
set ignoreeof
limit coredumpsize 0
set rmstar
setenv LANG ja_JP.UTF-8
setenv LC_CTYPE ja_JP.UTF-8
setenv PAGER less
setenv EDITOR vim
setenv BLOCKSIZE k
#alias
alias ls ls -F
alias la ls -aF
alias ll ls -alF
alias jpwhois whois -h whois.jprs.jp
alias vi vim
alias rm rm -i
alias cp cp -i
alias mv mv -i
alias mkdir mkdir -p
source ~/.cshrc
complete {cc,gcc,g++} 'c/-[IL]/d/' \
'n/-c/f:*.c/' \
'n/*/f:*.[fco]/'
complete {f77,g77} 'c/-[IL]/d/' \
'n/-c/f:*.f/' \
'p/*/f:*.[fco]/'
complete gzip 'n/-d/f:*.{gz,Z,tgz,TGZ}/' \
'n/*/f:^*.{gz,Z,tgz,TGZ}/'
complete {gunzip,gzcat,zcat} 'n/*/f:*.{gz,Z,tgz,TGZ}/'
complete com{,press} 'n/*/f:^*.Z/'
complete unc{,ompress} 'n/*/f:*.Z/'
complete tar 'n/{,-}[crtux]*z*f/f:*.{tar.gz,tar.Z,tgz,TGZ}/' \
'n/{,-}[crtux]*f/f:*.tar/' \
'n/*/f/'
complete {vi,xvi,m,more} 'n/*/f:^*.{o,a,so,so.*}/'
complete {jlatex,'tex2*'} 'n/*/f:*.tex/'
complete {ghostview,'gv*'} 'c/-l/(andscape)/' \
'n/*/f:*.{ps,eps,pdf}/'
complete lpr 'n/*/f:*.{ps,eps}/'
complete 'ps?*' 'n/*/f:*.{ps,eps}/'
complete 'tgif*' 'n/*/f:*.obj/'
complete {netscape,Mo,Mosaic,lynx,Lynx} \
'n/*/f:*.{htm,html}/'
complete ps 'n/-*u/u/'
complete {,j}{man,whatis} 'n/-M/d/' \
'n/*/c/'
complete {which,where} 'p/1/c/'
complete alias 'p/1/a/'
complete unalias 'n/*/a/'
complete set 'p/1/s/'
complete unset 'n/*/s/'
complete {set,print}env 'p/1/e/'
complete unsetenv 'n/*/e/'
complete {cd,gt,gb,chdir,pushd} 'p/1/d/' \
'n/-*/d/'
$ sudo apt-get install scim-skk
$ gconf-editor
/desktop/gnome/interface/gtk_key_themeをEmacsに設定。
$ sudo apt-get install build-essential # makeなど $ sudo apt-get install linux-headers-`uname -r` $ sudo apt-get install cvs $ sudo apt-get install ruby $ sudo apt-get install libjcode-perl libjcode-pm-perl
$ sudo apt-get install lv $ sudo apt-get install nkf $ sudo apt-get install pdumpfs # バックアップ作成 $ sudo apt-get install lha cabextract rar unrar p7zip # アーカイバ
$ sudo apt-get install emacs21 emacs21-el $ sudo apt-get ddskk # 日本語入力 $ sudo apt-get migemo # 日本語検索 $ sudo apt-get install mule-ucs # utf-8を使う $ sudo apt-get install yatex # TeXの編集 $ sudo apt-get install howm # メモ帳 $ sudo apt-get install riece # IRC
その他、Meadowインストールメモを参考に自分で入れる。
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; .emacs.el
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; configuration ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; path
(setq load-path
(append '(
"~/misc/lisp"
)
load-path))
;; environmental variables
(setenv "LANG" "C")
(setenv "TZ" "JST-9")
(setenv "RCSINIT" "-z+09:00")
;; Mule-UCS
(require 'un-define)
(require 'un-tools)
(require 'jisx0213)
;; Japanese environment
(set-language-environment "Japanese")
(set-default-coding-systems 'euc-jp)
(set-keyboard-coding-system 'euc-jp)
(set-terminal-coding-system 'euc-jp)
(setq process-coding-system-alist
(cons
'(".*" euc-jp . euc-jp)
process-coding-system-alist))
;;for shell-mode
(add-hook 'shell-mode-hook
(function
(lambda ()
(set-buffer-process-coding-system 'euc-jp 'euc-jp))))
(setq network-coding-system-alist
'(("nntp" . (junet-unix . junet-unix))
(110 . (no-conversion . no-conversion))
(25 . (no-conversion . no-conversion))))
;; imput-method
(setq emacs-ime "skk")
;; font settings
(if (not (null window-system))
(progn
(load "~/.emacs-fontset")
(set-default-font
"-alias-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-16")
))
;; initial frame
(setq default-frame-alist
(append (list
'(width . 80)
'(height . 40)
'(top . 0)
'(left . 0))
default-frame-alist))
;; emacsclient server
(server-start)
;; misc settings
; view
(setq inhibit-startup-message t)
(setq-default transient-mark-mode t)
(setq search-highlight t)
(setq query-replace-highlight t)
(setq highlight-nonselected-windows t)
(setq truncate-lines t)
(setq truncate-partial-width-windows t)
(show-paren-mode t)
(setq show-paren-ring-bell-on-mismatch t)
(setq show-paren-style 'mixed)
(setq visible-bell nil)
;(set-message-beep 'silent)
(blink-cursor-mode nil)
(setq cursor-in-non-selected-windows nil)
(setq w32-hide-mouse-on-key t)
(setq w32-hide-mouse-timeout 5000)
(setq scroll-conservatively 35
scroll-margin 0
scroll-step 1)
(setq comint-scroll-show-maximum-output t)
(setq-default line-spacing 0)
(put 'narrow-to-region 'disabled nil)
(setq-default show-trailing-whitespace t)
; interface
(tool-bar-mode 0)
(menu-bar-mode 0)
(scroll-bar-mode nil)
(setq frame-title-format "%b")
(line-number-mode t)
(column-number-mode t)
(resize-minibuffer-mode t)
(setq resize-mini-windows nil)
(setq tooltip-use-echo-area t)
; edit
(setq scroll-step 1)
(refill-mode nil)
(auto-fill-mode nil)
(setq fill-column 72)
(setq paragraph-start '"^\\([ ・○<\t\n\f]\\|(?[0-9a-zA-Z]+)\\)")
(setq next-line-add-newlines nil)
(auto-show-mode t)
(delete-selection-mode 1)
(setq kill-whole-line t)
(setq tooltip-use-echo-area t)
(setq kill-read-only-ok t)
(setq completion-ignore-case t)
; search
(setq case-replace t)
(setq case-fold-search t)
; buffer
(setq message-log-max nil)
; file
(auto-compression-mode)
(setq make-backup-files nil)
(setq version-control t)
(setq kept-new-versions 2)
(setq kept-old-versions 2)
(setq delete-old-versions t)
(setq backup-directory-alist
(cons (cons "\\.*$" (expand-file-name "~/.bak"))
backup-directory-alist))
(setq completion-ignored-extensions
(append completion-ignored-extensions
'(".exe" ".com" ".o")))
(partial-completion-mode t)
; buffer
(iswitchb-default-keybindings) ;; for emacs21
;(iswitchb-mode 1) ;; for emacs22
; dired
(setq ls-lisp-dirs-first t)
(setq directory-free-space-program nil)
(setq dired-recursive-copies 'always)
(setq dired-recursive-deletes 'always)
; etc
(fset 'yes-or-no-p 'y-or-n-p)
(auto-image-file-mode)
(setq tags-case-fold-search nil)
(setq imenu-case-fold-search nil)
(global-font-lock-mode t)
; mode-line
(if (>= emacs-major-version 20)
(progn
(setq dayname-j-alist
'(("Sun" . "日") ("Mon" . "月") ("Tue" . "火") ("Wed" . "水")
("Thu" . "木") ("Fri" . "金") ("Sat" . "土")))
(setq display-time-string-forms
'((format "%s年%s月%s日(%s) %s:%s %s"
year month day
(cdr (assoc dayname dayname-j-alist))
24-hours minutes
load)))
))
;(display-time)
;; shell
(setq exec-path
(mapcar
'expand-file-name
(list
"~/bin"
"/usr/X11R6/bin"
"/usr/local/bin"
"/usr/bin"
"/usr/sbin"
"/bin"
"/sbin"
)))
(setq explicit-shell-file-name "tcsh")
;; For wheel-mouse
(mouse-wheel-mode t)
(setq mouse-wheel-follow-mouse t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; key-bindings ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; buffer
;(global-set-key "\C-x\C-kf" 'set-buffer-file-coding-system)
(global-set-key "\C-cc" 'compare-windows)
(global-set-key "\C-x\C-n" 'rename-buffer)
; move
(global-set-key "\C-a" 'beginning-of-line)
(global-set-key "\C-e" 'end-of-line)
(global-set-key [home] 'beginning-of-buffer)
(global-set-key [end] 'end-of-buffer)
(global-set-key "\C-z" 'scroll-down)
(global-set-key "\M-g" 'goto-line)
(windmove-default-keybindings)
; edit
(global-set-key "\C-m" 'reindent-then-newline-and-indent)
(global-set-key "\C-h" 'delete-backward-char)
(global-set-key "\C-\\" 'undo)
(global-set-key "\C-cq" 'comment-region)
(global-set-key "\M-i" 'indent-region)
; search / replace
(global-set-key "\M-r" 'query-replace)
(global-set-key "\C-\M-r" 'query-replace-regexp)
(global-set-key "\C-cg" 'grep)
; etc
;; (global-set-key "\C-\\" 'toggle-input-method)
;; (global-set-key "\C-o" 'toggle-input-method)
(global-set-key "\C-co" 'browse-uri-at-point)
(global-set-key [mouse-3] 'browse-url-at-mouse)
(global-set-key [zenkaku-hankaku] 'toggle-input-method)
(global-set-key [kanji] 'toggle-input-method)
(global-set-key "\C-x\?" 'describe-key)
(global-set-key [f1] 'help-for-help)
; synchronize clipboard
(setq x-select-enable-clipboard t)
(global-set-key "\M-w" 'clipboard-kill-ring-save)
(global-set-key "\C-w" 'clipboard-kill-region)
;(global-set-key "\C-y" 'clipboard-yank)
(global-set-key [S-delete] 'kill-region)
(global-set-key [C-insert] 'kill-ring-save)
(global-set-key [S-insert] 'clipboard-yank)
(global-set-key [S-mouse-3] 'yank)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Input Method ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Anthy
(if (or (equal emacs-ime "anthy")
(equal emacs-ime "Anthy"))
(if (not (null window-system))
(progn
(load-library "anthy")
(setq default-input-method "japanese-anthy")
(require 'anthy)
;; 変換開始キー
;(global-set-key "\C-\\" 'anthy-mode)
;(global-set-key "\C-o" 'anthy-mode)
;(global-set-key [zenkaku-hankaku] 'anthy-mode)
;(global-set-key [kanji] 'anthy-mode)
(anthy-load-hiragana-map anthy-alt-char-map)
(setq anthy-wide-space " ")
)))
;; egg-anthy
(if (or (equal emacs-ime "egg-anthy")
(equal emacs-ime "tamago-anthy"))
(if (not (null window-system))
(progn
(set-input-method 'japanese-egg-anthy)
)))
;; SKK
(if (or (equal emacs-ime "skk")
(equal emacs-ime "SKK"))
(if (not (null window-system))
(progn
(require 'skk-autoloads)
;; 変換開始キー
(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-large-jisyo "~/.skk/SKK-JISYO.L")
;; 変換時,改行でも確定
(setq skk-egg-like-newline t)
;; メッセージは日本語で
(setq skk-japanese-message-and-error t)
;;"「"を入力したら"」"も自動で挿入
(setq skk-auto-insert-paren t)
;;漢字登録のミスをチェックする
(setq skk-check-okurigana-on-touroku t)
;; 句読点は , . を使う
(setq skk-kuten-touten-alist
'(
(jp . ("。" . "、" ))
(en . ("." . ","))
))
;; jp にすると「。、」を使います
(setq-default skk-kutouten-type 'en)
;; @で挿入する日付表示を半角に
(setq skk-number-style nil)
;; 変換候補をツールチップに表示
(setq skk-show-tooltip t)
;; 変換候補をインラインに表示
(setq skk-show-inline t)
;; isearch時にSKKをオフ
(setq skk-isearch-start-mode 'latin)
;; .と。を動的に決定
(add-hook 'skk-mode-hook
(lambda ()
(save-excursion
(goto-char 0)
(make-local-variable 'skk-kutouten-type)
(if (re-search-forward "." 10000 t)
(setq skk-kutouten-type 'en)
(setq skk-kutouten-type 'jp)))))
)))
;; Canna
(if (or (equal emacs-ime "canna")
(equal emacs-ime "Canna"))
(if (not (null window-system))
(progn
(load-library "canna")
(setq default-input-method "japanese-egg-canna")
(setq canna-hostname "localhost")
(setq its-hira-comma ",")
(setq its-hira-period "。")
(load-library "egg")
(load "its")
(define-key its-mode-map "\C-h" 'its-delete-backward-SYL)
(define-key its-mode-map "\C-p" 'its-hiragana)
(define-key its-mode-map "\C-y" 'its-hiragana)
(define-key its-mode-map "\C-n" 'its-katakana)
(define-key its-mode-map [up] 'its-hiragana)
(define-key its-mode-map [down] 'its-katakana)
(cond ((eq window-system 'x)
(define-key its-mode-map [henkan] 'its-kick-convert-region)
(define-key its-mode-map [hiragana-katakana] 'its-katakana)
(define-key its-mode-map [muhenkan] 'its-hiragana)
(define-key its-mode-map [f6] 'its-hiragana)
(define-key its-mode-map [f7] 'its-katakana)
(define-key its-mode-map [f8] 'its-half-width)
(define-key its-mode-map [backspace] 'its-delete-backward-SYL)
;(define-key menudiag-mode-map [backspace] 'menudiag-exit-one-level)
(define-key its-mode-map [delete] 'its-delete-SYL))
((null window-system)
(define-key its-mode-map "\e[17~" 'its-hiragana)
(define-key its-mode-map "\e[18~" 'its-katakana)
(define-key its-mode-map "\e[19~" 'its-half-width)
(define-key its-mode-map [8] 'its-delete-backward-SYL)
;(define-key menudiag-mode-map [8] 'menudiag-exit-one-level)
(define-key its-mode-map "\e[3~" 'its-delete-SYL)))
)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; major mode ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; major mode bindings
(setq auto-mode-alist
(append
'(
; ("\\.x?html\\(\\.\\w+\\)*$" . html-mode)
("\\.\\(el\\|l\\)$" . emacs-lisp-mode)
("\\.gnus" . emacs-lisp-mode)
("\\.abbrev_defs" . emacs-lisp-mode)
("\\.txt$" . text-mode)
("\\.\\(c\\|h\\|js\\)$" . c-mode)
("\\.\\(cpp\\|hpp\\|hxx\\)$" . c++-mode)
("\\.ruby$" . ruby-mode)
("\\.java$" . java-mode)
("\\.sql$" . sql-mode)
("\\.conf$" . conf-mode)
)
auto-mode-alist))
;; text-mode
(add-hook 'text-mode-hook
(lambda ()
(refill-mode nil)
(refill-mode nil)
(auto-fill-mode 1)
))
;; emacs-lisp-mode
(add-hook 'emacs-lisp-mode-hook
(lambda ()
(make-variable-buffer-local 'indent-tabs-mode)
(setq indent-tabs-mode t)
))
;; html-mode
(add-hook 'html-mode-hook
(lambda ()
;; do not use auto-fill-mode
(refill-mode nil)
(refill-mode nil)
(auto-fill-mode nil)
(auto-fill-mode nil)
;; do not use tab
(make-variable-buffer-local 'indent-tabs-mode)
(setq indent-tabs-mode nil)
;;time-stamp
(make-local-variable 'time-stamp-start)
(setq time-stamp-start "最終更新日:2007年2月8日
(make-local-variable 'time-stamp-end)
(setq time-stamp-end "\n")
(make-local-variable 'time-stamp-format)
(setq time-stamp-format "%:y年%:m月%:d日")
(make-local-variable 'time-stamp-line-limit)
(setq time-stamp-line-limit 3000)
))
;; c-mode
(add-hook 'c-mode-common-hook
(lambda ()
(setq imenu-case-fold-search t)
(setq tab-width 4)
))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; functions ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; byte-compile-this-file
(defun byte-compile-this-file ()
"Compile current-buffer-file of Lisp into a file of byte code."
(interactive)
(byte-compile-file buffer-file-name t))
(global-set-key "\C-c\C-b" 'byte-compile-this-file)
;; byte-compile-dot-emacs
(defun byte-compile-dot-emacs ()
"Compile .emacs.el into a file of byte code."
(interactive)
(byte-compile-file "~/.emacs.el" t))
(global-set-key "\C-cb" 'byte-compile-this-file)
;; set coding system
(add-hook 'find-file-hooks
(lambda ()
(cond
((string-match "\\.html?\\(\\.\\w+\\)*$" buffer-file-name)
(set-buffer-file-coding-system 'sjis-unix))
((string-match "\\.xhtml\\(\\.\\w+\\)*$" buffer-file-name)
(set-buffer-file-coding-system 'utf-8-unix))
((string-match "\\.xxx$" buffer-file-name)
(set-buffer-file-coding-system 'utf-8-unix))
)
))
;; delete-file-if-no-contents
(if (not (memq 'delete-file-if-no-contents after-save-hook))
(setq after-save-hook
(cons 'delete-file-if-no-contents after-save-hook)))
(defun delete-file-if-no-contents ()
(when (and
(buffer-file-name (current-buffer))
(= (point-min) (point-max)))
(when (y-or-n-p "Delete file and kill buffer?")
(delete-file
(buffer-file-name (current-buffer)))
(kill-buffer (current-buffer)))))
;; display tab, zenkaku-space, eol-space
(defface my-face-tab '((t (:foreground "SteelBlue" :underline t))) nil :group 'my-faces)
(defface my-face-zenkaku-space '((t (:background "gray"))) nil :group 'my-faces)
(defface my-face-eol-space '((t (:background "SteelBlue"))) nil :group 'my-faces)
(defvar my-face-tab 'my-face-tab)
(defvar my-face-zenkaku-space 'my-face-zenkaku-space)
(defvar my-face-eol-space 'my-face-eol-space)
(defadvice font-lock-mode (before my-font-lock-mode ())
(font-lock-add-keywords
major-mode
'(("\t" 0 my-face-tab append)
(" " 0 my-face-zenkaku-space append)
("[ \t]+$" 0 my-face-eol-space append)
)))
(ad-enable-advice 'font-lock-mode 'before 'my-font-lock-mode)
(ad-activate 'font-lock-mode)
;; easy-moving buffer
(defvar my-ignore-blst
'("*Help*" "*Compile-Log*" "*Mew completions*" "*Completions*"
"*Shell Command Output*" "*Apropos*" "*Buffer List*"))
(defvar my-visible-blst nil)
(defvar my-bslen 15)
(defvar my-blist-display-time 2)
(defface my-cbface
'((t (:foreground "wheat" :underline t))) nil :group 'my-faces)
(defun my-visible-buffers (blst)
(if (eq blst nil) '()
(let ((bufn (buffer-name (car blst))))
(if (or (= (aref bufn 0) ? ) (member bufn my-ignore-blst))
(my-visible-buffers (cdr blst))
(cons (car blst) (my-visible-buffers (cdr blst)))))))
(defun my-show-buffer-list (prompt spliter)
(let* ((len (string-width prompt))
(str (mapconcat
(lambda (buf)
(let ((bs (copy-sequence (buffer-name buf))))
(when (> (string-width bs) my-bslen)
(setq bs (concat (substring bs 0 (- my-bslen 2)) "..")))
(setq len (+ len (string-width (concat bs spliter))))
(when (eq buf (current-buffer))
(put-text-property 0 (length bs) 'face 'my-cbface bs))
(cond ((>= len (frame-width))
(setq len (+ (string-width (concat prompt bs spliter))))
(concat "\n" (make-string (string-width prompt) ? ) bs))
(t bs))))
my-visible-blst spliter)))
(let (message-log-max)
(message "%s" (concat prompt str))
(when (sit-for my-blist-display-time) (message nil)))))
(defun my-operate-buffer (pos)
(unless (window-minibuffer-p (selected-window))
(unless (eq last-command 'my-operate-buffer)
(setq my-visible-blst (my-visible-buffers (buffer-list))))
(let* ((blst (if pos my-visible-blst (reverse my-visible-blst))))
(switch-to-buffer (or (cadr (memq (current-buffer) blst)) (car blst))))
(my-show-buffer-list (if pos "[-->] " "[<--] ") (if pos " > " " < " )))
(setq this-command 'my-operate-buffer))
(global-set-key [?\C-,] (lambda () (interactive) (my-operate-buffer nil)))
(global-set-key [?\C-.] (lambda () (interactive) (my-operate-buffer t)))
;; delete region with backspace key
(defadvice backward-delete-char-untabify
(around ys:backward-delete-region activate)
(if (and transient-mark-mode mark-active)
(delete-region (region-beginning) (region-end))
ad-do-it))
;; make saved shellscript file executable
;(add-hook 'after-save-hook
; '(lambda () (save-restriction (widen)
; (and (string= "#!" (buffer-substring 1 (min 3 (point-max))))
; (let* ((name (buffer-file-name))(mode (file-modes name)))
; (if (and (zerop (logand mode 64))(not (string-match "/\\.[^/]+$" name)))
; (progn (set-file-modes name (logior mode (logand (/ mode 4) 73)))
; (message (concat "Wrote " name " (+x)")))))))))
;; make script-file executable
(add-hook 'after-save-hook
'executable-make-buffer-file-executable-if-script-p)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; utilities ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; migemo
(setq migemo-directory "/usr/share/migemo")
(setq migemo-user-dictionary nil)
(setq migemo-regex-dictionary nil)
(setq migemo-use-pattern-alist t)
(setq migemo-use-frequent-pattern-alist t)
(setq migemo-pattern-alist-length 1024)
(load-library "migemo")
(migemo-init)
;; auto-insert - Automatic mode-dependent insertion of text into new files
(setq auto-insert-directory "~/misc/templates/")
(auto-insert-mode 1)
(setq auto-insert-query t)
(setq auto-insert-alist
(append
'(
("elastic965.*\\.html$" . "mysite.html")
("\\.sh$" . "default.sh")
("\\.c$" . "default.c")
("\\.cpp$" . "default.cpp")
("\\.h$" . "default.h")
("\\.java$" . "default.java")
("\\.pl$" . "default.pl")
("\\.cgi$" . "default.cgi")
("\\.htm\\(\\.\\w+\\)*$" . "default.htm")
("\\.html\\(\\.\\w+\\)*$" . "default.html")
("\\.xhtml\\(\\.\\w+\\)*$" . "default.xhtml")
("\\.xml$" . "default.xml")
("\\.xsl$" . "default.xsl")
("\\.tex$" . "default.tex")
)
auto-insert-alist))
;; time-stamp - Maintain last change time stamps in files edited by Emacs
(setq time-stamp-start "Last-Modified:[ \t]*<")
(setq time-stamp-end ">")
;(setq time-stamp-format "%:y年/%:m月/%:d日")
;(setq time-stamp-format "%04y-%02m-%02dT%02H:%02M:%02S+09:00")
(setq time-stamp-format "%3a, %02d %3b %04y %02H:%02M:%02S %Z")
(setq time-stamp-line-limit 3000)
(if (not (memq 'time-stamp write-file-hooks))
(setq write-file-hooks
(cons 'time-stamp write-file-hooks)))
;; uniqify
(require 'uniquify)
(setq uniquify-buffer-name-style 'post-forward-angle-brackets)
(setq uniquify-ignore-buffers-re "*[^*]+*")
;; save cursor position
(load "saveplace")
(setq-default save-place t)
;; color-theme - install color themes
(require 'color-theme)
(color-theme-initialize)
(color-theme-gnome2)
; for anthy
(copy-face 'highlight 'anthy-highlight-face)
;; wb-line-number - window-based line number displaying
(setq wb-line-number-scroll-bar t)
(require 'wb-line-number)
(wb-line-number-toggle)
;; physical-line - a minor mode to move a cursor across "physical lines"
(load "physical-line")
(physical-line-on)
(setq physical-line-ignoring-mode-list '(dired-mode))
;; redo - Redo/undo system for XEmacs
(require 'redo)
(global-set-key [?\C-_] 'redo)
;; windows - Window manager for GNU Emacs
(require 'windows)
(setq win:use-frame t)
(win:startup-with-window)
(define-key ctl-x-map "C" 'see-you-again)
;; flobl - frame-local buffer list
(require 'flobl)
;; session - use variables, registers and buffer places across sessions
(require 'session)
(add-hook 'after-init-hook 'session-initialize)
;; highlight-completion - Completion with highlighted provisional text
(setq hc-ctrl-x-c-is-completion t)
(require 'highlight-completion)
(highlight-completion-mode 1)
(global-set-key "\C-\\" 'toggle-input-method)
;; mcomplete - minibuffer completion with prefix and substring matching
(require 'mcomplete)
(require 'cl)
;(load "mcomplete-history")
(turn-on-mcomplete-mode)
;; iswitchb with migemo
(setq iswitchb-regexp t)
(setq iswitchb-use-migemo-p t)
(defadvice iswitchb-get-matched-buffers
(before iswitchb-use-migemo activate)
"iswitchb with migemo"
(when iswitchb-use-migemo-p
(ad-set-arg
0 (migemo-get-pattern
(ad-get-arg 0)))))
;; ibuffer - operate on buffers like dired
(require 'ibuffer)
(global-set-key "\C-x\C-b" 'ibuffer)
(global-set-key [f2] 'ibuffer)
(setq ibuffer-formats
'((mark modified read-only " " (name 30 30)
" " (size 6 -1) " " (mode 16 16) " " filename)
(mark " " (name 30 -1) " " filename)))
(setq ibuffer-never-show-regexps '("^\*.*\*$"))
(setq ibuffer-always-show-regexps '("^\*scratch\*$"))
(setq ibuffer-directory-abbrev-alist
'(
("/usr/local" . "/usr/local")
("/home/ishikawa" . "HOME")
))
(define-key ibuffer-mode-map
"T" 'ibuffer-do-convert-coding-system)
(defun ibuffer-do-convert-coding-system
(coding-system &optional arg)
"Convert file (s) in specified coding system."
(interactive
(list
(let ((default (or
(and (boundp 'dired-default-file-coding-system)
dired-default-file-coding-system)
buffer-file-coding-system)))
(read-coding-system
(format
"Coding system for converting file (s) (default, %s): "
default)
default))
current-prefix-arg))
(if (= (ibuffer-count-marked-lines) 0)
(message
"No buffers marked; use 'm' to mark a buffer")
(let ((ibuffer-do-bufs nil))
(ibuffer-map-marked-lines
#'(lambda (buf mark beg end)
(push buf ibuffer-do-bufs)))
(ibuffer-unmark-all 62)
(while ibuffer-do-bufs
(set-buffer (car ibuffer-do-bufs))
(set-buffer-file-coding-system coding-system arg)
(if (buffer-file-name)
(let ((coding-system-for-write coding-system))
(save-buffer arg)))
(setq ibuffer-do-bufs (cdr ibuffer-do-bufs))))))
;; browse-url
(setq browse-url-netscape-program "firefox")
(global-set-key "\C-co" 'browse-url)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; dired ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; my-dired-mode
;; - select files like Windows Explorer
;; - do not make new buffer for each directory
;; - toggle mark with space-key
(load "my-dired-mode")
;; sorter - cycles dired listing between name/date/extension/size
(load "sorter")
(add-hook 'dired-mode-hook
(lambda ()
(define-key dired-mode-map "S" 'dired-toggle-sort)))
;; wdired - Rename files editing their names in dired buffers
(require 'wdired)
(add-hook 'dired-mode-hook
(lambda ()
(define-key dired-mode-map "W" 'wdired-change-to-wdired-mode)))
;; convert coding system of marked files
(setq dired-default-file-coding-system 'euc-jp-unix)
(require 'dired-aux)
(add-hook 'dired-mode-hook
(lambda ()
(define-key (current-local-map) "T"
'dired-do-convert-coding-system)))
(defvar dired-default-file-coding-system nil
"*Default coding system for converting file (s).")
(defvar dired-file-coding-system 'no-conversion)
(defun dired-convert-coding-system ()
(let ((file (dired-get-filename))
(coding-system-for-write dired-file-coding-system)
failure)
(condition-case err
(with-temp-buffer
(insert-file file)
(write-region (point-min) (point-max) file))
(error (setq failure err)))
(if (not failure)
nil
(dired-log "convert coding system error for %s:\n%s\n" file failure)
(dired-make-relative file))))
(defun dired-do-convert-coding-system (coding-system &optional arg)
"Convert file (s) in specified coding system."
(interactive
(list (let ((default (or dired-default-file-coding-system
buffer-file-coding-system)))
(read-coding-system
(format "Coding system for converting file (s) (default, %s): "
default)
default))
current-prefix-arg))
(check-coding-system coding-system)
(setq dired-file-coding-system coding-system)
(dired-map-over-marks-check
(function dired-convert-coding-system) arg 'convert-coding-system t))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; user-added major mode ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; mmm-mode
(require 'mmm-mode)
(setq mmm-global-mode 'maybe)
(set-face-background 'mmm-default-submode-face "navy")
;;; html + css
(mmm-add-classes
'((embedded-css
:submode css-mode
:front "<style[^>]*>"
:back "</style>")))
(mmm-add-mode-ext-class nil "\\.html?\\'" 'embedded-css)
;; html + php
(mmm-add-classes
'((html-php
:submode php-mode
:front "<\\?\\(php\\)?"
:back "\\?>")))
(mmm-add-mode-ext-class nil "\\.php?\\'" 'html-php)
;; texinfo + lisp
(mmm-add-classes
'((texi-elisp
:submode emacs-lisp-mode
:front "@lisp"
:back "@end lisp"
:insert ((?t texi-elisp nil @ "@lisp"
@ "\n" _ "\n" @ "@end lisp" @))
)))
(mmm-add-mode-ext-class nil "\\.texi?\\'" 'texi-elisp)
;; psgml - Major mode to edit SGML/XML files
(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t)
(autoload 'xml-mode "psgml" "Major mode to edit XML files." t)
(setq auto-mode-alist
(append
'(
("\\.htm\\(\\.\\w+\\)*$" . sgml-mode)
("\\.\\(xml\\|xslt?\\|rlx\\|rng\\)$" . xml-mode)
("\\.x?html\\(\\.\\w+\\)*$" . xml-mode)
)
auto-mode-alist))
(setq sgml-catalog-files '("CATALOG" "~/misc/sgml/catalog"))
;(setq sgml-ecat-files '("ECAT" "~/misc/sgml/ecat"))
(setq sgml-set-face t)
(setq sgml-general-insert-case 'lower)
(add-hook 'sgml-mode-hook
(lambda ()
(make-variable-buffer-local 'indent-tabs-mode)
(setq indent-tabs-mode nil)
(setq sgml-omittag nil
sgml-shorttag nil
sgml-indent-step 2
sgml-indent-data t)
;;time-stamp
(make-local-variable 'time-stamp-start)
(setq time-stamp-start "最終更新日:[ \t]*")
(make-local-variable 'time-stamp-end)
(setq time-stamp-end "\n")
(make-local-variable 'time-stamp-format)
(setq time-stamp-format "%:y年%:m月%:d日")
(make-local-variable 'time-stamp-line-limit)
(setq time-stamp-line-limit 3000)
;; validator
(make-local-variable 'sgml-validate-command)
(setq sgml-validate-command "/path/to/htmllint %s %s")
;; Do note auto-fill
(refill-mode nil)
(refill-mode nil)
(auto-fill-mode nil)
(auto-fill-mode nil)
))
(add-hook 'xml-mode-hook
(lambda ()
(make-variable-buffer-local 'indent-tabs-mode)
(setq indent-tabs-mode nil)
(setq sgml-omittag nil
sgml-shorttag nil
sgml-indent-step 2
sgml-indent-data t)
;;time-stamp
(make-local-variable 'time-stamp-start)
(setq time-stamp-start "最終更新日:[ \t]*")
(make-local-variable 'time-stamp-end)
(setq time-stamp-end "\n")
(make-local-variable 'time-stamp-format)
(setq time-stamp-format "%:y年%:m月%:d日")
(make-local-variable 'time-stamp-line-limit)
(setq time-stamp-line-limit 3000)
;; validator
(make-local-variable 'sgml-validate-command)
(setq sgml-validate-command "/path/to/htmllint %s %s")
;; Do note auto-fill
(refill-mode nil)
(refill-mode nil)
(auto-fill-mode nil)
(auto-fill-mode nil)
))
;; css-mode - A major mode for editing CSS
(autoload 'css-mode "css-mode")
(setq auto-mode-alist
(cons '("\\.css$" . css-mode) auto-mode-alist))
;; yatex-mode - Yet Another TeX mode for Emacs
(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
(setq auto-mode-alist
(cons (cons "\\.tex$" 'yatex-mode)
(cons (cons "\\.ltx" 'yatex-mode)
auto-mode-alist)))
(setq
tex-command "/usr/local/bin/latexmk -dvi"
dviprint-command-format "/usr/local/bin/latexmk -pdfdvi %s"
dvi2-command "xdvi-ja"
bibtex-command "jbibtex"
makeindex-command "mendex")
;(setq
; tex-command "platex"
; dvi2-command "xdvi-ja -geo +0+0 -s 4"
; dviprint-command-format "dvi2ps %f %t %s | lpr"
; dviprint-from-format "-f %b"
; dviprint-to-format "-t %e"
; makeindex-command "mendex"
;)
(add-hook 'yatex-mode-hook
(lambda ()
(setq indent-tabs-mode t)
(auto-fill-mode t)
(refill-mode nil)
(refill-mode nil)
;;time-stamp
(make-local-variable 'time-stamp-start)
(setq time-stamp-start "\\date{[ \t]*")
(make-local-variable 'time-stamp-end)
(setq time-stamp-end "}")
(make-local-variable 'time-stamp-format)
(setq time-stamp-format "%:y年%:m月%:d日")
(make-local-variable 'time-stamp-line-limit)
(setq time-stamp-line-limit 10)
))
;; cperl-mode
(autoload 'cperl-mode "cperl-mode" "alternate mode for editing Perl programs" t)
(setq auto-mode-alist
(append '(("\\.\\([pP][Llm]\\|al\\)$" . cperl-mode)) auto-mode-alist ))
(setq interpreter-mode-alist (append interpreter-mode-alist
'(("miniperl" . cperl-mode))))
(add-hook 'cperl-mode-hook
(lambda ()
(set-face-bold-p 'cperl-array-face nil)
(set-face-background 'cperl-array-face "black")
(set-face-bold-p 'cperl-hash-face nil)
(set-face-italic-p 'cperl-hash-face nil)
(set-face-background 'cperl-hash-face "black")
))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; applications ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Mew 3.3
;(autoload 'mew "mew" nil t)
;(autoload 'mew-send "mew" nil t)
;(if (file-exists-p (expand-file-name "~/.mew.el"))
; (load (expand-file-name "~/.mew.el") nil t nil))
;; Wanderlust
;(autoload 'wl "wl" "Wanderlust" t)
;(autoload 'wl-other-frame "wl" "Wanderlust on new frame." t)
;(autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
;; navi2ch
(autoload 'navi2ch "navi2ch" "Navigator for 2ch for Emacs" t)
(setq navi2ch-list-bbstable-url "http://menu.2ch.net/bbsmenu.html")
(add-hook 'navi2ch-message-mode-hook
(lambda ()
(refill-mode nil)
(refill-mode nil)
(auto-fill-mode 1)
(auto-fill-mode 1)
))
;; howm
(setq howm-menu-lang 'ja)
(require 'howm)
;; rice
(load "riece")
;(setq riece-server "2ch")
(setq riece-server-alist
'(
("freenode" :host "irc.freenode.net" :nickname "ishikawa")
("2ch" :host "irc.2ch.net" :nickname "foo")
("kyoto" :host "irc.kyoto.wide.ad.jp")
))
;; emacs-w3m
(require 'w3m-load)
;(setq w3m-command "/usr/bin/w3m")
(setq w3m-display-inline-image t)
Vine Linuxのファイルを転用。
(if (>= emacs-major-version 21)
(progn
;; Emacs21 の場合は各フォントを指定するとボールドやイタリックがでない
;; (Why?)
(create-fontset-from-fontset-spec
"-alias-fixed-medium-r-normal-*-10-*-*-*-*-*-fontset-10"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-medium-r-normal-*-12-*-*-*-*-*-fontset-12"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-medium-r-normal-*-14-*-*-*-*-*-fontset-14"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-16"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-medium-r-normal-*-18-*-*-*-*-*-fontset-18"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-medium-r-normal-*-20-*-*-*-*-*-fontset-20"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-24"
nil t))
(progn
;; Emacs20 の設定 (各サイズ 標準、ボールド、イタリックを用意)
;; fontset-10
(create-fontset-from-fontset-spec
"-alias-fixed-medium-r-normal-*-10-*-*-*-*-*-fontset-10,
japanese-jisx0208:-alias-fixed-medium-r-normal-*-10-*-JISX0208.1983-0,
katakana-jisx0201:-alias-fixed-medium-r-normal-*-10-*-JISX0201.1976-0,
japanese-jisx0213-1:-alias-fixed-medium-r-normal-*-10-*-JISX0213.2000-1,
japanese-jisx0213-2:-alias-fixed-medium-r-normal-*-10-*-JISX0213.2000-2"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-bold-r-normal-*-10-*-*-*-*-*-fontset-10,
japanese-jisx0208:-alias-fixed-bold-r-normal-*-10-*-JISX0208.1983-0,
katakana-jisx0201:-alias-fixed-bold-r-normal-*-10-*-JISX0201.1976-0,
japanese-jisx0213-1:-alias-fixed-bold-r-normal-*-10-*-JISX0213.2000-1,
japanese-jisx0213-2:-alias-fixed-bold-r-normal-*-10-*-JISX0213.2000-2"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-medium-i-normal-*-10-*-*-*-*-*-fontset-10,
japanese-jisx0208:-alias-fixed-medium-i-normal-*-10-*-JISX0208.1983-0,
katakana-jisx0201:-alias-fixed-medium-i-normal-*-10-*-JISX0201.1976-0,
japanese-jisx0213-1:-alias-fixed-medium-i-normal-*-10-*-JISX0213.2000-1,
japanese-jisx0213-2:-alias-fixed-medium-i-normal-*-10-*-JISX0213.2000-2"
nil t)
;; fontset-12
(create-fontset-from-fontset-spec
"-alias-fixed-medium-r-normal-*-12-*-*-*-*-*-fontset-12,
japanese-jisx0208:-alias-fixed-medium-r-normal-*-12-*-JISX0208.1983-0,
katakana-jisx0201:-alias-fixed-medium-r-normal-*-12-*-JISX0201.1976-0,
japanese-jisx0213-1:-alias-fixed-medium-r-normal-*-12-*-JISX0213.2000-1,
japanese-jisx0213-2:-alias-fixed-medium-r-normal-*-12-*-JISX0213.2000-2"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-bold-r-normal-*-12-*-*-*-*-*-fontset-12,
japanese-jisx0208:-alias-fixed-bold-r-normal-*-12-*-JISX0208.1983-0,
katakana-jisx0201:-alias-fixed-bold-r-normal-*-12-*-JISX0201.1976-0,
japanese-jisx0213-1:-alias-fixed-bold-r-normal-*-12-*-JISX0213.2000-1,
japanese-jisx0213-2:-alias-fixed-bold-r-normal-*-12-*-JISX0213.2000-2"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-medium-i-normal-*-12-*-*-*-*-*-fontset-12,
japanese-jisx0208:-alias-fixed-medium-i-normal-*-12-*-JISX0208.1983-0,
katakana-jisx0201:-alias-fixed-medium-i-normal-*-12-*-JISX0201.1976-0,
japanese-jisx0213-1:-alias-fixed-medium-i-normal-*-12-*-JISX0213.2000-1,
japanese-jisx0213-2:-alias-fixed-medium-i-normal-*-12-*-JISX0213.2000-2"
nil t)
;; fontset-14
(create-fontset-from-fontset-spec
"-alias-fixed-medium-r-normal-*-14-*-*-*-*-*-fontset-14,
japanese-jisx0208:-alias-fixed-medium-r-normal-*-14-*-JISX0208.1983-0,
katakana-jisx0201:-alias-fixed-medium-r-normal-*-14-*-JISX0201.1976-0,
japanese-jisx0213-1:-alias-fixed-medium-r-normal-*-14-*-JISX0213.2000-1,
japanese-jisx0213-2:-alias-fixed-medium-r-normal-*-14-*-JISX0213.2000-2"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-bold-r-normal-*-14-*-*-*-*-*-fontset-14,
japanese-jisx0208:-alias-fixed-bold-r-normal-*-14-*-JISX0208.1983-0,
katakana-jisx0201:-alias-fixed-bold-r-normal-*-14-*-JISX0201.1976-0,
japanese-jisx0213-1:-alias-fixed-bold-r-normal-*-14-*-JISX0213.2000-1,
japanese-jisx0213-2:-alias-fixed-bold-r-normal-*-14-*-JISX0213.2000-2"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-medium-i-normal-*-14-*-*-*-*-*-fontset-14,
japanese-jisx0208:-alias-fixed-medium-i-normal-*-14-*-JISX0208.1983-0,
katakana-jisx0201:-alias-fixed-medium-i-normal-*-14-*-JISX0201.1976-0,
japanese-jisx0213-1:-alias-fixed-medium-i-normal-*-14-*-JISX0213.2000-1,
japanese-jisx0213-2:-alias-fixed-medium-i-normal-*-14-*-JISX0213.2000-2"
nil t)
;; fontset-16
(create-fontset-from-fontset-spec
"-alias-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-16,
japanese-jisx0208:-alias-fixed-medium-r-normal-*-16-*-JISX0208.1983-0,
katakana-jisx0201:-alias-fixed-medium-r-normal-*-16-*-JISX0201.1976-0,
japanese-jisx0213-1:-alias-fixed-medium-r-normal-*-16-*-JISX0213.2000-1,
japanese-jisx0213-2:-alias-fixed-medium-r-normal-*-16-*-JISX0213.2000-2"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-bold-r-normal-*-16-*-*-*-*-*-fontset-16,
japanese-jisx0208:-alias-fixed-bold-r-normal-*-16-*-JISX0208.1983-0,
katakana-jisx0201:-alias-fixed-bold-r-normal-*-16-*-JISX0201.1976-0,
japanese-jisx0213-1:-alias-fixed-bold-r-normal-*-16-*-JISX0213.2000-1,
japanese-jisx0213-2:-alias-fixed-bold-r-normal-*-16-*-JISX0213.2000-2"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-medium-i-normal-*-16-*-*-*-*-*-fontset-16,
japanese-jisx0208:-alias-fixed-medium-i-normal-*-16-*-JISX0208.1983-0,
katakana-jisx0201:-alias-fixed-medium-i-normal-*-16-*-JISX0201.1976-0,
japanese-jisx0213-1:-alias-fixed-medium-i-normal-*-16-*-JISX0213.2000-1,
japanese-jisx0213-2:-alias-fixed-medium-i-normal-*-16-*-JISX0213.2000-2"
nil t)
;; fontset-18
(create-fontset-from-fontset-spec
"-alias-fixed-medium-r-normal-*-18-*-*-*-*-*-fontset-18,
japanese-jisx0208:-alias-fixed-medium-r-normal-*-18-*-JISX0208.1983-0,
katakana-jisx0201:-alias-fixed-medium-r-normal-*-18-*-JISX0201.1976-0,
japanese-jisx0213-1:-alias-fixed-medium-r-normal-*-18-*-JISX0213.2000-1,
japanese-jisx0213-2:-alias-fixed-medium-r-normal-*-18-*-JISX0213.2000-2"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-bold-r-normal-*-18-*-*-*-*-*-fontset-18,
japanese-jisx0208:-alias-fixed-bold-r-normal-*-18-*-JISX0208.1983-0,
katakana-jisx0201:-alias-fixed-bold-r-normal-*-18-*-JISX0201.1976-0,
japanese-jisx0213-1:-alias-fixed-bold-r-normal-*-18-*-JISX0213.2000-1,
japanese-jisx0213-2:-alias-fixed-bold-r-normal-*-18-*-JISX0213.2000-2"
nil t)
(create-fontset-from-fontset-spec
"-alias-fixed-medium-i-normal-*-18-*-*-*-*-*-fontset-18,
japanese-jisx0208:-alias-fixed-medium-i-normal-*-18-*-JISX0208.1983-0,
katakana-jisx0201:-alias-fixed-medium-i-normal-*-18-*-JISX0201.1976-0,
japanese-jisx0213-1:-alias-fixed-medium-i-normal-*-18-*-JISX0213.2000-1,
japanese-jisx0213-2:-alias-fixed-medium-i-normal-*-18-*-JISX0213.2000-2"
nil t)
)
)
$ sudo apt-get install ptex-base ptex-bin ptex-jisfonts $ sudo apt-get install jbibtex-bin jmpost mendexk $ sudo apt-get install dvipsk-ja dvi2ps # DVIをPSに変換 $ sudo apt-get install xdvik-ja gv gnome-gv # ビューワー $ sudo apt-get install okumura-clsfiles vfdata-morisawa5 dvi2ps-fontdesc-morisawa5 # クラスファイル $ sudo jisftconfig add
$ sudo apt-get install gs gs-esp gs-cjk-resource
$ sudo apt-get install dvipdfmx # DVIをPDFに変換
$ sudo apt-get install cmap-adobe-cns1 cmap-adobe-gb1
$ sudo apt-get install cmap-adobe-japan1 cmap-adobe-japan2
$ sudo apt-get install adobereader-jpn xpdf # PDFビューワー
CMAPINPUTS=.;/usr/share/fonts/cmap/adobe-japan1//;/usr/share/fonts/cmap/adobe-japan2//;/usr/share/fonts/cmap/adobe-gb1//;/usr/share/fonts/cmap/gs-cjk-resource//
f jis-cjk.map
最後に
$ update-texmf
必要な回数だけバイトコンパイルを行ったり、ファイルの削除を行うツール。BibTeXを使うときなどに重宝する。あまり有名じゃないのか?
$ unzip latexmk-307a.zip $ sudo cp latexmk.pl /usr/local/bin/latexmk $ sudo chmod +x /usr/local/bin/latexmk
$latex = 'platex'; $bibtex = 'jbibtex'; $dvipdf = 'dvipdfmx'; $dvips = 'dvips'; $ps2pdf = 'ps2pdf'; $pdf_previewer = 'acroread'; $ps_previewer = 'gv'; $dvi_previewer = 'xdvi-ja';
$ sudo apt-get install mplayer # 動画再生
$ sudo apt-get install xmms xmms-skins # 音楽再生
$ wget -c http://easylinux.info/uploads/xmms-wma_1.0.4-2_i386.deb
$ sudo dpkg -i xmms-wma_1.0.4-2_i386.deb
$ sudo apt-get install realplayer
$ sudo apt-get install streamtuner streamripper # インターネットラジオ
$ sudo apt-get install samba
########## Printing ########## # If you want to automatically load your printer list rather # than setting them up individually then you'll need this load printers = yes # lpr(ng) printing. You may wish to override the location of the # printcap file ; printing = bsd ; printcap name = /etc/printcap # CUPS printing. See also the cupsaddsmb(8) manpage in the # cupsys-client package. printing = cups printcap name = cups # When using [print$], root is implicitly a 'printer admin', but you can # also give this right to other users to add drivers and set printer # properties ; printer admin = @lpadmin
#======================= Share Definitions ======================= # Un-comment the following (and tweak the other settings below to suit) # to enable the default home directory shares. This will share each # user's home directory as \\server\username [homes] comment = Home Directories browseable = no # By default, \\server\username shares can be connected to by anyone # with access to the samba server. Un-comment the following parameter # to make sure that only "username" can connect to \\server\username ; valid users = %S # By default, the home directories are exported read-only. Change next # parameter to 'yes' if you want to be able to write to them. writable = yes # File creation mask is set to 0600 for security reasons. If you want to # create files with group=rw permissions, set next parameter to 0664. ; create mask = 0600 # Directory creation mask is set to 0700 for security reasons. If you want to # create dirs. with group=rw permissions, set next parameter to 0775. ; directory mask = 0700
$sudo smbpasswd -a username
$ sudo apt-get install apache2
ServerName localhost
LanguagePriority ja en da nl et fr de el it ko no pl pt pt-br ltz ca es sv tw # jaを前に #AddDefaultCharset ISO-8859-1 AddDefaultCharset none # これがないと勝手にcharset=UTF-8になる
NameVirtualHost *
# public host
<VirtualHost *>
ServerAdmin webmaster@my.domain
DocumentRoot /var/www/public/public_html
ServerName my.domain
ErrorLog /var/log/apache2/public-error.log
LogLevel warn
CustomLog /var/log/apache2/public-access.log combined
ServerSignature On
<Directory /var/www/public>
Options Indexes FollowSymLinks MultiViews ExecCGI Includes
AllowOverride FileInfo AuthConfig Limit Indexes Options
Order allow, deny
allow from all
</Directory>
</VirtualHost>
# local host
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/lan/local_html
ServerName lan.localhost
ErrorLog /var/log/apache2/lan-error.log
LogLevel warn
CustomLog /var/log/apache2/lan-access.log combined
ServerSignature On
<Directory /var/www/lan>
Options Indexes FollowSymLinks MultiViews ExecCGI Includes
AllowOverride FileInfo AuthConfig Limit Indexes Options
Order deny,allow
deny from all
allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
$ sudo apt-get install ssh
# Authentication: LoginGraceTime 120 PermitRootLogin no # rootではログイン不可 StrictModes yes
X11Forwarding no
$ ssh-keygen -t rsa $ cd .ssh/ $ cat id_rsa.pub >> authorized_key $ rm id_rsa.pub
公開鍵と秘密鍵をクライアント側にコピーする。あとは、Stray Penguin - Linux Memo (sshd)を参考にクライアント側の設定。
$ sudo apt-get install sylpheed
$ sudo apt-get install gftp
$ sudo apt-get install d4x
$ sudo aptitude install sun-java5-jre sun-java5-plugin
$ sudo aptitude install mozilla-acroread acroread-plugins
adobereader-jpnと同時にacroreadがインストールされてしまう?
sudo aptitude install mozilla-mplayer
$ sudo aptitude install libqt3-mt $ wget http://ftp.wayne.edu/opera/linux/910/final/en/i386/shared/opera_9.10-20061214.6-shared-qt_en_i386.deb $ sudo dpkg -i opera_9.10-20061214.6-shared-qt_en_i386.deb
Opera's language filesより言語ファイルをダウンロード。
AddDefaultCharset noneを加える。2008年5月19日
広告
広告