Elisp: Lisp Basics
Emacs is possible because of the embedded programing language emacs lisp. For coders, you can think of emacs as an interactive user interface to emacs lisp.
This chapter teaches the basics of the lisp language core, about syntax, arithmetic operations, string, variable, branch control, loop, function, data structure. The type of things that are available in all programing language. (not emacs specific, such as editing text, buffer, or coding syntax coloring, etc.)
Table of Contents
Quick Start
Working with Elisp
- Emacs: Evaluate Elisp Code
- Emacs: Show Function Documentation
- Emacs: Search Function by Name
- Emacs: How to Edit Lisp Code
String
- String
- Unicode Escape Sequence
- String Functions
- Replace String or Regex in String
- Join Strings, Codepoints to String
- String Comparison, Equality, Order
- Format String
- Convert Number, String
- Character Type
Number
Boolean
Variable
- Variable
- Destructure Binding (seq-setq, seq-let)
- Place Expression, Generalized Variable
- Buffer Local Variable
- Emacs Init: Environment Variables
- Emacs: Show Variable Value and Doc
- Emacs: Search Variable by Name
Conditionals
Loop
Lisp Data Structure
List
- List
- Create List
- List, Get Elements
- Modify List
- List Iteration
- Check Element Exist in List
- Remove Elements in List
- Backquote Reader Macro for List
Special Lists
List Structure
Vector
Sequence
- Sequence Type
- Sequence Functions
- Sequence. Take, Drop, Slice
- Sequence. Iteration Guide
- Sequence. Map
- Sequence. Foreach
- Sequence. some, every (conditional exit)
- Sequence. Filter
- Sequence. Insert or Remove
- Sequence. Find
- Sequence. Sort, Reverse
- Sequence. Join, Convert
- Sequence. Union, Intersection, Difference
- Sequence. Partition, Group
- Sequence. Min, Max, Random
Hash Table
JSON Read Write
Function
- Define Function
- Function Parameters (optional, rest)
- Docstring Markup
- Lambda Function
- Apply Function (List to Args)
- Check If Function / Variable is Defined
- Types of Functions
Symbol
Regular Expression
- Regular Expression
- Regex Functions
- Emacs: Regular Expression Syntax
- Regex Backslash in Lisp Code
- Case Sensitivity (case-fold-search)
- Find Replace Text in Buffer
- Match Data (Regex Result)
- Convert Regex to Lisp Regex String
- How to Test Regex
- Regex in Readable Syntax, Package Rx
- Regex Named Character Class and Syntax Table
- Emacs Regex vs Regex in Python, JavaScript, Java