A Introduction
Emacs
A Introduction
about:kanru
a Debian Developer
in Mozilla
Vim 5+ yr
Emacs 5+ yr
kanru@kanru.info
about:license
This work is licensed under the Creative Commons
Attribution-ShareAlike 3.0 Unported License. To view a
copy of this license, visit http://creativecommons.
org/licenses/by-sa/3.0/ or send a letter to Creative
Commons, 444 Castro Street, Suite 900, Mountain View,
California, 94041, USA.
Brief History
   簡明歷史
TECO
 起源
TECMAC & TMACS
 EditorMACroS in TECO
Multics Emacs & EINE
   第一個使用 LISP 的 Emacs
GNU Emacs 13.0?
     首次公開
Emacs Timeline
http://www.jwz.org/doc/emacs-timeline.html
Get Emacs
 如何取得?
apt-get install emacs
bzr://bzr.savannah.gnu.org/emacs/trunk

            Bleeding edge!
Windows?
http://alpha.gnu.org/gnu/emacs/windows
Jargons
  術語
-*- mode: C++ -*-
       模式
C-<key>
Control + <key>
M-<key>
Meta + <key>
M-<key>
Alt + <key>
C-x C-c
Control + x Control + c
Frame
程式外框
Window
 分割視窗
Buffer
Minibuffer
Region
Editing Commands
     編輯指令
Escape-Meta-Alt-Control-Shift
                    -- anonymous
C-g
逃生鍵
C-g C-g C-g
   塊陶阿
C-x C-c
  離開
C-x C-f
  開檔
C-{p,n,b,f}
   上下左右
C-k
刪除
C-a
行頭
C-e
行尾
C-a C-k
 刪除一行
C-[a-z]
 各有功用
M-x
執行指令
Window Operations
      視窗操作
C-x 2
split-window-below
C-x 3
split-window-right
C-x 0
delete-window
C-x 1
delete-other-windows
C-x o
other-window
Help System
強大的說明輔助系統
Tutorial
 C-h t
C-h <key>
 取得各種說明
C-h ?
說明 C-h
C-h k <key>
   按鍵資訊
C-h v
變數資訊
C-h f
函數資訊
C-h i
Info 系統
M-x describe-*
   取得各種資訊
Easy Customization
      簡易設定法
M-x customize
   進入設定模式
M-x customize-group
     進入分類設定模式
M-x customize-themes
     進入主題設定模式
~/.emacs
使用者設定檔
.emacs bankruptcy
  亂中有序直到有一天...
~/.emacs.d/init.el
     新・使用者設定檔
http://github.com/kanru/.emacs.d
        省錢收納小技巧 (誤)
Install More Extensions
      安裝更多擴充套件
ELPA
M-x list-packages
ELPA
http://marmalade-repo.org/
ELPA
http://melpa.milkbox.net/
el-get
https://github.com/dimitri/el-get
find el-get/recipes|wc -l
          2163
Emacs Lisp Intro.
     ELisp 簡介
GNU Emacs Lisp
Reference Manual
      必讀
*scratch*
 來塗鴉吧!
M-x ielm
互動式程式設計
(<op> <a1> <a2> ... <aN>)
        (+ 1 2 3) => 6
(defun hello ()
  "Hello World!")
     定義函式
(defun hello ()
  (interactive)
  (message "Hello"))
       M-x hello
(defun hello (who)
  (interactive "sSay hello to: ")
  (message "Hello %s" who))
            M-x hello
(defvar hello-times 0
  "Said how many times?")
      C-h v hello-times
(defcustom uuid-interface "eth0"
  "The default interface"
  :type 'string
  :group 'uuid)
    M-x customize-group uuid
(add-hook HOOK FUNCTION)
(defadvice FUNCTION ARGS
                 &rest BODY)
(provide '<feature>)
   (require '<feature>)
Misc Tips
  小技巧
M-x server-start
 $ emacsclient <file>
Bug Report
  回報問題
M-x report-emacs-bug
http://debbugs.gnu.org/cgi/pkgreport.cgi?package=emacs
Community Resources
       社群資源
EmacsWiki
http://www.emacswiki.org/
Planet Emacsen
http://planet.emacsen.org/
Mailing Lists
http://news.gmane.org/index.php?prefix=gmane.emacs
IRC
#emacs{.tw} @ freenode
Q&A

Emacs - COSCUP 2012