u/daviwilSystem Craftersin r/emacs • Recommends
Reading and Writing Buffers in Practice - Learning Emacs Lisp #5
39K subscribers • 42 videos on Hallway
Intermediate. Assumes working knowledge.
15K views5 years ago1 recommendation
Programming languagesTools and practiceVim, Emacs and editorsLisp and Clojure
Learn how to write Emacs Lisp to read and write buffer contents through a practical dotfiles management example.
In this video, we'll work on a practical example of writing Emacs Lisp to read and write contents of buffers! We continue the work on our dotfiles management package, now called "dotcrafter.el", to add the ability to extract all tangled configuration paths from our Org Mode files and then write out those paths to the '.gitignore' file of the dotfiles repository. We cover the following topics: - Intro - Why learn about buffers? - What will we learn? - What is a buffer? - Getting the "current" buffer - Getting a buffer by name - Changing the current buffer - Changing the current buffer safely! - Working with file buffers - Example: Getting the buffers for our configuration Org files - Loading a file into a buffer - Example: Getting or creating the Org file buffer - What's the point? - Moving the point - Preserving the point - Examining buffer text - The Thing (thing-at-point) - Searching for text - Example: Finding Org code block output paths - Inserting text - Example: Updating the .gitignore file - Deleting text - Saving a buffer - Example: Cleaning up and saving the .gitignore file - What's next? - Sponsors and outro The package code from this episode can be found here: github.com/daviwil/dotcrafter.el/blob/8d507eda31e08a789c38a5… The show notes can be found here: github.com/daviwil/emacs-from-scratch/blob/master/show-notes… My Emacs configuration: github.com/daviwil/dotfiles/blob/master/Emacs.org If you enjoy this series, please consider becoming a sponsor on GitHub or Patreon: - github.com/sponsors/daviwil - patreon.com/SystemCrafters You can also leave a tip via PayPal: paypal.me/daviwil Follow me on Twitter for more Emacs content! twitter.com/SystemCrafters Chat with the System Crafters community on Discord: discord.gg/yVD8Gx6 Intro music: Coriolis Effect by logos feat. stefsax, licensed CC-BY ccmixter.org/files/mseq/26296What people say. Recommended as a practical tutorial for learning Emacs Lisp buffer manipulation.
u/daviwilSystem Craftersin r/emacs • Recommends