;; Emacs-Ubuntu Linux Mint 에서 4개 언어(한,영,중,러)를 입력할 때,
;; fcitx + ielm (emacs 내장 언어입력) 을 사용한다.
;;
;; fcitx 가 시스템 키 이벤트를 최초로 처리하므로,
;; 한글,중국어,러시아 를 추가하고, Ctrl+Shift 로 언어전환(기본설정)을 매핑한다.
;;
;; emacs 에서 입력에서 fcitx 는 중국어 입력상태에서 먼저 처리하므로
;; fcitx 에서는 중국어 입력상태로 두고 중국어를 입력하면 돼고,
;; emacs ielm 에서는 한글,러시아,영어를 입력 한다.
;; 영문은 ielm 에서 한글,Russian 상태에서 같은키로 toggle 로 바꿔서 입력한다.
;; -- russian start here
;(global-set-key (kbd "C-\\") 'toggle-russian-input-method)
;; -- v.1 colflict with korean dired
;;(set-language-environment "Cyrillic-CP1251")
;(defun my-russian-setup ()
; "Set up my private Russian environment."
; (if (equal current-language-environment "English")
; (setq default-input-method "Cyrillic-CP1251")))
;(add-hook 'set-language-environment-hook 'my-russian-setup)
;; -- already unsetted in upper section - (hangul-to-hanja-conversion)
;; (global-set-key (kbd "<Hangul_Hanja>")) ;<Hangul_Hanja> <- quail/hangul.elc
;; (global-unset-key [(f9)])
;; -- v.2
;; https://frageit.de/questions/12032231/is-it-possible-to-alternate-two-input-methods-in-emacs
;; Input method and key binding configuration.
(setq alternative-input-methods '(
("russian-computer" . [?\C-\\])
("chinese-py-punct" . [?\C-|])
("korean-hangul" . [?\C-']) ; ("korean-hangul" . [?\C-=])
("english" . [?\C-.])
; ("english-dvorak" . [?\C-.])
; ("korean-hangul" . "Hangul_Hanja")
; ("korean-hangul" . [?\C-m])
; ("german-postfix" . [?\C-\M-|])
))
(setq default-input-method
(caar alternative-input-methods))
(defun toggle-alternative-input-method (method &optional arg interactive)
(if arg
(toggle-input-method arg interactive)
(let ((previous-input-method current-input-method))
(when current-input-method
(deactivate-input-method))
(unless (and previous-input-method
(string= previous-input-method method))
(activate-input-method method)))))
(defun reload-alternative-input-methods ()
(dolist (config alternative-input-methods)
(let ((method (car config)))
(global-set-key (cdr config)
`(lambda (&optional arg interactive)
,(concat "Behaves similar to `toggle-input-method', but uses \""
method "\" instead of `default-input-method'")
(interactive "P\np")
(toggle-alternative-input-method ,method arg interactive))))))
(reload-alternative-input-methods)
;; -- russian ends here
Showing posts with label Emacs. Show all posts
Showing posts with label Emacs. Show all posts
Tuesday, October 23, 2018
Friday, July 20, 2018
installation - Linux mint 19 cinnamon 64bit
* Download Linux mint
- linuxmint.com
* make bootable usb image from iso file
usb-creator-gtk
* install
* update
* system restore
fstab
--
UID=c706ed66-7acf-4552-b994-1bb23791d43f /data xfs auto,defaults 0 0
* System Configuration - 시스템 설정
** 중국어(간체) -설치
1. 입력기 설치
2. 입력기 선택 Hagul, Pinyin 을 사용한다.
만약, Pinyin 대신 다른 중국어 입력을 사용하면 해당 입력기를 설치한다.
여기서는 Pinyin 을 사용하기 때문에 Pinyin 만 놔두고 Sunpinyin, Shuangpin, Wubi 는 삭제했다.
3. 입력기 선택 변경
- 변경 전 기본 설정
- 변경 후 설정
- linuxmint.com
* make bootable usb image from iso file
usb-creator-gtk
* install
* update
* system restore
fstab
--
UID=c706ed66-7acf-4552-b994-1bb23791d43f /data xfs auto,defaults 0 0
* System Configuration - 시스템 설정
** 중국어(간체) -설치
1. 입력기 설치
2. 입력기 선택 Hagul, Pinyin 을 사용한다.
만약, Pinyin 대신 다른 중국어 입력을 사용하면 해당 입력기를 설치한다.
여기서는 Pinyin 을 사용하기 때문에 Pinyin 만 놔두고 Sunpinyin, Shuangpin, Wubi 는 삭제했다.
3. 입력기 선택 변경
- 변경 전 기본 설정
- 변경 후 설정
Friday, March 31, 2017
Wednesday, March 29, 2017
Emacs Web Server
Emacs Web Server
http://nullprogram.com/blog/2009/05/17/May 17, 2009
The server log is lisp itself. Here is an example log starting the server, serving one request, and halting,
'(log
(start "Wed May 13 23:33:34 2009")
(connection
(date "Wed May 13 23:36:25 2009")
(address "192.168.0.3")
(get "/0001.html")
(req
("Referer" "http://192.168.0.2:8080/")
("Connection" "keep-alive")
("Keep-Alive" "300")
("Accept-Charset" "ISO-8859-1,utf-8;q=0.7,*;q=0.7")
("Accept-Encoding" "gzip,deflate")
("Accept-Language" "en-us,en;q=0.5")
("Accept" "image/png,image/*;q=0.8,*/*;q=0.5")
("User-Agent" "Mozilla/5.0 [...] Iceweasel/3.0.9 (Debian-3.0.9-1)")
("Host" "192.168.0.2:8080")
("GET" "/0001.html" "HTTP/1.1"))
(path "~/public_html/0001.html")
(status 200))
(stop "Wed May 13 23:38:17 2009"))
--
simple-httpd and impatient-mode
Friday, March 10, 2017
Tuesday, March 07, 2017
SQLite Source Code Blocks in Org Mode
SQLite Source Code Blocks in Org Mode--> http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-sqlite.html
# -*- coding: utf-8 -*-
#+STARTUP: content
#+LANGUAGE: ko
#+PROPERTY: header-args:sqlite :dir ~/org/ :db journal.db :var rel="cur" :results line :colnames yes
: header arguments -> :csv, :column, :line, :list, :html
: results -> silent raw
: separator \
※ 1. File scope variable which is name "#+PROPERTY" can be located any location of file.
※ 2. "#+PROPERTY" var will be initialize when file opening time.
(therefore, if you modify "#+PROPERTY" it can be use until reopen the file again!)
* sqlite org babel
[[http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-sqlite.html][guide_from orgmode.org]]
** emacs babel setup
#+TITLE: dot
#+begin_src elisp
(org-babel-do-load-languages
'org-babel-load-languages (quote ((emacs-lisp . t)
(sqlite . t)
(R . t)
(python . t))))
#+end_src
** Org Mode Features for SQLite Source Code Blocks
Header Arguments
Language-specific default values
There are no language-specific default header arguments for SQLite.
** Language-specific header arguments
There are 11 SQLite-specific header arguments.
db
a string with the name of the file that holds the SQLite database. Babel requires this header argument.
header
if present, turn on headers in the output format. Headers are also output with the header argument :colnames yes.
echo
if present, set the SQLite dot command .echo to ON.
bail
if present, set the SQLite dot command .bail to ON.
csv
the default SQLite output format for Babel SQLite source code blocks.
column
an SQLite output format that outputs a table-like form with whitespace between columns.
html
an SQLite output format that outputs query results as simple HTML tables.
line
an SQLite output format that outputs query results with one value per line.
list
an SQLite output format that outputs query results with the separator character between fields.
separator
a string that specifies the separator character used by the SQLite `list' output mode and by the SQLite dot command .import.
nullvalue
a string to use in place of NULL values.
** Variables
It is possible to pass variables to sqlite. Variables can be of type table or scalar. Variables are defined using :var=<value> and referred in the code block as $<name>.
Table variables
Table variables are exported as a temporary csv file that can then be imported by sqlite. The actual value of the variable is the name of temporary csv file.
Scalar variables
This is a value that will replace references to variable's name. String variables should be quoted; otherwise they are considered a table variable.
** Sessions
SQLite sessions are not supported.
** Result Types
SQLite source code blocks typically return the results of a query. The header arguments :csv, :column, :line, :list, and :html determine the output format.
: #+PROPERTY: header-args:sqlite :dir ~/org/ :db org.db :results list
* sample create
: #+name: sqlite-populate-test
: #+header: :results line
: #+header: :dir ~/tmp/
: #+header: :db hello.db
: #+begin_src sqlite
: create table greeting(one varchar(10), two varchar(10));
: insert into greeting values('Hello', 'world!');
: #+end_src
#+begin_src sqlite
create table greeting(one varchar(10), two varchar(10));
insert into greeting values('Hello', 'world!');
#+end_src
* sample query
: #+name: sqlite-hello
: #+header: :list
: #+header: :separator \
: #+header: :results raw
: #+header: :dir ~/tmp/
: #+header: :db hello.db
: #+begin_src sqlite
: select * from greeting;
: #+end_src
#+begin_src sqlite
select * from greeting;
#+end_src
#+RESULTS:
| one | two |
|-------+--------|
| Hello | world! |
* Using scalar variables
** using local var.
#+BEGIN_SRC sqlite :db ~/org/journal.db :var rel="tname" n=300 :colnames yes
drop table if exists $rel;
create table $rel(n int, id int);
insert into $rel(n,id) values (1,210), (3,800);
select * from $rel where id > $n;
#+END_SRC
#+RESULTS:
| n | id |
|---+-----|
| 3 | 800 |
** usign file var.
#+BEGIN_SRC sqlite :var n=300
drop table if exists $rel;
create table $rel(n int, id int);
insert into $rel(n,id) values (1,210), (3,800);
select * from $rel where id > $n;
#+END_SRC
#+RESULTS:
| n | id |
|---+-----|
| 3 | 800 |
* Using table variables
We can also pass a table to a query. In this case, the contents of the table are exported as a csv file that can then be imported into a relation:
** local var.
#+NAME: tableexample
| id | n |
|----+----|
| 1 | 5 |
| 2 | 9 |
| 3 | 10 |
| 4 | 9 |
| 5 | 10 |
#+begin_src sqlite :db ~/org/journal.db :var orgtable=tableexample :colnames yes
drop table if exists testtable;
create table testtable(id int, n int);
.mode csv testtable
.import $orgtable testtable
select n, count(*) from testtable group by n;
#+end_src
#+RESULTS:
| n | count(*) |
|----+----------|
| 5 | 1 |
| 9 | 2 |
| 10 | 2 |
** using global file var.
#+begin_src sqlite :var orgtable=tableexample
drop table if exists testtable;
create table testtable(id int, n int);
.mode csv testtable
.import $orgtable testtable
select n, count(*) from testtable group by n;
#+end_src
#+RESULTS:
| n | count(*) |
|----+----------|
| 5 | 1 |
| 9 | 2 |
| 10 | 2 |
Sunday, February 26, 2017
(require 'scala-mode-auto)
(require 'ensime)
#+RESULTS:
(add-to-list 'auto-mode-alist '("\\.sc$" . scala-mode))
(add-to-list 'auto-mode-alist '("\\.scala$" . scala-mode))
(add-hook 'scala-mode-hook 'ensime-mode)
(require 'ensime)
#+RESULTS:
(add-to-list 'auto-mode-alist '("\\.sc$" . scala-mode))
(add-to-list 'auto-mode-alist '("\\.scala$" . scala-mode))
(add-hook 'scala-mode-hook 'ensime-mode)
* org babel mode scala
#+begin_src scala :exports both :results output
def helloworld() = {
println("Hello there")
println("한글로처리2")
}
helloworld()
#+end_src
: Hello there
: 한글로처리2
#+begin_src scala :exports both :results output
def helloworld() = {
println("Hello there")
println("한글로처리2")
}
helloworld()
#+end_src
: Hello there
: 한글로처리2
emacs - org babel mode - using paramer ex. sql (from:Introduction to Literate Programming)
--> from:
http://www.howardism.org/Technical/Emacs/literate-programming-tutorial.html
* example-1. use parameter in the document level defind '#+PROPERTY'
http://www.howardism.org/Technical/Emacs/literate-programming-tutorial.html
Introduction to Literate Programming
Welcome to a brief tutorial on literate programming in org-mode.
The following began as the basis for a workshop for the PDX Emacs Hackers meetup, but since everyone couldn’t attend, I decided to expand it into a tutorial. I assume you understand the basics of Emacs and as well as familiarity with org-mode for creating exported documents.
As you probably know, Org is pretty large, and the features for writing, evaluating and connecting blocks of source code in a document are extensive, and documenting them all is a daunting task. I hope this tutorial is a good start, but if I glossed over something you feel I should include, please let me know.
Warning: The examples are pretty lame.
--
# -*- coding: utf-8 -*-
#+STARTUP: content
#+LANGUAGE: ko
#+PROPERTY: header-args:sql :engine postgresql :export results :cmdline -p 5432 -h localhost -U kys -d emacsdb PGPASSWORD=pass1234
* example-1. use parameter in the document level defind '#+PROPERTY'
#+BEGIN_SRC sql
select eng_name, title, fullname from springschema.phonebook;
#+END_SRC
#+RESULTS:
** example-2. use parameter in the org-heading section of ':PROPERTIES:'
select eng_name, title, fullname from springschema.phonebook;
#+END_SRC
#+RESULTS:
| eng_name | title | fullname |
|-----------+-------+----------|
| So Wonju | 대리 | 지원호 |
| Mr.Jung | 사원 | 김지원 |
..
|-----------+-------+----------|
| So Wonju | 대리 | 지원호 |
| Mr.Jung | 사원 | 김지원 |
..
** example-2. use parameter in the org-heading section of ':PROPERTIES:'
:PROPERTIES:
:LANGUAGE: sql
:engine: postgresql
:exports: results
:cmdline: -p 5432 -h localhost -U kys -d emacsdb PGPASSWORD=pass1234
:END:
#+begin_src sql
select eng_name, title, fullname from springschema.phonebook;
select "select version()";
#+end_src
#+RESULTS:
| eng_name | title | fullname |
|-----------+-------+----------|
| So Wonju | 대리 | 지원호 |
| Mr.Jung | 사원 | 김지원 |
..
* example-3. use in specified src block values
#+BEGIN_SRC sql :engine postgresql :exports results :cmdline -p 5432 -h localhost -U kys -d emacsdb PGPASSWORD=pass123
select eng_name, title, fullname from springschema.phonebook;
#+END_SRC
#+RESULTS:
| eng_name | title | fullname |
|-----------+-------+----------|
| So Wonju | 대리 | 지원호 |
| Mr.Jung | 사원 | 김지원 |
:LANGUAGE: sql
:engine: postgresql
:exports: results
:cmdline: -p 5432 -h localhost -U kys -d emacsdb PGPASSWORD=pass1234
:END:
#+begin_src sql
select eng_name, title, fullname from springschema.phonebook;
select "select version()";
#+end_src
#+RESULTS:
| eng_name | title | fullname |
|-----------+-------+----------|
| So Wonju | 대리 | 지원호 |
| Mr.Jung | 사원 | 김지원 |
..
* example-3. use in specified src block values
#+BEGIN_SRC sql :engine postgresql :exports results :cmdline -p 5432 -h localhost -U kys -d emacsdb PGPASSWORD=pass123
select eng_name, title, fullname from springschema.phonebook;
#+END_SRC
| eng_name | title | fullname |
|-----------+-------+----------|
| So Wonju | 대리 | 지원호 |
| Mr.Jung | 사원 | 김지원 |
※ :results:output 가 있으면 raw 로 encoding 없이 출력된다.
(※ ':results:output' means output without encoding)
Thursday, February 23, 2017
Font for Emacs - Korean, Chinese-Hanyu
> chinese font
(set-fontset-font fontset 'hangul '("Gulim" . "unicode-bmp"))
> korean font
(set-fontset-font fontset 'hangul '("NanumBarunGothic" . "unicode-bmp"))
> japnese font
;; -- 0
;(set-face-font 'default "Monaco-12")
;(set-fontset-font "fontset-default" '(#x1100 . #xffdc) "NanumGothicOTF-15")
;(set-fontset-font "fontset-default" 'kana "Hiragino Kaku Gothic Pro-14")
;(set-fontset-font "fontset-default" 'han "Hiragino Kaku Gothic Pro-14")
(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 (string-equal my-system-is "MAC")
(set-face-attribute 'default nil :family "DejaVu Sans Mono" :height 160) ; 140
; (set-face-font 'default "Monaco-14") ; 12
; (set-face-attribute 'default nil :height 160)
; (face-remap-add-relative 'default :family "Bitstrem Vera Sans Mono" :height 180)
;; -- 1
(set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("DejaVu Sans Mono" . "iso10646-1"))
; (set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("나눔고딕코딩" . "iso10646-1"))
;(set-fontset-font "fontset-default" 'latin '("Monaco-14" . "unicode-bmp"))
;(set-fontset-font t 'latin (font-spec :family "나눔고딕코딩" :size 18)) ; 16
;(set-fontset-font "fontset-default" 'latin (font-spec :family "NanumGothicCoding" :size 22))
;(set-fontset-font "fontset-default" 'latin (font-spec :family "Bitstrem Vera Sans Mono" :size 22))
(set-fontset-font "fontset-default" 'latin (font-spec :family "DejaVu Sans Mono" :size 22))
;; -- 2
(set-fontset-font "fontset-default" 'han (font-spec :family "STHeiti" :size 24))
;(set-fontset-font "fontset-default" 'han (font-spec :family "Microsoft YaHei" :size 24))
;; -- 3
;(set-fontset-font "fontset-default" 'kana (font-spec :family "STSong-24" :size 22))
; (set-fontset-font "fontset-default" 'kana (font-spec :family "Monaco-16" :size 22))
;; -- 4
(set-fontset-font "fontset-default" 'hangul (font-spec :family "나눔고딕코딩" :size 14))
)
(when (string-equal my-system-is "GIG")
; (set-face-font 'default "Monaco-12")
;; bad
; (set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("NANumGothicCoding" . "unicode-bmp"))
; (set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("NanumGothicCoding" . "unicode-bmp"))
;; bad
; (set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("NanumGothicOTF" . "iso10646-1"))
; (set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("NanumGothicOTF" . "iso10646-1"))
(set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("NanumBarunGothic" . "iso10646-1"))
(set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("NanumBarunGothic" . "iso10646-1"))
(set-fontset-font "fontset-default" 'kana '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'japanese-jisx0208 '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'katakana-jisx0201 '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'han '("Microsoft YaHei". "unicode-bmp"))
;(set-fontset-font "fontset-default" 'han '("NanumGothicCoding". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'cjk-misc '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'bopomofo '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font "fontset-default" 'gb18030 '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'symbol '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font t 'han (font-spec :family "Microsoft Yahei" :size 16))
;(set-fontset-font t 'han (font-spec :family "NanumGothicCoding" :size 16))
(setq face-font-rescale-alist '(("Microsoft Yahei" . 1.4) ("WenQuanYi Zen Hei" . 1.4)))
;; -- this xfp will crash !!
; (when (xftp)
; (let ((fontset "fontset-default"))
; (set-fontset-font fontset 'latin '("DejaVu Sans Mono" . "unicode-bmp"))
; ; (set-fontset-font fontset 'latin '("NanumGothicCoding" . "unicode-bmp"))
;
; ; (set-fontset-font fontset 'hangul '("NanumGothicCoding" . "unicode-bmp"))
; (set-fontset-font fontset 'hangul '("SeoulHangangB" . "unicode-bmp"))
; ; (set-fontset-font fontset 'hangul '("SeoulNamsanM" . "unicode-bmp"))
;
; (set-face-attribute 'default nil :font fontset :height 110)
; )
; )
(when (xftp)
(let ((fontset "fontset-default"))
; (set-fontset-font fontset 'latin '("DejaVu Sans Mono" . "unicode-bmp"))
(set-fontset-font fontset 'latin '("DejaVu Sans Mono-14" . "unicode-bmp"))
; ; (set-fontset-font fontset 'latin '("NanumGothicCoding" . "unicode-bmp"))
;
; (set-fontset-font fontset 'hangul '("Gulim" . "unicode-bmp"))
(set-fontset-font fontset 'hangul '("NanumBarunGothic" . "unicode-bmp"))
; (set-fontset-font fontset 'hangul '("Gulim" . "unicode-bmp"))
; (set-fontset-font fontset 'hangul '("NanumGothicCoding" . "unicode-bmp"))
; (set-fontset-font fontset 'hangul '("SeoulHangangB" . "unicode-bmp"))
; ; (set-fontset-font fontset 'hangul '("SeoulNamsanM" . "unicode-bmp"))
;
; (set-face-attribute 'default nil :font fontset :height 110)
)
)
;; -- this xfp not tested
; (when (xftp)
; (let ((fontset "fontset-default"))
; (set-fontset-font fontset 'latin '("DejaVu Sans Mono" . "unicode-bmp"))
; ; (set-fontset-font fontset 'latin '("NanumGothicCoding" . "unicode-bmp"))
;
; ; (set-fontset-font fontset 'hangul '("NanumGothicCoding" . "unicode-bmp"))
; (set-fontset-font fontset 'hangul '("SeoulHangangB" . "unicode-bmp"))
; ; (set-fontset-font fontset 'hangul '("SeoulNamsanM" . "unicode-bmp"))
;
; (set-face-attribute 'default nil :font fontset :height 110)
; )
; )
)
;;;; ----------------------------------------------------------------------
;; test -- 1
(cond
((string-equal system-type "windows-nt") ; Microsoft Windows
(when (member "DejaVu Sans Mono" (font-family-list))
(add-to-list 'initial-frame-alist '(font . "DejaVu Sans Mono-12"))
(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12"))
)
)
((string-equal system-type "darwin") ; Mac OS X
(when (member "DejaVu Sans Mono" (font-family-list))
(add-to-list 'initial-frame-alist '(font . "DejaVu Sans Mono-12"))
(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12")))
)
((string-equal system-type "gnu/linux") ; linux
(when (member "DejaVu Sans Mono" (font-family-list))
(add-to-list 'initial-frame-alist '(font . "DejaVu Sans Mono-12"))
(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12"))
; (set-face-attribute 'default nil :family "Source Code Pro" :height 130) ; 120
)
)
)
;;;; ----------------------------------------------------------------------
;; test -- 2
;; -- this is DejaVu Good looking
;(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12"))
;(set-frame-font "DejaVu Sans Mono-12" nil t)
;; -- not as good as DejaVu - its test now
(add-to-list 'default-frame-alist '(font . "Source Code Pro-13"))
(set-frame-font "Source Code Pro-13" nil t)
;; -- not as good it's just old fashion style
;(add-to-list 'default-frame-alist '(font . "lucidasanstypewriter-12"))
;(set-frame-font "lucidasanstypewriter-12" nil t)
(set-face-attribute 'default nil :family "Source Code Pro" :height 130) ; 120
;;;; ----------------------------------------------------------------------
(defun my-font-middle () (interactive)
(set-face-font 'default "Monaco-12")
(set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("NanumGothicOTF" . "iso10646-1"))
(set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("NanumGothicOTF" . "iso10646-1"))
(set-fontset-font "fontset-default" 'kana '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'japanese-jisx0208 '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'katakana-jisx0201 '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'han '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'cjk-misc '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'bopomofo '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font "fontset-default" 'gb18030 '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'symbol '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font t 'han (font-spec :family "Microsoft Yahei" :size 16))
(setq face-font-rescale-alist '(("Microsoft Yahei" . 1.4) ("WenQuanYi Zen Hei" . 1.4)))
)
(defun my-font-big ()
(interactive)
(set-face-font 'default "Monaco-14")
(set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("NanumGothicOTF" . "iso10646-1"))
(set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("NanumGothicOTF" . "iso10646-1"))
; (set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("NanumGothicCoding" . "iso10646-1"))
; (set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("NanumGothicCoding" . "iso10646-1"))
(set-fontset-font "fontset-default" 'kana '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'japanese-jisx0208 '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'katakana-jisx0201 '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'han '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'cjk-misc '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'bopomofo '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font "fontset-default" 'gb18030 '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'symbol '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font t 'han (font-spec :family "Microsoft Yahei" :size 16))
(setq face-font-rescale-alist '(("Microsoft Yahei" . 1.6) ("WenQuanYi Zen Hei" . 1.6)))
)
;(my-font-big)
;(my-font-middle)
;; M-x list-fonts
(set-fontset-font fontset 'hangul '("Gulim" . "unicode-bmp"))
> korean font
(set-fontset-font fontset 'hangul '("NanumBarunGothic" . "unicode-bmp"))
> japnese font
;(set-face-font 'default "Monaco-12")
;(set-fontset-font "fontset-default" '(#x1100 . #xffdc) "NanumGothicOTF-15")
;(set-fontset-font "fontset-default" 'kana "Hiragino Kaku Gothic Pro-14")
;(set-fontset-font "fontset-default" 'han "Hiragino Kaku Gothic Pro-14")
(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 (string-equal my-system-is "MAC")
(set-face-attribute 'default nil :family "DejaVu Sans Mono" :height 160) ; 140
; (set-face-font 'default "Monaco-14") ; 12
; (set-face-attribute 'default nil :height 160)
; (face-remap-add-relative 'default :family "Bitstrem Vera Sans Mono" :height 180)
;; -- 1
(set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("DejaVu Sans Mono" . "iso10646-1"))
; (set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("나눔고딕코딩" . "iso10646-1"))
;(set-fontset-font "fontset-default" 'latin '("Monaco-14" . "unicode-bmp"))
;(set-fontset-font t 'latin (font-spec :family "나눔고딕코딩" :size 18)) ; 16
;(set-fontset-font "fontset-default" 'latin (font-spec :family "NanumGothicCoding" :size 22))
;(set-fontset-font "fontset-default" 'latin (font-spec :family "Bitstrem Vera Sans Mono" :size 22))
(set-fontset-font "fontset-default" 'latin (font-spec :family "DejaVu Sans Mono" :size 22))
;; -- 2
(set-fontset-font "fontset-default" 'han (font-spec :family "STHeiti" :size 24))
;(set-fontset-font "fontset-default" 'han (font-spec :family "Microsoft YaHei" :size 24))
;; -- 3
;(set-fontset-font "fontset-default" 'kana (font-spec :family "STSong-24" :size 22))
; (set-fontset-font "fontset-default" 'kana (font-spec :family "Monaco-16" :size 22))
;; -- 4
(set-fontset-font "fontset-default" 'hangul (font-spec :family "나눔고딕코딩" :size 14))
)
(when (string-equal my-system-is "GIG")
; (set-face-font 'default "Monaco-12")
;; bad
; (set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("NANumGothicCoding" . "unicode-bmp"))
; (set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("NanumGothicCoding" . "unicode-bmp"))
;; bad
; (set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("NanumGothicOTF" . "iso10646-1"))
; (set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("NanumGothicOTF" . "iso10646-1"))
(set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("NanumBarunGothic" . "iso10646-1"))
(set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("NanumBarunGothic" . "iso10646-1"))
(set-fontset-font "fontset-default" 'kana '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'japanese-jisx0208 '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'katakana-jisx0201 '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'han '("Microsoft YaHei". "unicode-bmp"))
;(set-fontset-font "fontset-default" 'han '("NanumGothicCoding". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'cjk-misc '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'bopomofo '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font "fontset-default" 'gb18030 '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'symbol '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font t 'han (font-spec :family "Microsoft Yahei" :size 16))
;(set-fontset-font t 'han (font-spec :family "NanumGothicCoding" :size 16))
(setq face-font-rescale-alist '(("Microsoft Yahei" . 1.4) ("WenQuanYi Zen Hei" . 1.4)))
;; -- this xfp will crash !!
; (when (xftp)
; (let ((fontset "fontset-default"))
; (set-fontset-font fontset 'latin '("DejaVu Sans Mono" . "unicode-bmp"))
; ; (set-fontset-font fontset 'latin '("NanumGothicCoding" . "unicode-bmp"))
;
; ; (set-fontset-font fontset 'hangul '("NanumGothicCoding" . "unicode-bmp"))
; (set-fontset-font fontset 'hangul '("SeoulHangangB" . "unicode-bmp"))
; ; (set-fontset-font fontset 'hangul '("SeoulNamsanM" . "unicode-bmp"))
;
; (set-face-attribute 'default nil :font fontset :height 110)
; )
; )
(when (xftp)
(let ((fontset "fontset-default"))
; (set-fontset-font fontset 'latin '("DejaVu Sans Mono" . "unicode-bmp"))
(set-fontset-font fontset 'latin '("DejaVu Sans Mono-14" . "unicode-bmp"))
; ; (set-fontset-font fontset 'latin '("NanumGothicCoding" . "unicode-bmp"))
;
; (set-fontset-font fontset 'hangul '("Gulim" . "unicode-bmp"))
(set-fontset-font fontset 'hangul '("NanumBarunGothic" . "unicode-bmp"))
; (set-fontset-font fontset 'hangul '("Gulim" . "unicode-bmp"))
; (set-fontset-font fontset 'hangul '("NanumGothicCoding" . "unicode-bmp"))
; (set-fontset-font fontset 'hangul '("SeoulHangangB" . "unicode-bmp"))
; ; (set-fontset-font fontset 'hangul '("SeoulNamsanM" . "unicode-bmp"))
;
; (set-face-attribute 'default nil :font fontset :height 110)
)
)
;; -- this xfp not tested
; (when (xftp)
; (let ((fontset "fontset-default"))
; (set-fontset-font fontset 'latin '("DejaVu Sans Mono" . "unicode-bmp"))
; ; (set-fontset-font fontset 'latin '("NanumGothicCoding" . "unicode-bmp"))
;
; ; (set-fontset-font fontset 'hangul '("NanumGothicCoding" . "unicode-bmp"))
; (set-fontset-font fontset 'hangul '("SeoulHangangB" . "unicode-bmp"))
; ; (set-fontset-font fontset 'hangul '("SeoulNamsanM" . "unicode-bmp"))
;
; (set-face-attribute 'default nil :font fontset :height 110)
; )
; )
)
;;;; ----------------------------------------------------------------------
;; test -- 1
(cond
((string-equal system-type "windows-nt") ; Microsoft Windows
(when (member "DejaVu Sans Mono" (font-family-list))
(add-to-list 'initial-frame-alist '(font . "DejaVu Sans Mono-12"))
(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12"))
)
)
((string-equal system-type "darwin") ; Mac OS X
(when (member "DejaVu Sans Mono" (font-family-list))
(add-to-list 'initial-frame-alist '(font . "DejaVu Sans Mono-12"))
(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12")))
)
((string-equal system-type "gnu/linux") ; linux
(when (member "DejaVu Sans Mono" (font-family-list))
(add-to-list 'initial-frame-alist '(font . "DejaVu Sans Mono-12"))
(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12"))
; (set-face-attribute 'default nil :family "Source Code Pro" :height 130) ; 120
)
)
)
;;;; ----------------------------------------------------------------------
;; test -- 2
;; -- this is DejaVu Good looking
;(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12"))
;(set-frame-font "DejaVu Sans Mono-12" nil t)
;; -- not as good as DejaVu - its test now
(add-to-list 'default-frame-alist '(font . "Source Code Pro-13"))
(set-frame-font "Source Code Pro-13" nil t)
;; -- not as good it's just old fashion style
;(add-to-list 'default-frame-alist '(font . "lucidasanstypewriter-12"))
;(set-frame-font "lucidasanstypewriter-12" nil t)
(set-face-attribute 'default nil :family "Source Code Pro" :height 130) ; 120
;;;; ----------------------------------------------------------------------
(defun my-font-middle () (interactive)
(set-face-font 'default "Monaco-12")
(set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("NanumGothicOTF" . "iso10646-1"))
(set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("NanumGothicOTF" . "iso10646-1"))
(set-fontset-font "fontset-default" 'kana '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'japanese-jisx0208 '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'katakana-jisx0201 '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'han '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'cjk-misc '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'bopomofo '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font "fontset-default" 'gb18030 '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'symbol '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font t 'han (font-spec :family "Microsoft Yahei" :size 16))
(setq face-font-rescale-alist '(("Microsoft Yahei" . 1.4) ("WenQuanYi Zen Hei" . 1.4)))
)
(defun my-font-big ()
(interactive)
(set-face-font 'default "Monaco-14")
(set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("NanumGothicOTF" . "iso10646-1"))
(set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("NanumGothicOTF" . "iso10646-1"))
; (set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("NanumGothicCoding" . "iso10646-1"))
; (set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("NanumGothicCoding" . "iso10646-1"))
(set-fontset-font "fontset-default" 'kana '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'japanese-jisx0208 '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'katakana-jisx0201 '("Hiragino Kaku Gothic Pro" . "iso10646-1"))
(set-fontset-font "fontset-default" 'han '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'cjk-misc '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'bopomofo '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font "fontset-default" 'gb18030 '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'symbol '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font t 'han (font-spec :family "Microsoft Yahei" :size 16))
(setq face-font-rescale-alist '(("Microsoft Yahei" . 1.6) ("WenQuanYi Zen Hei" . 1.6)))
)
;(my-font-big)
;(my-font-middle)
;; M-x list-fonts
Thursday, January 17, 2013
newsticker
; ------ start of newsticker > newsticker-start, newsticker-show-news -------
;(setq load-path (append load-path (list "C:/Emacs/lib/newsticker")))
(autoload 'newsticker-start "newsticker" "Emacs Newsticker" t)
(autoload 'newsticker-show-news "newsticker" "Emacs Newsticker" t)
(add-hook 'newsticker-mode-hook 'imenu-add-menubar-index)
(setq newsticker-groups-filename
"~/newsticker/conf/newsticker-groups")
(setq newsticker-imagecache-dirname
"~/newsticker/images")
(setq newsticker-dir "~/newsticker/ticker")
(setq newsticker-automatically-mark-items-as-old t)
(setq newsticker-automatically-mark-visited-items-as-old t)
(setq newsticker-retrieval-interval 600)
(setq newsticker-html-renderer (quote w3m-region))
(setq newsticker-retrieval-method (quote extern))
(setq newsticker-treeview-treewindow-width 20) ; 30
(setq newsticker-treeview-listwindow-height 12) ; 30
(setq newsticker-wget-arguments (quote ("-q" "-O" "-"
"--user-agent" "testing")))
(custom-set-variables
'(newsticker-display-interval 15.3)
'(newsticker-keep-obsolete-items nil)
'(newsticker-scroll-smoothly nil)
'(newsticker-sort-method (quote sort-by-time))
'(newsticker-url-list
(quote
(
("codeproject" "http://www.codeproject.com/webservices/articlerss.aspx?cat=3" nil nil nil)
("codeplex" "http://www.codeplex.com/rss.ashx" nil nil nil)
("codeguro csharp" "http://feeds.feedburner.com/codeguru/csharp" nil nil nil)
("경향신문" "http://www.khan.co.kr/rss/rssdata/total_news.xml" nil nil nil)
("연합뉴스" "http://www.yonhapnews.co.kr/RSS/sokbo.xml" nil nil nil)
("구글" "http://news.google.com/news?pz=1&ned=kr&hl=ko&output=rss" nil nil nil)
("다음전체" "http://media.daum.net/rss/today/primary/all/rss2.xml" nil nil nil)
("오마이뉴스" "http://rss.ohmynews.com/rss/ohmynews.xml" nil nil nil)
; ("조선" "http://www.chosun.com/site/data/rss/rss.xml" nil nil nil)
("BBC News" "http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/front_page/rss091.xml" nil nil nil)
("The Inquirer" "http://www.theinquirer.net/inquirer.rss" nil nil nil)
("zdnet All" "http://feeds2.feedburner.com/ZDNetBlogs" nil nil nil)
("zdnet screen" "http://i.zdnet.com/xml/zdnet.xml?tag=nl.e550" nil nil nil)
("zdnet whitepaper" "http://whitepapers.zdnet.com/?mode=rss" nil nil nil)
("zdnet review" "http://reviews-search.zdnet.com/index.php?k=1&mode=rss" nil nil nil)
("zdnet opnsrc" "http://www.zdnet.com/topics/open+source?o=1&mode=rss" nil nil nil)
("zdner-kr" "http://feeds.feedburner.com/zdnet_kr_news" nil nil nil)
("slashdot Dev" "http://developers.slashdot.org/developers.rss" nil nil nil)
; ("bbs.kldp" "http://kldp.net/export/rss_sfnews.php" nil nil nil)
; ("emacs help" "http://rss.gmane.org/gmane.emacs.help" nil nil nil)
; ("msdn Forum" "http://www.microsoft.com/feeds/msdn/en-us/rss.xml" nil nil nil)
)
)
)
'(newsticker-url-list-defaults
(quote
(
("LWN (Linux Weekly News)" "http://lwn.net/headlines/rss")
("Quote of the day" "http://www.quotationspage.com/data/qotd.rss" "07:00" 86400)
("The Register" "http://www.theregister.co.uk/tonys/slashdot.rdf")
("slashdot" "http://slashdot.org/index.rss" nil 3600)
("Wired News" "http://www.wired.com/news_drop/netcenter/netcenter.rdf")
; ("Emacs Wiki" "http://www.emacswiki.org/cgi-bin/wiki.pl?action=rss" nil 3600)
; ("database sa" "http://database.sarang.net/rss.php")
)
)
)
'(newsticker-use-full-width nil)
'(transient-mark-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.
;'(newsticker-feed-face ((t (:foreground "red" :slant normal :weight bold :height 1.3 :family "helvetica"))))
'(newsticker-feed-face ((t (:foreground "red" :slant normal :weight bold :height 1.2 :family "나눔고딕"))))
'(newsticker-new-item-face ((t (:foreground "blue" :weight bold))))
'(newsticker-old-item-face ((t (:weight bold))))
)
; --------------- end of newsticker ---------------
;(setq load-path (append load-path (list "C:/Emacs/lib/newsticker")))
(autoload 'newsticker-start "newsticker" "Emacs Newsticker" t)
(autoload 'newsticker-show-news "newsticker" "Emacs Newsticker" t)
(add-hook 'newsticker-mode-hook 'imenu-add-menubar-index)
(setq newsticker-groups-filename
"~/newsticker/conf/newsticker-groups")
(setq newsticker-imagecache-dirname
"~/newsticker/images")
(setq newsticker-dir "~/newsticker/ticker")
(setq newsticker-automatically-mark-items-as-old t)
(setq newsticker-automatically-mark-visited-items-as-old t)
(setq newsticker-retrieval-interval 600)
(setq newsticker-html-renderer (quote w3m-region))
(setq newsticker-retrieval-method (quote extern))
(setq newsticker-treeview-treewindow-width 20) ; 30
(setq newsticker-treeview-listwindow-height 12) ; 30
(setq newsticker-wget-arguments (quote ("-q" "-O" "-"
"--user-agent" "testing")))
(custom-set-variables
'(newsticker-display-interval 15.3)
'(newsticker-keep-obsolete-items nil)
'(newsticker-scroll-smoothly nil)
'(newsticker-sort-method (quote sort-by-time))
'(newsticker-url-list
(quote
(
("codeproject" "http://www.codeproject.com/webservices/articlerss.aspx?cat=3" nil nil nil)
("codeplex" "http://www.codeplex.com/rss.ashx" nil nil nil)
("codeguro csharp" "http://feeds.feedburner.com/codeguru/csharp" nil nil nil)
("경향신문" "http://www.khan.co.kr/rss/rssdata/total_news.xml" nil nil nil)
("연합뉴스" "http://www.yonhapnews.co.kr/RSS/sokbo.xml" nil nil nil)
("구글" "http://news.google.com/news?pz=1&ned=kr&hl=ko&output=rss" nil nil nil)
("다음전체" "http://media.daum.net/rss/today/primary/all/rss2.xml" nil nil nil)
("오마이뉴스" "http://rss.ohmynews.com/rss/ohmynews.xml" nil nil nil)
; ("조선" "http://www.chosun.com/site/data/rss/rss.xml" nil nil nil)
("BBC News" "http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/front_page/rss091.xml" nil nil nil)
("The Inquirer" "http://www.theinquirer.net/inquirer.rss" nil nil nil)
("zdnet All" "http://feeds2.feedburner.com/ZDNetBlogs" nil nil nil)
("zdnet screen" "http://i.zdnet.com/xml/zdnet.xml?tag=nl.e550" nil nil nil)
("zdnet whitepaper" "http://whitepapers.zdnet.com/?mode=rss" nil nil nil)
("zdnet review" "http://reviews-search.zdnet.com/index.php?k=1&mode=rss" nil nil nil)
("zdnet opnsrc" "http://www.zdnet.com/topics/open+source?o=1&mode=rss" nil nil nil)
("zdner-kr" "http://feeds.feedburner.com/zdnet_kr_news" nil nil nil)
("slashdot Dev" "http://developers.slashdot.org/developers.rss" nil nil nil)
; ("bbs.kldp" "http://kldp.net/export/rss_sfnews.php" nil nil nil)
; ("emacs help" "http://rss.gmane.org/gmane.emacs.help" nil nil nil)
; ("msdn Forum" "http://www.microsoft.com/feeds/msdn/en-us/rss.xml" nil nil nil)
)
)
)
'(newsticker-url-list-defaults
(quote
(
("LWN (Linux Weekly News)" "http://lwn.net/headlines/rss")
("Quote of the day" "http://www.quotationspage.com/data/qotd.rss" "07:00" 86400)
("The Register" "http://www.theregister.co.uk/tonys/slashdot.rdf")
("slashdot" "http://slashdot.org/index.rss" nil 3600)
("Wired News" "http://www.wired.com/news_drop/netcenter/netcenter.rdf")
; ("Emacs Wiki" "http://www.emacswiki.org/cgi-bin/wiki.pl?action=rss" nil 3600)
; ("database sa" "http://database.sarang.net/rss.php")
)
)
)
'(newsticker-use-full-width nil)
'(transient-mark-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.
;'(newsticker-feed-face ((t (:foreground "red" :slant normal :weight bold :height 1.3 :family "helvetica"))))
'(newsticker-feed-face ((t (:foreground "red" :slant normal :weight bold :height 1.2 :family "나눔고딕"))))
'(newsticker-new-item-face ((t (:foreground "blue" :weight bold))))
'(newsticker-old-item-face ((t (:weight bold))))
)
; --------------- end of newsticker ---------------
Using the Emacs Keyboard Layout
Link From: http://visualstudiogallery.msdn.microsoft.com/09dc58c4-6f47-413a-9176-742be7463f92/
** General Shortcut Keys
Edit.EmacsExtendedCommand is ALT + X
Places the cursor in the Find/Command box on the Standard toolbar.
Edit.EmacsFindReplace is SHIFT + ALT + 5
Displays the replace options in the Quick tab of the Find and Replace dialog box.
Edit.EmacsPasteRotate is ALT + Y
Pastes an item from the Clipboard Ring tab of the Toolbox to the file
and automatically selects the pasted item. Press ALT + Y again to
paste the next item to the Clipboard Ring.
Edit.EmacsQuit is CTRL + G
Stops the current command or code and deactivates the region.
Edit.EmacsUniversalArgument > CTRL + U
Prompts for an integer, returns negative if the first character
entered is a hyphen. When a non-digit character is entered, the prefix
for the command is set to the entered integer. If no integer is
entered, the default value is 4. Repeatedly invoking the command
multiplies the current value entered by the previous accumulated
value.
** Text Manipulation
- Edit.EmacsBreakLine: ENTER
Inserts a new line.
- Edit.EmacsBreakLineIndent: CTRL + J
Inserts a new line and indents it.
- Edit.EmacsCharTranspose: CTRL + T
Transposes the characters on either side of the cursor. For example,
Ed|n Sub would be changed to read End| Sub.
- Edit.EmacsDeleteSelection: CTRL + DELETE
Deletes the current selection.
- Edit.EmacsDeleteToEOL: CTRL + K
Deletes from the cursor to the end of the current line.
- Edit.EmacsLineOpen: CTRL + O
Inserts a new line after the cursor. The cursor stays in the current line.
- Edit.EmacsQuotedInsert: CTRL + Q
Reads another key and inserts the key into the buffer. Keys must be
8-bit ASCII characters. Use this command to insert control characters,
meta characters, or graphics characters into the buffer.
- Edit.EmacsWordCapitalize: ALT + C
Capitalizes the character to the right of the cursor or the first
character of the next word if the cursor is between words.
- Edit.EmacsWordDeleteToEnd: ALT + D
Deletes the characters to the right of the cursor to the end of the word.
- Edit.EmacsWordDeleteToStart
ALT + BACKSPACE
—or—
ALT + DELETE
- Deletes the characters from the left of the cursor to the start of the word.: ALT + L
Changes the selected text to lowercase characters.
- Edit.EmacsWordTranspose: ALT + T
Transposes the words on either side of the cursor. For example, |End
Sub would be changed to read Sub End|.
- Edit.EmacsWordUppercase: ALT + U
Changes the selected text to uppercase characters.
Text Navigation
Command
Keys
Description
Edit.EmacsCharLeft
CTRL + B
Moves the cursor one character to the left.
Edit.EmacsCharRight
CTRL + F
Moves the cursor one character to the right.
Edit.EmacsDocumentEnd
END
—or—
SHIFT + ALT + . (period)
—or—
SHIFT + END
—or—
CTRL + X, ]
Moves the cursor to the bottom of the current document.
Edit.EmacsDocumentStart
HOME
—or—
SHIFT + ALT + , (comma)
—or—
SHIFT + HOME
—or—
CTRL + X, [
Moves the cursor to the top of the current document.
Edit.EmacsGoToLine
ALT + G
Displays the Go To Line dialog box, which allows you to navigate to a specific line of code in the current document.
Edit.EmacsLineDown
CTRL + N
Moves the cursor down one line.
Edit.EmacsLineEnd
CTRL + E
Moves the cursor to the end of the current line. If you use word wrap, the cursor moves to the physical, not the displayed, end of the current line.
Edit.EmacsLineStart
CTRL + A
Moves the cursor to the beginning of the current line. If you use word wrap, the cursor moves to the physical, not the displayed, beginning of the current line.
Edit.EmacsLineUp
CTRL + P
Moves the cursor up one line.
Edit.EmacsPopMark
CTRL + X, CTRL + SPACEBAR
—or—
CTRL + X, CTRL + SHIFT + 2
Moves the cursor to the current mark and then removes the mark for the location stack.
Edit.EmacsScrollLineCenter
CTRL + L
Scrolls the document so that the current line is now in the center of the viewable area in the editor.
Edit.EmacsScrollLineTop
SHIFT + ALT + 1
Scrolls the document so that the current line appears at the top of the viewable area in the editor.
Edit.EmacsScrollPageDown
CTRL + V
Scrolls down within the document.
Edit.EmacsScrollPageUp
ALT + V
Scrolls up within the document.
Edit.EmacsSetMark
CTRL + SHIFT + 2
—or—
CTRL + SPACEBAR
Adds a mark to the location stack for the current cursor.
Edit.EmacsSwapPointAndMark
CTRL + X, CTRL + X
Moves the cursor to the current mark in the location stack and moves the current mark to the location where the cursor mark was when the command was invoked.
Edit.EmacsWordNext
CTRL + RIGHT ARROW
—or—
ALT + F
—or—
ALT + RIGHT ARROW
Moves the cursor to the first character in the next word.
Edit.EmacsWordPrevious
CTRL + LEFT ARROW
—or—
ALT + B
—or—
ALT + LEFT ARROW
Moves the cursor to the first character in the previous word
** General Shortcut Keys
Edit.EmacsExtendedCommand is ALT + X
Places the cursor in the Find/Command box on the Standard toolbar.
Edit.EmacsFindReplace is SHIFT + ALT + 5
Displays the replace options in the Quick tab of the Find and Replace dialog box.
Edit.EmacsPasteRotate is ALT + Y
Pastes an item from the Clipboard Ring tab of the Toolbox to the file
and automatically selects the pasted item. Press ALT + Y again to
paste the next item to the Clipboard Ring.
Edit.EmacsQuit is CTRL + G
Stops the current command or code and deactivates the region.
Edit.EmacsUniversalArgument > CTRL + U
Prompts for an integer, returns negative if the first character
entered is a hyphen. When a non-digit character is entered, the prefix
for the command is set to the entered integer. If no integer is
entered, the default value is 4. Repeatedly invoking the command
multiplies the current value entered by the previous accumulated
value.
** Text Manipulation
- Edit.EmacsBreakLine: ENTER
Inserts a new line.
- Edit.EmacsBreakLineIndent: CTRL + J
Inserts a new line and indents it.
- Edit.EmacsCharTranspose: CTRL + T
Transposes the characters on either side of the cursor. For example,
Ed|n Sub would be changed to read End| Sub.
- Edit.EmacsDeleteSelection: CTRL + DELETE
Deletes the current selection.
- Edit.EmacsDeleteToEOL: CTRL + K
Deletes from the cursor to the end of the current line.
- Edit.EmacsLineOpen: CTRL + O
Inserts a new line after the cursor. The cursor stays in the current line.
- Edit.EmacsQuotedInsert: CTRL + Q
Reads another key and inserts the key into the buffer. Keys must be
8-bit ASCII characters. Use this command to insert control characters,
meta characters, or graphics characters into the buffer.
- Edit.EmacsWordCapitalize: ALT + C
Capitalizes the character to the right of the cursor or the first
character of the next word if the cursor is between words.
- Edit.EmacsWordDeleteToEnd: ALT + D
Deletes the characters to the right of the cursor to the end of the word.
- Edit.EmacsWordDeleteToStart
ALT + BACKSPACE
—or—
ALT + DELETE
- Deletes the characters from the left of the cursor to the start of the word.: ALT + L
Changes the selected text to lowercase characters.
- Edit.EmacsWordTranspose: ALT + T
Transposes the words on either side of the cursor. For example, |End
Sub would be changed to read Sub End|.
- Edit.EmacsWordUppercase: ALT + U
Changes the selected text to uppercase characters.
Text Navigation
Command
Keys
Description
Edit.EmacsCharLeft
CTRL + B
Moves the cursor one character to the left.
Edit.EmacsCharRight
CTRL + F
Moves the cursor one character to the right.
Edit.EmacsDocumentEnd
END
—or—
SHIFT + ALT + . (period)
—or—
SHIFT + END
—or—
CTRL + X, ]
Moves the cursor to the bottom of the current document.
Edit.EmacsDocumentStart
HOME
—or—
SHIFT + ALT + , (comma)
—or—
SHIFT + HOME
—or—
CTRL + X, [
Moves the cursor to the top of the current document.
Edit.EmacsGoToLine
ALT + G
Displays the Go To Line dialog box, which allows you to navigate to a specific line of code in the current document.
Edit.EmacsLineDown
CTRL + N
Moves the cursor down one line.
Edit.EmacsLineEnd
CTRL + E
Moves the cursor to the end of the current line. If you use word wrap, the cursor moves to the physical, not the displayed, end of the current line.
Edit.EmacsLineStart
CTRL + A
Moves the cursor to the beginning of the current line. If you use word wrap, the cursor moves to the physical, not the displayed, beginning of the current line.
Edit.EmacsLineUp
CTRL + P
Moves the cursor up one line.
Edit.EmacsPopMark
CTRL + X, CTRL + SPACEBAR
—or—
CTRL + X, CTRL + SHIFT + 2
Moves the cursor to the current mark and then removes the mark for the location stack.
Edit.EmacsScrollLineCenter
CTRL + L
Scrolls the document so that the current line is now in the center of the viewable area in the editor.
Edit.EmacsScrollLineTop
SHIFT + ALT + 1
Scrolls the document so that the current line appears at the top of the viewable area in the editor.
Edit.EmacsScrollPageDown
CTRL + V
Scrolls down within the document.
Edit.EmacsScrollPageUp
ALT + V
Scrolls up within the document.
Edit.EmacsSetMark
CTRL + SHIFT + 2
—or—
CTRL + SPACEBAR
Adds a mark to the location stack for the current cursor.
Edit.EmacsSwapPointAndMark
CTRL + X, CTRL + X
Moves the cursor to the current mark in the location stack and moves the current mark to the location where the cursor mark was when the command was invoked.
Edit.EmacsWordNext
CTRL + RIGHT ARROW
—or—
ALT + F
—or—
ALT + RIGHT ARROW
Moves the cursor to the first character in the next word.
Edit.EmacsWordPrevious
CTRL + LEFT ARROW
—or—
ALT + B
—or—
ALT + LEFT ARROW
Moves the cursor to the first character in the previous word
Subscribe to:
Posts (Atom)
-
--> from: http://www.howardism.org/Technical/Emacs/literate-programming-tutorial.html Introduction to Literate Programming ...
-
유럽 연합 법규는 유럽 연합 방문자에게 블로그에 사용되는 쿠키에 대한 정보를 제공하도록 규제하고 있습니다. 또한 대부분의 경우 이러한 법규는 사용자의 동의를 얻도록 요구합니다. 이 규제를 준수할 수 있도록 Google은 귀하의 블로그에 Google이 ...
-
> chinese font (set-fontset-font fontset 'hangul '("Gulim" . "unicode-bmp")) > korean font ...






