terminal 에서 emacs 실행시 한글 폰트 문제 및 한글 입출력 문제.
안녕하세요?
Kubuntu 6.10을 계산용 서버로 설정해서 사용하고 있습니다. (이 서버를 통상 A라고 칭하겠습니다.)
Mac OSX에서 A에 ssh로 접속을 해서 emacs (version 21.4.1) 를 터미널에서 구동시키고 emacs 내에서 계산용 프로그램(R-2.4.1)을 사용하고 있습니다.
지금 문제는 두가지가 발생했습니다.
1. 터미널에서는 한글입출력이 되지만, emacs에서 한글 입출력이 제대로 되지 않는다. (terminal 에서도, X에서도 제대로 되지 않습니다.) -> 이게 emacs에서 사용하는 한글 폰트를 설정하지 않아서 그런건지요? 그렇다면 어떻게 설정을 할 수 있습니까?
2. TeX 문서를 mac에서 사용하는 Aquamacs emacs에서 읽어들였을 때는 메뉴에 LaTeX, TeX 등등이 떠서 C-c C-c 등의 명령으로 TeX문서를 컴파일 할 수 있었는데, 터미널로 A에 접속해서 emacs로 TeX 문서를 열었을 때는 이러한 메뉴가 뜨지 않아서 문서 컴파일이 약간 번거롭습니다. -> A 서버의 site-lisp 디렉토리에 mac 에서 쓰고 있는 Aquamacs emacs 의 site-lisp 디렉토리 이하의 모든 파일을 복사해 놓으면 이 문제가 해결이 될까요?
터미널에 접속해서 몇몇 설정파일은 다음과 같습니다.
$ echo $TERM
xterm-color
$ echo $LANG
ko_KR.UTF-8
~/.emacs 파일은 다음과 같습니다.
-------------------------------------------------------------------------------------------
(require 'paren)
(setq-default auto-fill-hook 'do-auto-fill)
(setq auto-mode-alist (cons '("\\.r\\'" . R-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.tex\\'" . tex-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.c\\'" . c-mode) auto-mode-alist))
(global-font-lock-mode 1)
(setq font-lock-maximum-decoration '((R-mode . 3)))
(setq font-lock-maximum-decoration '((tex-mode . 3)))
(setq font-lock-maximum-decoration '((c-mode . 3)))
(transient-mark-mode 1)
(custom-set-variables
;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
'(case-fold-search t)
'(current-language-environment "UTF-8")
'(default-input-method "rfc1345")
'(global-font-lock-mode t nil (font-lock))
'(show-paren-mode t nil (paren))
'(transient-mark-mode t))
(custom-set-faces
;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
)
;; line number
(load-library "setnu.el")
(add-hook 'c-mode-hook 'turn-on-setnu-mode)
(add-hook 'text-mode-hook 'turn-on-setnu-mode)
(add-hook 'tex-mode-hook 'turn-on-setnu-mode)
(add-hook 'R-mode-hook 'turn-on-setnu-mode)
(setq make-backup-files t)
(setq version-control t)
(setq backup-directory-alist (quote ((".*" . "~/.emacs_backups/"))))
--------------------------------------------------------------------------------------
바쁘시겠지만 짬을 내주시면 고맙겠습니다.
다음 설정을 추가해 보세요
참고 : http://www.emacswiki.org/cgi-bin/wiki/EmacsForMacOS#EmacsForMacOS9
여전히 한글 입출력이 되지 않습니다.
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
를 ~/.emacs에 추가했는데도 여전히 한글 입출력이 되지 않습니다.
어디가 문제인 건가요?
해결했습니다.
emacs-snapshot 을 설치했더니 모든 문제가 깔끔하게 해결이 되는군요.
감사합니다.
입출력이 깨져
입출력이 깨져 보이는 buffer를 열고, M-x describe-coding-system 한 다음, 나오는 내용을 보여주시기 바랍니다.
아울러 emacs를 실행시키기 전 터미널에서 locale(1) 명령 실행 결과도 보여주시기 바랍니다.
--
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Korean Ver: http://www.cinsk.org/cfaqs/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Korean Ver: http://cinsk.github.io/cfaqs/
댓글 달기