Emacs: List Matching Lines
List Matching Lines, Copy, Count
- Alt+x
list-matching-lines【Alt+s o】 (alias ofoccur) -
- List all lines in the current buffer that matches a Regex pattern.
- Result is shown in a buffer named “*Occur*”.
- Clicking the line jumps to the match location.
emacs list-matching-lines 2021-07-18 - Alt+x
copy-matching-lines -
Copy lines that matches a regex pattern.
- Alt+x
count-matches(alias ofhow-many) -
- Print number of matches by Emacs: Regular Expression.
- Count starts at current cursor position to end of buffer.
Delete Matching Lines, Delete and Copy, Delete Duplicate Lines
- Alt+x
kill-matching-lines -
Copy and delete matching lines
- Alt+x
delete-matching-lines(alias offlush-lines) -
- Delete lines that match a Regex.
- Works on text selection or starts at the line your cursor is on.
- Alt+x
delete-non-matching-lines(alias ofkeep-lines) -
Delete non-matching lines.
- Alt+x
delete-duplicate-lines -
Delete duplicate lines in text selection.
List Lines in ALL Buffers
Alt+x multi-occur if you want to list lines in ALL buffers.
Emacs Find Replace
- Emacs: Search Text
- Emacs: Find Replace
- Emacs: Find Replace, by Regex
- Emacs: Find Replace and Change Letter Case
- Emacs: Highlight Word, Line
- Emacs: List Matching Lines
- Emacs: Search Text in Directory
- Emacs: Find Replace Text in Directory
- Emacs: Regular Expression
- Emacs Init: isearch Whitespace Regex
- Emacs Init: isearch by Arrow Keys
- Emacs Flaw: isearch Current Word
- Emacs: Search Current Word 📜
- Emacs: Xah Find Replace (xah-find.el) 📦
emacs and elisp regex
- Emacs: Regular Expression
- Emacs: List Matching Lines
- Emacs: Regular Expression Syntax
- Emacs: Regex Backslash in Command Prompt
- Emacs: Case Sensitivity in Text Search Commands
- Emacs: Insert Tab or Newline
- Emacs: Wildcards vs Regular Expression
- Elisp: Regular Expression
- Elisp: Regex Functions
- Elisp: Regex Backslash in Lisp Code
- Elisp: Case Sensitivity (case-fold-search)
- Elisp: Find Replace Text in Buffer
- Elisp: Match Data (Regex Result)
- Elisp: Unicode Escape Sequence
- Elisp: Convert Regex to Lisp Regex String
- Elisp: How to Test Regex
- Elisp: Regular Expression in Lisp Syntax, Rx (Package)
- Elisp: Regex Named Character Class and Syntax Table
- Emacs Regex vs Regex in Python, JavaScript, Java