#+TITLE: Mastering Emacs
- tags:: emacs
mastering emacs ebook: please verify your e-mail
- Questions
- Is being in Evil mode going to make this more challenging?
- [ ]
- Big points
- Emacs has been around for a long time
- Extensibility
- Tinker's editor
- A good way to learn Lisp, in an interpreter that is written in Lisp.
-
Quotes =Vim users are migrating to Emacs because, well, Emacs is often a better Vim than Vim.=
-
Resources
- Things to remember:
- Keyboard shortcuts
- C-x C-f -> open file
- C-x C-s -> save file
- C-x k -> close buffer
- C-x b -> create a new buffer
- C-x C-e -> Evaluate expressions
- C-c C-d C-d -> Display documentation
- Spc-f-r -> recent files
- Spc-. -> open file
- C-x C-e runs last expression
- C-c C-k compiles the code
- C-u C-x C-e runs last expression in line.
- Chapter 3 ##Things to remember =If Emacs is giving you error messages when you start it, youcan use-qto prevent yourinit filefrom loading.=
=Emacs will typically startslower than other editors (as it has a lot more packages andfeatures) as itās designed for long-running sessions and notquick edits.=
** Resources - [ ][https://www.masteringemacs.org/article/evaluating-elisp-emacs][evaluating elisp in emacs - mastering emacs]]
Caps Lock as Control
I'm using Keyboard Maestro and Karabiner to rebind my keys.
M-x - pronounced mex or M x
I use Alfred and had remapped Spotlight to be option space. That meant I couldn't use M-Spc. Turned that off.
Customize interface
I find it a bit overwhelming - I think I prefer tinkering with code for now.
Evaluating Elisp
M-x eval-buffer M-x eval-region (defn test [] (- 3 4)) ielm
Package management
Comes from a few different places but combined by Emacs
Getting Help
- Search all help with apropos
- The browsing of pages is different for Doom
- describe
- apropos-command
- describe-mode
- The Book :PROPERTIES: :NOTER_DOCUMENT: ../../Downloads/mastering-emacs-v2-1.pdf :NOTER_PAGE: 281 :END:
- Looking at the theory of movement :PROPERTIES: :NOTER_PAGE: (74 . 0.4225352112676056) :ID: f5137391-bc27-455b-a9f7-3fd831aae65a :END: - Contents :PROPERTIES: :NOTER_PAGE: (2 . 0.323488) :END: * Introduction :PROPERTIES: :NOTER_PAGE: (7 . 0.12) :END: *- Thank You :PROPERTIES: :NOTER_PAGE: 7 :NOTER_DOCUMENT: ../../Downloads/mastering-emacs-v2.pdf :END: ** Intended Audience :PROPERTIES: :NOTER_PAGE: (9 . 0.209398) :END: *- What You'll Learn :PROPERTIES: :NOTER_PAGE: (10 . 0.331528) :END: * The Way of Emacs :PROPERTIES: :NOTER_PAGE: (13 . 0.12) :END: *- Guiding Philosophy :PROPERTIES: :NOTER_PAGE: (15 . 0.284105) :END: - LISP? :PROPERTIES: :NOTER_PAGE: (17 . 0.72679) :END: - Extensibility :PROPERTIES: :NOTER_PAGE: (20 . 0.726975) :END: ** Important Conventions :PROPERTIES: :NOTER_PAGE: (22 . 0.404043) :END: **- The Buffer :PROPERTIES: :NOTER_PAGE: (23 . 0.42946) :END: - The Window and the Frame :PROPERTIES: :NOTER_PAGE: (24 . 0.342485) :END: - The Point and Mark :PROPERTIES: :NOTER_PAGE: (26 . 0.587269) :END: - Killing, Yanking and CUA :PROPERTIES: :NOTER_PAGE: (28 . 0.231142) :END: - .emacs.d, init.el, and .emacs :PROPERTIES: :NOTER_PAGE: (29 . 0.110772) :END: - Major Modes and Minor Modes :PROPERTIES: :NOTER_PAGE: (30 . 0.208395) :END: * First Steps :PROPERTIES: :NOTER_PAGE: (32 . 0.12) :END: *- Installing and Starting Emacs :PROPERTIES: :NOTER_PAGE: (32 . 0.535571) :END: - Starting Emacs :PROPERTIES: :NOTER_PAGE: (35 . 0.357469) :END: ** The Emacs Interface :PROPERTIES: :NOTER_PAGE: (39 . 0.106651) :END: *- Keys :PROPERTIES: :NOTER_PAGE: (40 . 0.496806) :END: - Caps Lock as Control :PROPERTIES: :NOTER_PAGE: (44 . 0.616435) :END: - M-x: Execute Extended Command :PROPERTIES: :NOTER_PAGE: (45 . 0.329537) :END: - Universal Arguments :PROPERTIES: :NOTER_PAGE: (47 . 0.283164) :END: - Discovering and Remembering Keys :PROPERTIES: :NOTER_PAGE: (50 . 0.652346) :END: ** Configuring Emacs :PROPERTIES: :NOTER_PAGE: (52 . 0.559306) :END: **- The Customize Interface :PROPERTIES: :NOTER_PAGE: (54 . 0.208858) :END: - Evaluating Elisp Code :PROPERTIES: :NOTER_PAGE: (59 . 0.633025) :END: - The Package Manager :PROPERTIES: :NOTER_PAGE: (61 . 0.231142) :END: - Color Themes :PROPERTIES: :NOTER_PAGE: (62 . 0.713534) :END: ** Getting Help :PROPERTIES: :NOTER_PAGE: (63 . 0.452222) :END: **- The Info Manual :PROPERTIES: :NOTER_PAGE: (65 . 0.186559) :END: - Apropos :PROPERTIES: :NOTER_PAGE: (67 . 0.494815) :END: - The Describe System :PROPERTIES: :NOTER_PAGE: (70 . 0.690679) :END: * The Theory of Movement :PROPERTIES: :NOTER_PAGE: (74 . 0.12) :END: *- The Basics :PROPERTIES: :NOTER_PAGE: (76 . 0.442994) :END: - C-x C-f: Find file :PROPERTIES: :NOTER_PAGE: (78 . 0.425694) :END: - In Doom this is Spc-. :PROPERTIES: :NOTER_PAGE: (78 . 0.471608832807571) :END: ***** Interesting to be able to add local file variables. :PROPERTIES: :NOTER_PAGE: (79 . 0.2358044164037855) :END:
**- C-x C-s: Save Buffer :PROPERTIES: :NOTER_PAGE: (82 . 0.448133) :END:
**- Doom is Spc-f-s :PROPERTIES: :NOTER_PAGE: (82 . 0.45347003154574134) :END: But I generally just use Cmd-S.
- C-x C-c: Exits Emacs :PROPERTIES: :NOTER_PAGE: (83 . 0.268302) :END: - C-x b: Switch Buffer :PROPERTIES: :NOTER_PAGE: (84 . 0.110772) :END: - Spc-b-b :PROPERTIES: :NOTER_PAGE: (84 . 0.12697160883280756) :END: - This is a really useful thing! List the buffers along with associated file names. :PROPERTIES: :NOTER_PAGE: (85 . 0.2720820189274448) :END: Doom equivalent it Spc-b-i **- I did this in the config.el because the customize-option isn't supported by Doom. :PROPERTIES: :NOTER_PAGE: (85 . 0.7074132492113565) :END:
- C-x k: Kill Buffer :PROPERTIES: :NOTER_PAGE: (86 . 0.208117) :END: Spc-b-k - ESC ESC ESC: Keyboard Escape :PROPERTIES: :NOTER_PAGE: (86 . 0.384244) :END: - C-/: Undo :PROPERTIES: :NOTER_PAGE: (86 . 0.613472) :END: ** Window Management :PROPERTIES: :NOTER_PAGE: (90 . 0.40287) :END: **- Working with Other Windows :PROPERTIES: :NOTER_PAGE: (92 . 0.713534) :END: I think I enjoy the Spc-w-o command best - then Spc-w-= ** Frame Management :PROPERTIES: :NOTER_PAGE: (93 . 0.64838) :END: *- Elemental Movement :PROPERTIES: :NOTER_PAGE: (95 . 0.106651) :END: - Navigation Keys :PROPERTIES: :NOTER_PAGE: (95 . 0.15875) :END: - Moving by Character :PROPERTIES: :NOTER_PAGE: (96 . 0.607762) :END: - Moving by Line :PROPERTIES: :NOTER_PAGE: (98 . 0.418719) :END: - Moving by Word :PROPERTIES: :NOTER_PAGE: (101 . 0.514136) :END: - Moving by S-Expressions :PROPERTIES: :NOTER_PAGE: (107 . 0.423179) :END: - Other Movement Commands :PROPERTIES: :NOTER_PAGE: (113 . 0.320324) :END: - Scrolling :PROPERTIES: :NOTER_PAGE: (118 . 0.110772) :END: ** Bookmarks and Registers :PROPERTIES: :NOTER_PAGE: (121 . 0.106651) :END: *- Selections and Regions :PROPERTIES: :NOTER_PAGE: (124 . 0.50483) :END: - Selection Compatibility Modes :PROPERTIES: :NOTER_PAGE: (128 . 0.553241) :END: **- Setting the Mark :PROPERTIES: :NOTER_PAGE: (127 . 0.4450506625097428) :END:
**- The C-x C-x command (called exchange-point-and-mark ) is in- teresting. It reactivates the region from point ā which is your current location in the buļ¬er ā and wherever the mark is; then, it swaps the point and mark positions. This com- mand is especially useful if you want to reactivate the last region or if you simply want to swap the position of mark and point.
** Searching and Indexing :PROPERTIES: :NOTER_PAGE: (133 . 0.407639) :END: **- Isearch: Incremental Search :PROPERTIES: :NOTER_PAGE: (133 . 0.673117) :END: - Occur: Print lines matching an expression :PROPERTIES: :NOTER_PAGE: (143 . 0.110772) :END: - Imenu: Jump to definitions :PROPERTIES: :NOTER_PAGE: (146 . 0.625571) :END: - Helm: Incremental Completion and Selection :PROPERTIES: :NOTER_PAGE: (148 . 0.110772) :END: - Helm is a deep and complex tool that rewards you if you spend the time discovering what it can do. :PROPERTIES: :NOTER_PAGE: (149 . 0.7547318611987381) :ID: 8ceae547-2408-4da5-b5bb-721a8a2e8ebc :END: This is probably on my list of things to look at more deeply. Actually, I'm going to capture it now! - Describe the preļ¬x key I mentioned earlier that Helm has its own preļ¬x key, C-x c . In The Describe System, you can tell Emacs to list all key bindings in a preļ¬x key by ļ¬nishing a preļ¬x key with C-h : C-x c C-h . :PROPERTIES: :NOTER_PAGE: (150 . 0.7018927444794952) :END:
Use the describe system as much as possible to find out about the system as it is.
- IDO: Interactively DO Things :PROPERTIES: :NOTER_PAGE: (154 . 0.110772) :END: - Grep: Searching the file system :PROPERTIES: :NOTER_PAGE: (157 . 0.380185) :END: ** Other Movement Commands :PROPERTIES: :NOTER_PAGE: (162 . 0.255432) :END: *- Conclusion :PROPERTIES: :NOTER_PAGE: (164 . 0.255432) :END: * The Theory of Editing :PROPERTIES: :NOTER_PAGE: (166 . 0.12) :END: *- Killing and Yanking Text :PROPERTIES: :NOTER_PAGE: (167 . 0.429923) :END: - Killing versus Deleting :PROPERTIES: :NOTER_PAGE: (169 . 0.486451) :END: - Yanking Text :PROPERTIES: :NOTER_PAGE: (173 . 0.475802) :END: ** Transposing Text :PROPERTIES: :NOTER_PAGE: (174 . 0.415417) :END: **- C-t: Transpose Characters :PROPERTIES: :NOTER_PAGE: (175 . 0.58841) :END: - M-t: Transpose Words :PROPERTIES: :NOTER_PAGE: (176 . 0.589753) :END: - C-M-t: Transpose S-expressions :PROPERTIES: :NOTER_PAGE: (178 . 0.711235) :END: - Other Transpose Commands :PROPERTIES: :NOTER_PAGE: (180 . 0.691235) :END: ** Filling and Commenting :PROPERTIES: :NOTER_PAGE: (181 . 0.286944) :END: **- Filling :PROPERTIES: :NOTER_PAGE: (181 . 0.339043) :END: - Commenting :PROPERTIES: :NOTER_PAGE: (183 . 0.284954) :END: ** Search and Replace :PROPERTIES: :NOTER_PAGE: (185 . 0.344599) :END: **- Case Folding :PROPERTIES: :NOTER_PAGE: (187 . 0.282701) :END: - Regular Expressions :PROPERTIES: :NOTER_PAGE: (188 . 0.253441) :END: ** Changing Case :PROPERTIES: :NOTER_PAGE: (194 . 0.606019) :END: *- Counting Things :PROPERTIES: :NOTER_PAGE: (197 . 0.692114) :END: ** Text Manipulation :PROPERTIES: :NOTER_PAGE: (198 . 0.656435) :END: **- Editable Occur :PROPERTIES: :NOTER_PAGE: (199 . 0.186559) :END: - Deleting Duplicates :PROPERTIES: :NOTER_PAGE: (199 . 0.461821) :END: - Flushing and Keeping Lines :PROPERTIES: :NOTER_PAGE: (200 . 0.208858) :END: - Joining and Splitting Lines :PROPERTIES: :NOTER_PAGE: (201 . 0.110772) :END: - Whitespace Commands :PROPERTIES: :NOTER_PAGE: (203 . 0.499275) :END: ** Keyboard Macros :PROPERTIES: :NOTER_PAGE: (205 . 0.641404) :END: **- Basic Commands :PROPERTIES: :NOTER_PAGE: (206 . 0.364907) :END: - Advanced Commands :PROPERTIES: :NOTER_PAGE: (208 . 0.110772) :END: ** Text Expansion :PROPERTIES: :NOTER_PAGE: (213 . 0.105015) :END: **- Abbrev :PROPERTIES: :NOTER_PAGE: (215 . 0.39642) :END: - DAbbrev and Hippie Expand :PROPERTIES: :NOTER_PAGE: (216 . 0.39642) :END: ** Indenting Text and Code :PROPERTIES: :NOTER_PAGE: (218 . 0.723318) :END: **- RET: Indenting New lines :PROPERTIES: :NOTER_PAGE: (219 . 0.726975) :END: - TAB: Indenting the Current Line :PROPERTIES: :NOTER_PAGE: (220 . 0.421991) :END: - Indenting Regions :PROPERTIES: :NOTER_PAGE: (222 . 0.231142) :END: ** Sorting and Aligning :PROPERTIES: :NOTER_PAGE: (223 . 0.442994) :END: **- Sorting :PROPERTIES: :NOTER_PAGE: (223 . 0.565494) :END: - Aligning :PROPERTIES: :NOTER_PAGE: (227 . 0.326574) :END: ** Other Editing Commands :PROPERTIES: :NOTER_PAGE: (233 . 0.106651) :END: **- Zapping Characters :PROPERTIES: :NOTER_PAGE: (233 . 0.15875) :END: - Spell Checking :PROPERTIES: :NOTER_PAGE: (234 . 0.186559) :END: - Quoted Insert :PROPERTIES: :NOTER_PAGE: (236 . 0.110772) :END: * The Practicals of Emacs :PROPERTIES: :NOTER_PAGE: (237 . 0.12) :END: *- Exploring Emacs :PROPERTIES: :NOTER_PAGE: (238 . 0.18841) :END: - Reading the Manual :PROPERTIES: :NOTER_PAGE: (238 . 0.663364) :END: - Using Apropos :PROPERTIES: :NOTER_PAGE: (239 . 0.530139) :END: - C-h: Exploring Prefix keys :PROPERTIES: :NOTER_PAGE: (242 . 0.23054) :END: - C-h k: Describe what a key does :PROPERTIES: :NOTER_PAGE: (243 . 0.275725) :END: - C-h m: Finding mode commands :PROPERTIES: :NOTER_PAGE: (244 . 0.685664) :END: ** Working with Log Files :PROPERTIES: :NOTER_PAGE: (245 . 0.665355) :END: **- Browsing Other Files :PROPERTIES: :NOTER_PAGE: (248 . 0.110772) :END: ** TRAMP: Remote File Editing :PROPERTIES: :NOTER_PAGE: (248 . 0.499491) :END: **- Multi-Hops and User Switching :PROPERTIES: :NOTER_PAGE: (253 . 0.377978) :END: ** EWW: Emacs Web Wowser :PROPERTIES: :NOTER_PAGE: (255 . 0.656435) :END: *- Dired: Files and Directories :PROPERTIES: :NOTER_PAGE: (258 . 0.210833) :END: - Navigation :PROPERTIES: :NOTER_PAGE: (260 . 0.351836) :END: - Marking and Unmarking :PROPERTIES: :NOTER_PAGE: (261 . 0.186559) :END: - Operations :PROPERTIES: :NOTER_PAGE: (263 . 0.110772) :END: - Working Across Directories :PROPERTIES: :NOTER_PAGE: (267 . 0.281991) :END: ** Shell Commands :PROPERTIES: :NOTER_PAGE: (269 . 0.188549) :END: **- Compiling in Emacs :PROPERTIES: :NOTER_PAGE: (270 . 0.284954) :END: ** Shells in Emacs :PROPERTIES: :NOTER_PAGE: (271 . 0.231682) :END: **- M-x shell: Shell Mode :PROPERTIES: :NOTER_PAGE: (272 . 0.454074) :END: - M-x ansi-term: Terminal Emulator :PROPERTIES: :NOTER_PAGE: (275 . 0.110772) :END: - M-x eshell: Emacs's Shell :PROPERTIES: :NOTER_PAGE: (276 . 0.110772) :END: * Conclusion :PROPERTIES: :NOTER_PAGE: (277 . 0.12) :END: *- Other Resources :PROPERTIES: :NOTER_PAGE: (279 . 0.657315) :END:
Skeletons is coo this is a tes this is a tes this is a tes this is a tes this is a testttttlzzi this is a testi this is a testi this is a test
Testing buffer TTTTTThttps://youtu.be/T4u4nUsdJbs?list=WLT https://youtu.be/T4u4nUsdJbs?list=WL 10 September 2020
āOur technologies can be divided, roughly, into four categories, according to the way they supplement or amplify our native capacities. One set, which encompasses the plow, the darning needle, and the fighter jet, extends our physical strength, dexterity, or resilience. A second set, which includes the microscope, the amplifier, and the Geiger counter, extends the range or sensitivity of our senses. A third group, spanning such technologies as the reservoir, the birth control pill, and the genetically modified corn plant, enables us to reshape nature to better serve our needs or desires. The map and the clock belong to the fourth category, which might best be called, to borrow a term used in slightly different senses by the social anthropologist Jack Goody and the sociologist Daniel Bell, āintellectual technologies.ā
Our technologies extend and expand our wills - we can dig for longer and deeper with shovels and then JCBs, we can perceive more with magnifying lenses and then microscopes, we can shape and control our environment and bodies with fans, AC and medication and finally we have tools which help us extend, expand our supplement our intellectual capacities.
Notes From: Nicholas Carr. āThe Shallows: What the Internet Is Doing to Our Brainsā. Apple Books. o
test tset