Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Emacs 從入門到進階
Search
Kan-Ru Chen
August 03, 2013
Technology
2
300
Emacs 從入門到進階
COSCUP 2013 的 Emacs 社群議程介紹如何從各種角度自訂 Emacs
Kan-Ru Chen
August 03, 2013
Tweet
Share
More Decks by Kan-Ru Chen
See All by Kan-Ru Chen
Rust Introduction @ Rust Meetup Taipei #1
kanru
0
110
Rust @ OSDC.tw 2014
kanru
5
470
Emacs - COSCUP 2012
kanru
1
86
Android Boot Time Optimization
kanru
0
480
Android 2.3 Introduction
kanru
0
68
0xlab's Perspective on Android System Development
kanru
0
55
Other Decks in Technology
See All in Technology
無意味な開発生産性の議論から抜け出すための予兆検知とお金とAI
i35_267
2
3k
ビギナーであり続ける/beginning
ikuodanaka
3
470
生成AI活用の組織格差を解消する 〜ビジネス職のCursor導入が開発効率に与えた好循環〜 / Closing the Organizational Gap in AI Adoption
upamune
6
4.7k
AWS Summit Japan 2025 Community Stage - App workflow automation by AWS Step Functions
matsuihidetoshi
1
310
React開発にStorybookとCopilotを導入して、爆速でUIを編集・確認する方法
yu_kod
1
110
AWS Organizations 新機能!マルチパーティ承認の紹介
yhana
1
230
KiCadでPad on Viaの基板作ってみた
iotengineer22
0
180
開発生産性を組織全体の「生産性」へ! 部門間連携の壁を越える実践的ステップ
sudo5in5k
1
1.3k
KubeCon + CloudNativeCon Japan 2025 Recap Opening & Choose Your Own Adventureシリーズまとめ
mmmatsuda
0
240
本が全く読めなかった過去の自分へ
genshun9
0
730
Tokyo_reInforce_2025_recap_iam_access_analyzer
hiashisan
0
150
Core Audio tapを使ったリアルタイム音声処理のお話
yuta0306
0
160
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
39
1.9k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
We Have a Design System, Now What?
morganepeng
53
7.7k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
Done Done
chrislema
184
16k
Music & Morning Musume
bryan
46
6.6k
Six Lessons from altMBA
skipperchong
28
3.9k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
Transcript
Emacs 從入門到進階 COSCUP 2013
about:kanru a Debian Developer in Mozilla Vim 5+ yr Emacs
5+ yr
[email protected]
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. about:license
Agenda Emacs 編輯器以其容易擴充的特性見長,本次將 介紹如何從不同的角度,用不同的方法來擴充 Emacs。從最簡單的使用內建 Customization 界 面,到安裝第三方的套件,到使用 advice 的方式
來擴充原有的功能,到自己自訂不同的編輯器 「模式」。本講假設聽眾皆有基礎的 Emacs 操作 能力,將不介紹如何使用 Emacs。
GNU Emacs 24.3 Latest stable release
Customization 超省力設定 Emacs
M-x customize
Themes
M-x customize-themes
M-x customize-create-theme
Packages
M-x list-packages
ELPA • GNU ELPA ◦ http://elpa.gnu.org • MELPA ◦ http://melpa.milkbox.net
• Marmalade ◦ http://marmalade-repo.org
Keyboard Macros
Demo
Advices
:before :around :after (defvar simple-user) (defvar simple-password) (defun simple-login ()
(interactive) (message "login with %s:%s" simple-user simple-password)) ;; no hooks ;; plain text password
defadvice Place your extension anywhere before, after and around the
target function.
:before :around :after (defadvice simple-login (before logging-before activate) (when (y-or-n-p
"Run simple login hooks") (run-hooks 'simple-login-hook))) (defadvice simple-login (around login-read-pw activate) (let ((simple-user "somebody") (simple-password "1234")) ad-do-it))
Modes
define-minor-mode
define-minor-mode (define-minor-mode highlight-fixme-mode "Highlight the document string like FIXME, XXX
and TODO in code." nil nil nil (let ((keywords '(("\\<\\(FIX\\|TODO\\|FIXME\\|HACK\\|REFACTOR\\|XXX\\)\\>" 1 font-lock-warning-face t)))) (if highlight-fixme-mode (font-lock-add-keywords nil keywords) (font-lock-remove-keywords nil keywords))))
define-dervied-mode
define-generic-mode
define-minor-mode (define-generic-mode my-js-mode '("//" ("/*" . "*/")) '("function" "alert" "return")
nil nil nil)
http://kanru.info/misc/ipdl-mode.el 擴充 cc-mode
Debugging
EDebug
Q & A
Emacs 從入門到進階 大家來學 VIM COSCUP 2014