Emacs' powerful OCCUR function in practice
Raw link: https://www.youtube.com/watch?v=zxS3zXwV0PU
In this screen cast I demonstrate the power of Emacs’ occur
function using a real-world scenario.
On the face of it, occur
is similar to grep
: it outputs a list of
results matching a search pattern. However, these results can be
interfaced with and can even be edited directly, with all changes
echoed to the actual file.
As such, occur
can be used as a “scoping” or “narrowing” tool to
limit the buffer to certain terms. Then the full editing capabilities
of Emacs can be put to use: replacing using regular expressions,
keyboard macros, external packages such as multiple-cursors
, etc.
I can already state with confidence that Emacs is a powerhouse of productivity once you familiarise yourself with its tools and utilities.