Managing Files and Directories in Practice - Learning Emacs Lisp #6

Опубликовано: 23 Март 2021
на канале: System Crafters
7,656
207

In this video, we'll learn how to manage files and directories using Emacs Lisp. We'll also walk through a lot of real code examples showing how to use these functions in practice! By the end of the episode, we will complete the core functionality of the dotfiles management package we've been working on in this series called dotcrafter.el.

Check out the show notes here: https://systemcrafters.cc/learning-em...

dotcrafter.el on GitHub: https://github.com/daviwil/dotcrafter.el

We cover the following topics:

0:00 Intro
0:39 What will we cover?
1:23 Explaining symbolic links
2:27 Our project: dotcrafter.el
5:04 Getting the current directory
7:17 Manipulating file paths
11:37 Resolving file paths
17:45 Example: Resolving the destination path of a configuration file
25:17 Checking if files and directories exist
26:19 Creating directories
29:00 Example: Creating expected directories before linking
34:47 Listing files in directories
42:51 Example: Finding the list of all configuration files to be linked
44:24 Copying files and directories
49:57 Example: Migrating configuration files to the dotfiles folder
57:41 Renaming and moving, and deleting files and directories
58:31 Finishing and demoing the example!
1:00:43 Creating symbolic links
1:03:15 Example: Creating symbolic links for all configuration files
1:17:08 The final code in action!
1:19:48 What's next?

My Emacs configuration: https://config.daviwil.com/emacs
My system configurations: https://config.daviwil.com/systems

If you enjoy this series, please consider becoming a sponsor on GitHub or Patreon:

https://github.com/sponsors/daviwil
  / systemcrafters  

You can also leave a tip via PayPal: https://paypal.me/daviwil

Follow me on Twitter for more GNU Emacs and GNU Guix content!
  / systemcrafters  

Chat with the System Crafters community on Discord:   / discord  

Check out my other video series!

Emacs From Scratch:    • Emacs From Scratch #1 - Getting Start...  
Emacs Tips:    • Emacs Tips - How to Show Reminders fo...  
Emacs Desktop Environment:    • Emacs Desktop Environment #1 - Gettin...  
Emacs IDE:    • Emacs From Scratch #8 - Build Your Ow...  
Emacs Mail:    • Streamline Your E-mail Management wit...  
Learning Emacs Lisp:    • Introduction to Emacs Lisp - Learning...  

Intro music: Coriolis Effect by logos feat. stefsax, licensed CC-BY
http://ccmixter.org/files/mseq/26296