Emacs, Terminus + 나눔고딕코딩 글꼴 설정


emulator002

$HOME/.emacs.el
(defun xftp (&optional frame)
"Return t if FRAME support XFT font backend."
(let ((xft-supported))
(mapc (lambda (x) (if (eq x 'xft) (setq xft-supported t)))
(frame-parameter frame 'font-backend))
xft-supported))

(when (xftp)
(let ((fontset "fontset-default"))
;; (set-default-font "Terminus 10")
;; (set-face-font 'default "Terminus 10")
(set-default-font "Terminus")
(set-face-font 'default "Terminus")
;; (set-fontset-font fontset 'latin
;; '("NanumGothicCoding" . "unicode-bmp"))
(set-fontset-font fontset 'hangul
'("NanumGothicCoding" . "unicode-bmp"))
(set-face-attribute 'default nil
:font fontset
:height 120)
))

광고

ssh client, 느린 접속 해결. (Solved too slow connect to server.)


add line,”AddressFamily inet”, on your $HOME/.ssh_config

This is my $HOME/.ssh_config


$ cat $HOME/.ssh_config

# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

Host *
# ForwardAgent no
# ForwardX11 no
# ForwardX11Trusted yes
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# GSSAPIKeyExchange no
# GSSAPITrustDNS no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
AddressFamily inet
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
SendEnv LANG LC_*
HashKnownHosts yes
# GSSAPIAuthentication yes
# GSSAPIDelegateCredentials no

Reference Sites :
[SOLVED] ssh slow to connect
Disabling SSH connections on ipv6

– EOP –

Emacs, 나눔글꼴, 한글입력을 위한 간단 설정


간단히 한글글꼴 설정, 배경설정, 내장입력기(세벌식최종) 사용에 대해서 간단히 설명하겠다.

1. emacs-snapshot 설치

% aptitude search emacs-snapshot
i emacs-snapshot - The GNU Emacs editor (development snapshot
i A emacs-snapshot-bin-common - GNU 이맥스 편집기의 아키텍처 의존 공유 파
i A emacs-snapshot-common - The GNU Emacs editor's common infrastructu
p emacs-snapshot-dbg - The GNU Emacs editor (debugging symbols)
i emacs-snapshot-el - GNU 이맥스 LISP(.el) 파일
i emacs-snapshot-gtk - The GNU Emacs editor (transitional package
p emacs-snapshot-nox - GNU 이맥스 편집기 (X 지원 없음)

2. ~/.emacs 파일 생성.

;; ================================================================================
;; 디렉토리 추가
;; ================================================================================
(setq load-path (nconc '("~/.emacs.d") load-path)) ;; load-path

;; ================================================================================
;; 한글 설정
;; ================================================================================
(require 'hangul)
(setq default-korean-keyboard "3f") ;; 3벌식 최종

;; ================================================================================
;; 기본 색 지정
;; ================================================================================
(set-foreground-color "wheat")
(set-background-color "DarkSlateGray")

;; ================================================================================
;; 영역 색 지정
;; ================================================================================
(set-face-foreground 'region "white")
(set-face-background 'region "cadetblue")

;; ================================================================================
;; person info
;; ================================================================================
(setq user-full-name "Hong Gil Dong")
(setq user-mail-address "hgdong@mail.com")

;; ================================================================================
;; 프레임 생성시 크기 설정
;; ================================================================================
(setq initial-frame-alist '((width . 50) (height . 35))) ;; 첫번째 프래임의 크기를 설정
(setq default-frame-alist '((width . 50) (height . 20))) ;; 그 다음 프래임의 크기를 설정

;; ================================================================================
;; 폰트 설정
;; ================================================================================
(defun xftp (&optional frame)
"Return t if FRAME support XFT font backend."
(let ((xft-supported))
(mapc (lambda (x) (if (eq x 'xft) (setq xft-supported t)))
(frame-parameter frame 'font-backend))
xft-supported))

(when (xftp)
(let ((fontset "fontset-default"))
(set-fontset-font fontset 'latin
'("NanumGothicCoding" . "unicode-bmp"))
(set-fontset-font fontset 'hangul
'("NanumGothicCoding" . "unicode-bmp"))
(set-face-attribute 'default nil
:font fontset
:height 90)))

[참고]
5.2 Xft Lisp Setting
http://wiki.kldp.org/wiki.php/EmacsChangeFonts#s-5.2

@ 고정폭글꼴을 잘 표현하기 위해서 latin과 hangul 모두 NanumGothicCoding 으로 했다.

3. ~/.emacs.d 디렉토리에 hangul.el 과 hanja-util.el 복사.

자료설명:
http://kldp.org/node/91578#comment-444755

다운로드 링크:
http://pds7.egloos.com/pds/200805/28/75/hangul.el.gz
http://pds7.egloos.com/pds/200805/30/75/hanja-util.el.gz

4. ~/.Xresources 에 Emacs 내장 입력기 사용을 위한 설정

% cat ~/.Xresources
Emacs.useXIM: off

– 끝 –

Emacs23, 글꼴(fonts), 내장 한글 입력 간단 설정.


* Emacs에서 내장 입력기 사용.
$HOME/.Xresources 파일 설정 (없으면 만든다.)
Emacs.useXIM: off

[참고] “.Xresources” 바로 적용하기.

$ xrdb -merge $HOME/.Xresources

* Emacs 설정 파일.
$HOME/.emacs.el
;; Korean/English Fonts
(when window-system
(set-default-font "Terminus 10")
(set-face-font 'default "Terminus 10") ;; for speedbar's font
; (set-fontset-font "fontset-default" 'hangul '("나눔고딕코딩" . "unicode-bmp"))
; (set-fontset-font "fontset-default" 'kana '("나눔고딕코딩" . "unicode-bmp"))
; (set-fontset-font "fontset-default" 'han '("나눔고딕코딩" . "unicode-bmp"))
; (set-fontset-font "fontset-default" 'cjk-misc '("나눔고딕코딩" . "unicode-bmp"))
(set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("돋움체" . "unicode-bmp")) ;;; 유니코드 한글영역
(set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("돋움체" . "unicode-bmp")) ;;;유니코드 사용자 영역
(set-frame-size (selected-frame) 120 70)
)

;; Color
(set-face-background 'default "DarkSlateGray")
(set-face-foreground 'default "wheat")
(set-face-foreground 'region "white")
; (set-face-background 'region "#254437")
(set-face-background 'region "cadetblue")

(setq load-path (cons (expand-file-name "~/.emacs.d/") load-path))

;; Hangul IME
(set-language-environment "Korean")
(require 'hangul)
; (set-input-method "korean-hangul3f") ;; if you want 3 beolsik final
(setq default-korean-keyboard "3f") ;; Shift+Space, also 3 beolsik final
(setq default-input-method "korean-hangul3f")
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8) ;; utf-8
; (global-set-key (kbd "S-SPC") 'toggle-korean-input-method) ;; if not working Shift+Space...

emacs_20091009_001