 One of the biggest reasons to use Emacs as an IDE is the fact that it has so many tools already built into it. Emacs has a Git client built into it. Of course, it has org mode built into it for all your note-taking and agenda scheduling kind of applications. And then Emacs also has an IRC client built into it. It's there out of the box. That IRC client is called ERC. And that's what I'm going to talk about today. For those of you not familiar with what IRC is, it's a very old internet chat protocol. It's been around since the beginning of time. It's been around since before the web was created. So IRC is really old technology. And because of that, it's not a chat protocol most people know about these days. It's not a chat protocol most people use, but it is still very popular. It still sees a lot of use from those of us in the free and open source software community and really just the software tech community in general. You see a lot of neck beards that love to use IRC. Many free and open source projects have IRC channels where you can go get support or you can go get help information. And of course, those of you using Emacs as an IDE for your programming, your software development, most programming communities also have IRC chat channels for you to go and ask questions and get support if needed. So let me switch over to my desktop and let me show you ERC in action. So I'm going to launch Doom Emacs. I'm going to do MetaX ERC. And again, it's already installed out of the box with Emacs. You don't have to install any plugins. So MetaX ERC is the command. That's the standard command to launch the program. But honestly, you probably want to do MetaX and then ERC-TLS. That is going to launch ERC with a TLS connection, which is a more secure connection. So that is how I would launch it and then hit enter. It's going to ask you for your IRC server. What server do you want to connect to? By far the most popular server is Liberachat. And Liberachat is where most free and open source projects are going to be all your Linux distributions and programming languages and stuff like that. They typically have channels on IRC.Libera.Chat as the name of the server. Next, it's going to ask you for the IRC port. It defaults to 66.97. That is the correct port. Just hit enter. And then it's going to ask you for a nickname. Now I have a nickname registered on the Liberachat server. I am Distrotube. So anytime you see Distrotube as a nickname, that is officially me. That's my name because I signed up for it and I actually have a password for this particular nickname. So I'm going to enter my nickname. If you're not registered on Liberachat, just enter any nickname. As long as it's not currently in use, you will be given that nickname, at least temporarily. And then it's going to ask me for the password for Distrotube. So let me launch my password manager and get my Liberachat password. And now let me do a control shift V to paste my password in that field. And it's going to log me in to the Liberachat server. It may take a second. All right, and we are logged in and you can see you are now identified for Distrotube. So it recognizes my username and password. Everything was fine there. So the first thing I'm going to do is I'm going to zoom in a little bit so you guys can see everything here. Now if you're new to IRC, the way you join a channel is, let me get into insert mode, is you do the slash join command and then hashtag channel. So channel names typically begin with a hashtag, a pound sign. And I know there is hashtag Emacs, very popular IRC channel. So let's join them. It's going to ask me for my GPG key because I have everything GPG key protected here. So let me enter that phrase. And then once I enter my GPG key password, I am joined to hashtag Emacs. And it gives us a list, a very long list of all the users currently logged into this channel. And if I wait long enough, maybe there will be people chatting. You'll start seeing username and chat messages and things like that. And you can see this username Ganu Hacker. Interesting. I'll check. I don't know who he's talking to. One of the things with IRC is your chat logs are not saved. So I can only see the messages that were posted while I was here. And then once I leave, they're not saved anywhere. So this is a little bit different than something like Discord or Matrix, where your logs are always saved. You can go back and see chat that was happening while you weren't here. Now that's not the case with this very old chat protocol that is IRC. And one of the things you can do if you're joined a channel and you're not sure what the topic of the channel is, you could do slash topic. And we'll tell you the topic of the channel. Topic for hashtag Emacs is it was love at first sight. That doesn't really tell us anything. Anyway, Emacs questions take priority over chit chat. Use paste bin for more than three lines of code. So it basically tells you, hey, this is not just a standard chat about anything channel. It's specifically about Emacs. And if you're going to post more than three lines of code, use pacemen. So that's that's good information to know. Now, you can join multiple channels on a server. So the server's liberate chat, but I can be signed in or viewing Emacs here. And I can also join another channel. Maybe I want to join hashtag Linux. Well, that's a dollar sign. Hashtag Linux, one channel that someone recently asked me to join. It's another YouTube content creator that does Linux and BSD related content. You guys know the channel Zany. He created a channel over here called Unix Tube. And he wanted a bunch of Linux and BSD creators to actually join this channel and just for a place for us to hang out and interact. So I'm going to join hashtag Unix Tube and see who is there. And once again, it spits out a list of all the users that are currently in the channel here. Those of you that actually want to join a friendly little community, maybe check out hashtag Unix Tube on Libera Chat. Now, if you want to leave a channel, you could do slash leave. If you just want to quit everything, just slash quit. Now, even though I quit out of the Libera Chat server, this buffer is still here. There's nothing really going on in this buffer. So let me just kill it and get out of that buffer. Same thing with this buffer. Kill it. And once again, kill that buffer. So I need to be in normal mode to kill it. There we go. Now, what I want to do is I want to go into my DOOM config file. So I'm going to open my config.org here and let me zoom in a little more so you guys can see this because I have this section here. I mentioned ERC. I just showed you ERC without any configuration at all. And it's perfectly usable. I would be happy using it. But if you want some configuration options, I'm going to show you some of the configuration options that I have played around with and that I kind of like. So let me uncomment this here. So what we want to do is we want to define several variables that we're allowed to define here. And we need to use the setQ command. So setQ and then the name of the variable and then the value we are assigning to the variable and then just list them all in the same little block here using setQ. So the very first thing I want to assign is the prompt. It could just be ERC with the greater than sign, which was the standard prompt. There's nothing wrong with that. But you know, I wanted to play around with the prompt. So I did ERC dash prompt and then inside the parentheses, we have a lambda function, which is just an anonymous function, meaning I'm not going to name the function. It's a one-time use function. So I don't need to bother naming it. That's what the lambda is for. I have my org documents configured in such a way it actually converts the word lambda to a lambda symbol, but that is actually the word lambda in the plain text. And then what we're going to do is the concat command and buffer name. We're going to take the buffer name, which is in ERC. It's usually the channel name. So if I'm in hashtag Emacs, my prompt is actually going to now say hashtag Emacs, right, instead of just ERC. If I'm in hashtag Linux, the prompt is going to say hashtag Linux. And I think that's a nice little way to keep track, especially if you're in multiple channels at a time where it's obvious what room you're in. So you never accidentally type something thinking you're in one room and you're in a different room. Also, there's no reason for me to automatically have to type IRC dot LibreChat. If that's the only IRC server I'm ever going to go to, which in my case it probably is. So I'm just going to specify, just connect me to IRC dot LibreChat. And then I went ahead and specified my nickname because I'm always going to be distro to and then I also, this is optional, but just to let people know my full name, everybody, you know, my full names, public information. Anyway, obviously my name is Derek Taylor, DT, right? And then the next one, you may or may not want to turn this on ERC dash auto dash query. And then what we're assigning that to is a single quote, berry that word single quote, berry. And what this is, I made a note of it by default, ERC selects the channel buffers when it reconnects. If you'd like it to connect to channels in the background, use this. Then we have ERC dash field dash column. And I gave this a value of a hundred. I think the default value is like 72 or 76 or something. What this is is the size of the amount of text that appears in ERC. So, you know, it does a line break after 72 characters or whatever it is. I extended that a little bit to a hundred characters in this example here. Then we have ERC dash field dash function. And then I set that to ERC dash field dash static. What this is going to do is instead of having, when people are posting their chat, their username, colon, and then the chat, and it's not really aligned in vertical columns, what we're going to do is we're actually going to align this by setting this fill function to fill static and then setting ERC dash field dash static dash center to 20. So we're going to force that first column to always be 20 characters. That way the usernames and the messages are in perfectly even columns. I think visually that just stands out more and it's a little easier to read. There is another line here that I commented out and that is ERC dash auto join dash channels dash a list a list and elism is an associative list. This is a list of channels that you want to auto join as soon as you log into ERC. Now, because I'm using a GPG key, it doesn't really automatically join me into these channels because you saw when I tried to join hashtag Emacs, it asked me for my GPG password and so it's not going to really just auto join me to anything because I'm always going to have to enter a password that is just in my configure as an example for you guys. So let's actually see all of this in action. So let me do a colon W to write this file and then let me do space HRR and do me max space HRR reloads your config and now that we have reloaded the config. Now let me join ERC dash TLS. Let me launch ERC using TLS connection and it's going to ask me to once again join IRC dot Liberich had even though I specified the server, but at least it remembers what the server is all I have to do is just hit enter here and then IRC port 6697 nickname. It remembers the nickname remember before I had to enter distro to because it assumed my username would be DT because that's the username on my computer, but now it knows I want to be distro to once again. I do have to enter a password. So let me get my Liberich at passwords going to ask me to unlock the password store with a GPG key and then let me copy paste. All right, and we are now back in and now let me join hashtag you next tube. Let me get into normal mode and zoom in a little bit and now let me actually type something. So let me I to get into insert mode. I'm going to say hello all and I'm hoping to get some chat, but you can see where before distro to my username would be all the way to the left and then there would be the message right after it. Now we've assigned this column to actually be 20 characters that way the messages are always aligned and let me let these guys know recording a video say hi to YouTube. There's low spec Linux. You guys should subscribe to low spec Linux or actually his name on YouTube is low spec Linux laptop. So this was just a little bit of getting up and running with ERC in Emacs and for those of you that again want a nice little place to hang out. I don't hang out in this channel that often but these days because I'm in Emacs a lot many times I do join this particular channel hashtag Unix Tube. So sometimes you will see me hanging out here. It's not my channel. The maintainer of this channel is Zany make sure you guys go check out Zany on YouTube as well and hopefully we're going to get even more YouTube Linux and BSD Unix related content creators hanging out in this channel. I think it could be a fun little community now before I go I need to thank a few special people. I need to thank the producers of this episode. I need to thank Devin Gabe, James, Maxim, Matt, Michael, Mitchell, Paul, Scott, West, Alan, Ormer, Dragon, Chuck, Commander, Rangary, Diokai, Dylan, George Lee, Linux, Ninja Mike, Erion, Alexander, Peace, Origin, Fedora, Polly, Tech, Tre'Ala, Teetz, Furlust, Red Prophet, Stephen and Willie these guys. They're my highest tier patrons over on Patreon without these guys. This episode would not have been possible. The show is also brought to you by each and every one of these ladies and gentlemen as well. All these names you're seeing on the screen right now. These are all my supporters over on Patreon without each and every one of these ladies and gentlemen. I wouldn't be able to do what I do. You want to see more videos about Linux freedom of source software do me max subscribe to distro tube over on Patreon. All right guys. Peace. An elegant chat protocol for a more civilized age.