Files
hpr-knowledge-base/hpr_transcripts/hpr0861.txt

273 lines
16 KiB
Plaintext
Raw Normal View History

Episode: 861
Title: HPR0861: Emacs Part 3: The Reckoning.
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0861/hpr0861.mp3
Transcribed: 2025-10-08 03:42:05
---
Look, when this is Hacker Public Radio, my name is Kato, and this is the final episode
about EMAX that I have for you.
And you know what?
I'm sitting here, I'm looking at you, and I just, I see an EMAX Pro practically.
I don't know what else I can teach you.
You've come so far in so little time.
I really hadn't expected you to do quite so well.
I mean, no offense, but I mean, I just, no one's ever picked it up so fast.
You're just doing so, such a great job.
So, yeah, you're nearly an EMAX ninja, so I'm going to share stuff with you that, really,
I thought for sure I'd never get to in this episode, in this series.
I just thought it was going to be too complex, but I feel you're up to the challenge at this point.
You're just so amazing.
So, EMAX Jedi, here's, well, actually let's start with some, a little bit of a review.
So in the first episode, of course, we found out that there were buffers in EMAX, correct?
So if we open one text file, we see that in front of our face.
We open up a new text file, and it just kind of opens up right over that one.
So we've got two windows open, they're just not both visible at the same time.
Obviously, they're in a buffer, and you can switch buffers.
Do you remember what the keyboard shortcut for that is?
Of course you do.
It's Control X, and then B for buffer.
When you hit Control X, rather, and then B for buffer, in the mini buffer, that's the
little strip down at the bottom of EMAX, you get a prompt, and the prompt is asking you
which buffer you want to switch to, and if you hit the upper, the down arrow, it kind
of scrolls through this list of which buffer you want to switch to, and you can switch over
to scratch or messages, or whatever you might have opened at any given time during this
EMAX session.
And by default, it always wants to switch to the most recent buffer, so you can kind
of switch back and forth between two buffers really quickly, it's kind of nice.
So this is a very powerful feature of EMAX.
But there's another level here that you don't know about yet, and it's called something
that I actually don't know because I'm not an EMAX fanatic.
I call them frames.
They're probably frame buffers or something, or meta frame buffers.
I really don't know the term.
I'm going to call them panels or frames.
I'll probably call them whatever I want to, yet any given time, so just bear with me.
Try this.
So if you open up EMAX, you don't have to open up anything.
You can just sit there in the scratch buffer for now.
Hit control x, b, to switch buffer.
And then instead of choosing a buffer to switch to, just hit the question mark.
And notice how that brings up a new panel from the right, or at least on mine, it comes
in from the right, might come in from the bottom on yours, it depends on your setup.
It says something about clicking on a thing, and switching buffers and stuff like that.
We don't really care what it says.
I just wanted you to see that little frame thing that comes in, so it's basically splitting
up in some way.
It splits up your current window into two frames, either from the bottom or the side, whatever.
So we can control that.
We can make that happen on a regular basis.
So go ahead and click on something just to get that frame out of the way.
But here we are in EMAX.
We do a couple of things.
And I like to put EMAX in full screen mode for this demo, because this is a cool one.
So we've got full screen EMAX here, lots of screen real estate.
Honestly, in EMAX, you typically don't need all that room.
You don't want the text just spanning all the way across your window, usually.
80 characters across is usually pretty good.
And 80 characters just doesn't take up that much space.
So what we can do is we can split our window in half.
So we can have two different panels of EMAX at our back end call.
And to do that, you hit Control X and then the number three.
I don't know why they chose the number three.
I don't have a monomic for that.
I don't have any secret as to why that would be.
But that's what it is.
Control X and then the number three.
And you'll see what it does.
It splits it right down the middle.
We have a scroll bar now there between these two divisions of our EMAX windows.
Pretty cool, right?
How do you get from paying to paying?
Control X, O, and the way I remember that is other.
So if you do Control X and then O, you'll
see that your cursor is suddenly over there in the other frame.
Now right now, if you're doing it exactly like I am, where we didn't open up anything new,
we've just got two panels of the same exact frame.
And they are indeed the same.
And you can type into that scratch buffer.
And you'll see your text appearing in both sides of that frame.
So it's the exact same instance of the same file.
So we could open something in one of these things.
And what I usually do, honestly, is in my right panel, I open up a shell.
So I hit MetaX, which is AltX, or if you prefer Escape, and then X.
And then type in E shell.
And now we've got a terminal right over there on the right side of our window.
And then to get back over to our text document, or scratch document in this case, Control X,
O. And now my cursor is over on the left.
Pretty simple, huh?
We'll watch this.
Let's go back over to our terminal, Control X, O.
Now I'm over my little E shell.
And now if I hit Control X, and then the number 2, it just split that panel into half horizontally.
So now we've got a big panel on the left.
We've got a short, but long panel on the right, and a short, but long panel below that
on the right.
So it's a three-up view.
This is exactly, to me, this is a lot like Blender, because you can make all these divisions
in your screen space, and then bring up all different kinds of interfaces into each one.
So a lot of times what I'll do on the bottom panel, and to get there, it's just to Control
X, O, again, I'll bring up, like, either ERC, or some other text document that I want
to refer to.
That's actually what I usually do.
So I would do a Control X, Control F, and I'll bring up a ReadMe file, for instance, if
I was compiling software or something, I don't know.
Usually it's just a different file in the same document that I'm writing.
Now I've got three panels.
I've got my main panel on the left, and that's the big one where I work.
I've got an X term, essentially, an E shell, on the right, on standby, and I've got a
reference document on the right in the lower panel.
I imagine for coders, this would be great too.
I mean, I guess you could have, like, a, I don't know, go with me on this, a header file.
Is that what they're called?
On the top, and then, like, an include file or something on the bottom, and then your
main.c on the left, I have no idea what I'm talking about.
Point is, you can have lots of cool stuff going on all over the place in this little emax
editor deal.
Okay, well let's say you hate that, and you want to get rid of a frame.
That's pretty easy.
You go Ctrl-X-O to whatever, you know, you just do it so that you're in whatever frame
you, you want to have, or don't want to have anymore, make that the act of frame, and
then Ctrl-X-0, and that zeroes it out, as it were.
Now it only kills that current frame.
If you wanted to kill all the frames, and just get back to your big monolithic single
window, Ctrl-X-1, does that.
Okay, so what happened to those buffers that existed in those frames that we just killed?
Well, don't worry, they're actually still, they're still there.
If you hit Ctrl-X and then B, you see that everything that you had open is still there.
The readme is still open.
My main text document is still open.
My e-shell still exists.
And in fact, so does, like, messages and scratch and everything like that.
So you can kill the frames, but the buffers still exist.
So they're basically new viewports into your existing stack of buffers.
Again, this is all my terminology.
I have no clue if this is how E-max people talk when they get together for their little
E-max user meetings, and E-max user dinners and stuff that they do.
I never get invited to any of those.
Okay, so the other thing, the cool thing that you can do, let's split this up again.
Ctrl-X2 and a Ctrl-X3.
Now we've got a weird little configuration here.
Let's say that one of those panels becomes really important to you.
One of those frames gets really important to you.
So you'd Ctrl-X0 over to it.
It can be anyone you want.
It doesn't really matter.
And then hit Ctrl-X and then 5 and then 2.
I know that's a weird one.
And again, I have no clue how to remember it.
It's just so weird that you just kind of remember it.
So it's Ctrl-X and the number 5 and then the number 2.
That pops that frame out into its own window.
So let's say that you have to working on a text document and you realize, oh, I need
to be over on a different virtual desktop so that I can refer to something that I've got
going on over there.
Well, Ctrl-X52 pops out the frame into its own little window.
You can move it over to whatever desktop you want.
You know, I'm on desktop 2 with my little virtual window.
And I can type more stuff in and make it all fancy.
And then I can go back over to my other desktop and continue working within my established
frames.
Now, that's pretty powerful stuff.
It's a lot of window management all within your EMAX window.
And it's really, really powerful because I just can't tell you how organized it is,
especially if you're writing reference kind of material where you need to look at one
document so that you can refer to all these sort of like very technical documented features,
but you're trying to translate them into human terminology.
Or maybe you're writing one chapter, but it's like one scene from a screenplay and there's
another scene that you want to kind of have on hand.
Instead of flipping back and forth, you can just have them both open in the same window
in different frames.
And then you can always have that X term out there at the top right because you know
you're going to have something that you want to do in your terminal.
So this is very cool.
You could also have W3M like a web browser in one of those frames.
That's about the best kind of everyday user features that I can think to tell you about.
The frame thing takes a little bit of getting used to, but once you get it down that it's
Control X3 for the vertical split, Control X2 for a horizontal split, and then you can
split those splits and Control XO to navigate from frame to frame.
It's just, it works like a charm and don't forget you can always set any of these things
to other keyboard bindings.
It's just really, really simple when you get familiar with kind of the commands that you're
actually doing.
Another important key bindings that you might want to know about that I have not told you
about yet would be, well, I do it with the escape key and then the greater than symbol, or
that's the less than symbol, sorry, less than symbol gets you to the beginning of a document
and then escape greater than symbol gets you to the bottom of a document.
Those are very handy to know, at least I think so.
Of course, Control V is a page down, I don't really use page up so I don't even know
what it is.
And then I could use the EMAX tutorial and it would tell me.
And then there's Control S for searching a document so if you do a regular expression,
you can search through your document and it will keep searching for that as long as you
hit Control S. Just keep Control S and it'll just keep, you know, fine next, fine to
next, fine next.
And Control R is a reverse search and again it's just, as many times as you hit it, it'll
keep searching through that document and then at some point it'll say, okay, I've wrapped
back around to the top or the back to the bottom of your document and you're just going
in a loop so keep your eye on that mini buffer at the bottom of EMAX screen.
Other than that, I think that's really it for using EMAX, that is really scratching
the surface because there are so many plugins but in terms of just EMAX itself, those are
the killer features in my mind.
I couldn't really tell you how to do all that in VIM but I do know that it's all pretty
much possible in VIM so again it's not the fact that this is the only thing that, you
know, EMAX is the only text editor in the world that can split itself up into frames
and pop frames out of itself and launch different modes and stuff like that but it does have
a very unique workflow that just kind of fits when you're really writing a lot.
I don't know, somehow it just, it all flows really, really well and you don't, you know,
it's interesting because when I'm doing contra files and stuff, VIM is really great because
you never take your hands off of that home row but somehow when I'm writing paragraphs
like human sentences, it seems to really help me and even like a lot of HTML and CSS stuff,
it really seems to help me somehow the way that flow, just from the bottom up, from
Ctrl X up and Ctrl C and all these different keys, it's more like, I don't know, playing
a piano or something.
I don't know if VIM would be like playing an oboe or something.
I'm not really sure what any of these analogies are actually meaning but they're really cool,
EMAX is cool.
Check out different ways to launch EMAX too.
If you launch EMAX from your standard menu, it'll just bring up the white page with
a black text but if you prefer a darker inverted look, you can launch EMAX if you do it
from like a command line or K runner or if you just hard code your own menu, you know,
like for flux box or the KDE menu, if you just hard code it so that it's EMAX space-fg
as in foreground and then some color, that would be your text color.
So I have foreground being wheat, that is WHET so it's kind of an off white and then
I put the background dash BG as black and then the CR cursor red and that gives me a good
sort of inverted look that I like to use a lot.
So check that out and you know, do your own variations and check people's EMAX files
out.
I mean there's always hidden gems in those things.
Like mine out, mine is largely stolen from a friend of mine who uses EMAX a lot more
or I guess he uses a lot more than me.
I might be starting to catch up with him now but he has used it for longer than I have
and he's got a great, very cool dot EMAX file that he's compiled over time.
So he's got a lot of cool stuff integrated into his dot EMAX that I use now on a daily
basis.
Again, that's kind of like EMAX for me, that dot EMAX file is my definition of EMAX and
you can have one of your own.
You can construct your own dot EMAX file, you can rip people's off and eventually you
will fine tune EMAX into being an extension of your hands.
And this is the point where I tell you that I know at the beginning of the series I kept
saying I'm not trying to sell you on EMAX, you know what I totally, totally lied.
EMAX is the only text editor that you will ever use.
You've now been indoctrinated.
You know everything there is to know about it and now you love it.
So you might as well just succumb to it.
There is no other editor than EMAX.
You can say it with me.
There is no other editor than EMAX.
There is no other OS than can you and its kernel Linux that shall not use any other
editor than EMAX.
You have been listening to Hacker Public Radio at Hacker Public Radio.
We are a community podcast network that releases shows every weekday Monday through Friday.
Today's show, like all our shows, was contributed by an HPR listener by yourself.
If you ever consider recording a podcast, then visit our website to find out how easy
it really is.
Hacker Public Radio was founded by the digital dog pound and the infonomicum computer
cloud.
HPR is funded by the binary revolution at binref.com.
All binref projects are crowd-responsive by linear pages.
For shared hosting to custom private clouds, go to lunarpages.com for all your hosting
needs.
Unless otherwise stasis, today's show is released under a creative comments, attribution, share
a like, free those own license.