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
290
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
100
Rust @ OSDC.tw 2014
kanru
5
470
Emacs - COSCUP 2012
kanru
1
86
Android Boot Time Optimization
kanru
0
430
Android 2.3 Introduction
kanru
0
57
0xlab's Perspective on Android System Development
kanru
0
53
Other Decks in Technology
See All in Technology
マルチプロダクト開発の現場でAWS Security Hubを1年以上運用して得た教訓
muziyoshiz
3
2.4k
ずっと昔に Star をつけたはずの思い出せない GitHub リポジトリを見つけたい!
rokuosan
0
150
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
160
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
270
サーバレスアプリ開発者向けアップデートをキャッチアップしてきた #AWSreInvent #regrowth_fuk
drumnistnakano
0
200
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
170
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
270
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
17
4.6k
Amazon Kendra GenAI Index 登場でどう変わる? 評価から学ぶ最適なRAG構成
naoki_0531
0
110
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
180
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
460
フロントエンド設計にモブ設計を導入してみた / 20241212_cloudsign_TechFrontMeetup
bengo4com
0
1.9k
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Mobile First: as difficult as doing things right
swwweet
222
9k
The Invisible Side of Design
smashingmag
298
50k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Designing for humans not robots
tammielis
250
25k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
450
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
RailsConf 2023
tenderlove
29
940
Designing for Performance
lara
604
68k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
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