Learn Emacs from the ground up. In the Mastering Emacs book you will learn all the concepts that take weeks, months or even years to truly learn. All in one place.
“Emacs is too hard to learn!”
Emacs is the best and most flexible tool for personal
productivity. Mastering Emacs is the best book about learning
Emacs. Bar none.
Carlo FuscoMore testimonials →
It's a common refrain, but Emacs is the product of 40 years of continuous effort to build an extensible, self-documenting text editor. With that, comes complexity; but also freedoms that no other IDE or editor can give you. This book will teach you, from the ground up, how to learn and use Emacs.
If you're serious about learning Emacs, you will need a guide to help you come to grips with a number of alien concepts, like Emacs's unique key bindings, its terminology, and why anyone would use a language like LISP to extend it.
Despite its long history, Emacs remains as relevant today as it did when it was first created. When you read this book, I will teach you why Emacs is so powerful; how you can achieve the confidence and skills needed to accomplish anything; and why people use and extend Emacs after all these years.
Is Mastering Emacs right for me?
Mastering Emacs − and Emacs in general − is a great tool for everyone, despite its pedigree as a tool for programmers.
A large core of my readers are academics, scientists, and knowledge workers: they use Emacs for a wide range of work. If you're in technology, then Emacs is, of course, an obvious choice. But my book is interest-agnostic: you will come away with an excellent understanding of Emacs regardless of why you're using Emacs in your daily life.
Mastering Emacs is intended for both beginners and intermediate users.
Exploring & Learning about Emacs
What good is an editor with tens of thousands of commands if you can never find what you are looking for? What sets Emacs apart from every other IDE or editor on the market is its dedication to self-documentation. Every part of Emacs is searchable — and therefore discoverable — but knowing how to ask Emacs the right questions is essential knowledge.
In the book you will learn how to ask Emacs the right questions you're likely to encounter:
Describing what something does
Almost every facet of Emacs is well-documented and accessible — once you learn how to ask the right questions. It's all too easy to get stuck, and not realize that Emacs can help you answer your most salient questions. This is especially true once you start customizing Emacs; and who better to answer your questions than Emacs itself?
Even after more than 20 years of using Emacs, the book "Mastering
Emacs" gives me structured and new insights into the things I use
daily. The book, as well as the web site, are mandatory resources for
every active Emacs user.
Alan Pavičić, Software DeveloperMore testimonials →
Forgetting Key Bindings
Learn about key bindings, key maps and key prefixes. Emacs knows exactly what command does what, and the keys it's bound to. But you need to know how to ask it the right questions.
Mastering Emacs will teach you how to connect the dots between commands and their key bindings. Whether the answer is on the tip of your tongue, or if you're simply exploring.
Learning about new features
Emacs has thousands of commands, and all of them serve a purpose. But knowing how to author text won't help you if you want to code in your favorite programming language; manipulate files and directories; or use Emacs's builtin command shell or terminal emulator.
In the Mastering Emacs book I will walk you through all the different ways that you can use Emacs's own self-documenting features to learn how to accomplish new things in unfamiliar areas.
Unique Terminology & Concepts
I have been using Emacs intensely since 1990 and I have read much
about it. Nevertheless, even after 30 years of experience, Mickey's
book taught me many new and very useful things about Emacs. Mickey has
skillfully organized the contents of this book to describe the
concepts of Emacs in a compact form that elegantly takes the reader
from beginner to expert level. I highly recommend this book. It is a
pleasure to read. I believe it is the best book about Emacs you can
get your hands on!
Dr. Frank Ernst, Professor.More testimonials →
Emacs has its own names and concepts that predate most other computing paradigms. The end result is that new users are left confused wondering why Emacs behaves so differently. Usually, it's because Emacs's way of doing things is better for power users, not beginners.
I will show you why Emacs is so different and why these features work the way they do. I will also teach you why they're generally better and worth learning:
The Kill Ring
Learn why Emacs never formally adopted the clipboard concept you're familiar with already, and why Emacs's system is so much more powerful. The kill ring (as it's known) is embedded into most editing commands, and supplants the concept of deleting text by instead adding text to a circular ring of clipboard entries — but why?
You will learn why Emacs bucks the trend of every other editor, and why it's a superior system to everything else you've used before. Or, if you prefer, how to disable it and revert to the classic clipboard.
Text selection is another area where Emacs distinguishes itself. Selecting text is a two-pronged approach involving Emacs's point and mark. The mark is especially important as it's not only one side of a selection rectangle, but also an important beacon that helps you navigate when you move around.
Emacs's undo ring is circular, making it nearly impossible to lose information, as when you undo or redo, that action is itself stored as an undoable action in Emacs's undo ring. The undo ring is another example of where Emacs deviates from other editors; though it requires more effort to learn and understand, it offers significant advantages.
Escape Meta Alt Control Shift
Chorded key bindings are one of Emacs's defining characteristics. They let you do more with less. They also add complexity, and it's a common source of frustration for new users.
You will learn all there is to know about how (and why) Emacs is one of the few editors to adopt this paradigm, and how you can get the most out of it.
Windows, Buffers and Frames
Emacs is itself a sophisticated tiling window manager. Emacs's display is split into subdivisions (called windows) when Emacs wants to tell you something, or when you explicitly ask it to. For new users, it's yet another layer of complexity if you're not already familiar with that paradigm. Furthermore, Emacs also supports frames — Emacs's term for what everyone else calls windows — that adds yet another dimension to consider. And to top it all off, there is Emacs's idea of buffers, the main way you interface with Emacs when you read and write text.
I have a humanities background and am anything but an accomplished
programmer. But I got into using Emacs as my main text editor (using
Markdown). Mastering Emacs was easy to follow, even as a beginner,
but it also covers an extensive array of advanced techniques and
tricks. If you want to understand Emacs but are feeling lost, this is
an excellent guide.
John Carter WoodMore testimonials →
Moving around and editing text is a large part of what we do in a text editor. If you've ever found yourself limited by the editing capabilities of your current tool, you'll love what you can do in Emacs. Emacs has a complex web of key bindings and commands that seamlessly combine movement and editing to greatly speed up your workflow — whether that's writing prose or code.
How — and, crucially, why — Emacs's movement and editing workflow is unchanged after nearly forty years, and why it'll easily stand up to what other editors can do today, is a core part of the book.
Navigating and Editing by Syntactic Units
One of Emacs's strengths is that regardless of the environment you operate in — whether it's programming, writing notes, or editing config files — Emacs will present a unified set of commands and key bindings that you can rely on to consistently help you move around and edit text.
Searching and Indexing
Learn how to quickly navigate files and text with Emacs's array of builtin tools. Simple-sounding though it might be, Emacs's search features are flexible, unobtrusive, and powerful. And when that is not enough, learn how Emacs can seamlessly call out to external tools like grep and friends and integrate the output inside Emacs.
Beautifully written, concise, and fully up to date - a must for any Emacs user.
Nick HighamMore testimonials →
Recording and Playing back Keyboard Macros
Emacs has the most advanced keyboard macro system of any editor. You can combine nearly all user actions you can make in Emacs into a replayable macro that you can invoke at leisure.
Use Emacs to shape text or code. Whether it's filtering or keeping lines of strings of text that match regular expressions; deleting, merging and cycling whitespace; transposing text to fix typos; or using Emacs's text expansion features to automate tedium.
Seamlessly combining disparate tools is one of Emacs's hallmark abilities. Most Emacs users end up altering their workflows so they interact with most external tools through Emacs.
Mastering Emacs covers a handful of use cases to whet your appetite:
Running your own Shell inside Emacs
Emacs can seamlessly run a shell like bash inside Emacs, so you can leverage the power of Emacs like free-form search indexing and keyboard navigation.
I found Mastering Emacs at the beginning of my Emacs journey. I'd read
the documentation, many blog posts, but nothing was helping me
actually understand the how & why of Emacs, and using it day-to-day,
until I read Mastering Emacs. Now, I use Emacs every day and am very
comfortable with it, thanks to this book
James HebdenMore testimonials →
Manipulating Files and Directories
Emacs has Dired, a sophisticated directory editor with hundreds of commands for bulk editing — like (un)compressing files, altering permissions, renaming, deleting, moving and copying — and many more specialized commands (like image thumbnail browsing) that all but replaces the need for your terminal.
Browsing and Editing Unstructured Text
Easily traverse log files and automatically reload them when they change. Highlight text of interest with Emacs's highlighters.
Remote File Editing
Use Emacs's builtin remote editing capabilities to seamlessly edit files using a dozen different protocols, from SSH to Android Debug Bridge. Emacs will transparently edit the file as though it were local, and handle all the hard work. Combine the transparent editing with all the previously mentioned features to supercharge your remote editing workflows. Why manipulate files on a distant server from the commandline when you could do it from your local Emacs?
No − it is ePub and PDF only. However, the PDF was designed for print and screen. It's in standard 6x9 book format, and thus suitable for print-on-demand services. You have my permission to print the book for yourself, if you so choose.
Can I read Mastering Emacs in other languages?
Yes, you can! Thanks to USAMI Kenta and AYANOKOJI Takesi, you can read Mastering Emacs in Japanese also. It is available as a free download once you purchase the book.
Is Mastering Emacs useful for me if I am not a programmer?
A resounding yes! Many of my readers work in fields as diverse as law, academia, book authoring, manufacturing, and finance. Emacs is not just a programmers' text editor, though it is definitely good at that. You're going to love exploring all the productivity options available to Emacs users once you have mastered Emacs.
I'm already using Emacs − is Mastering Emacs right for me?
Most likely, yes. Unless you're familiar with all the topics covered in the Table of Contents, then Mastering Emacs will add value and improve your knowledge of Emacs. There are many who have used Emacs for decades − see the testimonials − who found the book invaluable as it helped them crystallize things about Emacs they did not consider or know about before.
Do I have to pay for updates?
Nope! Updates are free. You'll receive an email when a new version is released.
What if I don't learn anything?
You will! But, if you're not happy, you can have a no-questions-asked refund up to 30 days after your purchase. However, I am confident you'll love the book!
Occur: Print and Edit lines matching an expression
Imenu: Jump to definitions
Helm: Incremental Completion and Selection
IDO: Interactively DO Things
Grep: Searching the file system
Other Movement Commands
The Theory of Editing
Killing and Yanking Text
Killing versus Deleting
C-t: Transpose Characters
M-t: Transpose Words
C-M-t: Transpose S-expressions
Other Transpose Commands
Filling and Commenting
Search and Replace
Flushing and Keeping Lines
Copying and Killing Matching Lines
Joining and Splitting Lines
DAbbrev and Hippie Expand
Indenting Text and Code
TAB: Indenting the Current Line
Sorting and Aligning
Other Editing Commands
The Practicals of Emacs
Reading the Manual
C-h: Exploring Prefix keys
C-h k: Describe what a key does
C-h m: Finding mode commands
M-S-x: Execute Extended Command for Buffer
Xref: Cross-References in Emacs
Working with Log Files
Browsing Other Files
Tramp: Remote File Editing
The Default Directory and Remote Editing
Multi-Hops and User Switching
EWW: Emacs Web Wowser
Dired: Files and Directories
Marking and Unmarking
Working Across Directories
Compiling in Emacs
Shells in Emacs
M-x shell: Shell Mode
M-x ansi-term: Terminal Emulator
M-x eshell: Emacs’s Shell
Third-Party Packages and Tools
Mastering Emacs is the single best book on Emacs that I know of. It tells
you what you need to know, and what you didn't know you needed to know,
and it does it clearly and comprehensibly. I am now on version 4 of this
work which is updated regularly with each new major version. I find
something new to try every time I pick it up.
This is a good book for helping the beginner to get started, and a great
book for helping the more advanced user to discover new tools and
Britt AndersonMore testimonials →
After Mastering Emacs…
When you've read Mastering Emacs you'll have a solid understanding of Emacs and how and why it works the way it does. You'll be empowered with the knowledge required to ask Emacs questions — I cannot stress how important that is! You'll also have a superb understanding of every core part of Emacs's editing and movement capabilities; how they work together with all aspects of Emacs, like its kill ring; and how to accomplish most of any task you'd want to do with Emacs.
And if you're not 100% satisfied you can have your money back.