M-x Compile: A Deep Dive into Compiling Code with Emacs

Gavin Freeborn
26 Jan 202415:46

Summary

TLDRIn this video, the presenter explores the powerful built-in compile package in Emacs, which allows for compiling programs, running tests, and executing interpreters without the need for additional plugins. They demonstrate how to use the package with Python, navigate errors, and customize commands for different file types. The video also highlights the package's versatility, including its ability to handle ANSI color codes and set special environments for compilation. The presenter concludes by showcasing the package's integration with shell and terminal modes, enabling error navigation directly from logs or error messages.

Takeaways

  • 💻 Emac is a powerful editor with built-in capabilities for compiling programs, running tests, and executing interpreters without needing additional plugins.
  • 🔧 The 'compile' package in Emac is versatile and can be used for various tasks beyond just compiling code.
  • 🐍 The video focuses on using Python with Emac, demonstrating how to compile and run Python scripts directly within the editor.
  • 💡 Emac's compile command can be customized for different file types and projects, allowing users to run specific commands tailored to their workflow.
  • 🛠️ Errors in code can be navigated and viewed directly within Emac, which uses special filters to parse and display error messages.
  • 🎨 The video discusses handling colored output from compile commands, showing how to integrate with the 'ansi-color' package for better visibility.
  • 📝 Custom regular expressions can be created and applied to the compile command to better parse and navigate errors from different compilers or interpreters.
  • 🌐 The compile functionality is not limited to Emac's editor window; it also works in shell and terminal emulators within Emac, such as 'shell-mode' and 'vterm'.
  • 🔗 The video mentions 'Brilliant.org' as a learning resource for Python, math, data science, and computer science, offering interactive courses.
  • 👨‍🏫 The presenter, Gavin, shares personal experiences and tips on using Emac for programming, emphasizing the efficiency and convenience of its built-in tools.

Q & A

  • What is the main topic of the video script?

    -The main topic of the video script is exploring the compile package in Emacs, which allows users to compile programs, run tests, and run interpreters directly within the editor.

  • Why does the speaker think many people are not aware of the compile package in Emacs?

    -The speaker believes many people are not aware of the compile package in Emacs because they often resort to creating packages or using plugins, not realizing that Emacs has built-in functionality for these tasks.

  • What is the purpose of the 'compile' command in Emacs as discussed in the script?

    -The 'compile' command in Emacs is used to execute external commands, such as compiling code, running tests, or executing interpreters, and it can be customized for different programming languages and tasks.

  • How can the 'compile' command be customized for different file types in Emacs?

    -The 'compile' command can be customized for different file types by setting the 'compile-command' local variable in the file or by using a hook in the mode to automatically set the command when a file of that type is opened.

  • What is the benefit of using the 'compile' command for error navigation in Emacs?

    -Using the 'compile' command for error navigation in Emacs allows users to quickly jump between errors in their code by using the 'n' and 'p' keys, and pressing 'enter' to go directly to the error location.

  • How can the 'compile' package handle colored output from compilation commands?

    -The 'compile' package can handle colored output by using the 'ansi-color' package and a filter that processes the ANSI color codes into a format Emacs can display.

  • What is the significance of the 'project.el' functionality mentioned in the script?

    -The 'project.el' functionality is significant because it allows the 'compile' command to recognize the root of a project and execute compilation commands from there, which is helpful for managing compilation in larger projects.

  • How can the 'compile' package be used to update X resources files in Emacs?

    -The 'compile' package can be used to update X resources files by setting the 'compile-command' to run 'xrdb' with the file name, allowing users to update their X resources by simply invoking the 'compile' command.

  • What is the advantage of using the 'compile' package over external plugins for compilation in Emacs?

    -Using the 'compile' package over external plugins has the advantage of leveraging Emacs' built-in functionality, which is powerful and does not require additional package management or configuration.

  • How can the 'compile' package be extended to support new compilers or interpreters in Emacs?

    -The 'compile' package can be extended to support new compilers or interpreters by adding new entries to the 'compilation-error-regexp-alist' and 'compilation-error-regexp-alist-alist' with the appropriate regular expressions to match error messages.

  • What is the role of 'brilliant.org' in the video script?

    -In the video script, 'brilliant.org' is mentioned as a sponsor that offers interactive courses in Python, math, data science, and computer science, which can be beneficial for learning at one's own pace.

Outlines

00:00

💻 Exploring Emacs' Compile Package

The speaker begins by expressing their fondness for Emacs, an advanced text editor with built-in capabilities for compiling programs, running tests, and interpreters. They note that while many users create custom packages for these tasks, Emacs already has a powerful built-in compile package that is often underutilized. The video aims to explore this package, particularly for compiling Python programs. The speaker also mentions their recent haircut and introduces the sponsor for the video, Brilliant, which offers interactive courses in Python, math, data science, and computer science.

05:01

🐍 Utilizing Emacs for Python Development

The focus shifts to using Emacs for Python development. The speaker demonstrates how to install and use the compile package within Emacs to run Python scripts. They explain the use of the 'compile' command, which by default uses 'make' but can be customized for Python. The video shows how to run Python scripts directly from Emacs and navigate through compilation errors using the 'n' and 'p' keys. The speaker also discusses setting up a default compile command for Python files and handling error messages with special filters.

10:03

🎨 Customizing Emacs for Colorful Compilation Outputs

The video continues with customization tips for Emacs to handle colorful compilation outputs. The speaker shows how to enable error scrolling for long lists of errors and how to handle colored output from compilation commands. They introduce the 'ansi-color' package and demonstrate how to filter and display ANSI colors within the Emacs compilation buffer. Additionally, the speaker explains how to set up special environments for compilation within Emacs, which can be useful for setting specific variables or paths for the compilation process.

15:04

🔍 Advanced Error Handling and Regex in Emacs

The speaker delves into advanced error handling in Emacs, explaining how to create and use regular expressions to parse and navigate compilation errors. They guide viewers through the process of building a regex for Python's pyite tool and adding it to Emacs' compilation error parsing system. The video also covers how to use the compilation functionality within Emacs' shell and terminal modes, allowing for seamless error navigation even when working in those environments. The speaker concludes by expressing excitement about these features and encourages viewers to explore and utilize Emacs' compile package.

🙌 Appreciation and Closing Remarks

In the final paragraph, the speaker expresses gratitude to their supporters on Patreon and GitHub Sponsors, acknowledging their importance and the impact of their support. They reflect on the value of the compile package in Emacs and encourage viewers to experiment with it, especially for those who work with shells or terminals frequently. The speaker wraps up the video with a warm thank you and a wish for the viewers to have a great day.

Mindmap

Keywords

💡Emacs

Emacs is a highly extensible, customizable text editor used by programmers and developers. In the video, Emacs is praised for its built-in capabilities, including a compile package that allows for compiling programs, running tests, and interpreters without the need for external plugins. The script emphasizes that Emacs has powerful features that are often overlooked, such as the ability to integrate with programming languages like Python for development tasks.

💡Compile Package

The compile package in Emacs is a built-in feature that enables users to compile code and execute commands directly from the editor. The video script highlights how this package can be used for various tasks beyond just compiling, such as running interpreters and finding errors in code. It's showcased as a powerful tool that is often underutilized by Emacs users.

💡IDE (Integrated Development Environment)

An Integrated Development Environment is a software application that provides comprehensive facilities to computer programmers for software development. The script mentions IDEs to contrast with Emacs, suggesting that Emacs can perform many of the same functions expected from an IDE, such as compiling and testing code, without needing additional plugins.

💡Python

Python is a high-level, interpreted programming language widely used in the video script for demonstrating the capabilities of Emacs. The speaker uses Python files to illustrate how the compile package in Emacs can be utilized to run Python scripts, find errors, and navigate through them, showcasing the integration of Emacs with a popular programming language.

💡Error Navigation

Error navigation refers to the ability to move through error messages in code. The video script explains how Emacs' compile package allows users to navigate between errors using keys 'n' and 'p', and jump to the error location with 'enter'. This feature is highlighted as a powerful tool for debugging and testing, enhancing the development process.

💡Filters

In the context of the video, filters are used to process and display error messages in a readable format. The script discusses how Emacs uses special filters to parse and display errors from compilation, which can be customized using regular expressions. This feature is crucial for understanding and debugging code effectively.

💡X Resources File

An X Resources file is a configuration file used by the X Window System to set user preferences. In the script, the speaker mentions how the compile package can be used to update X resources by running the 'xrdb' command, demonstrating the versatility of Emacs for tasks beyond coding.

💡Shell Minor Mode

Shell minor mode in Emacs is a minor mode that provides Emacs-like features in a shell buffer. The video script explains how this mode can be activated in a shell buffer to use Emacs' compilation features, such as error navigation, directly within the shell, enhancing the user's interaction with the terminal.

💡V Term

V Term is a terminal emulator in Emacs that allows users to run a shell within Emacs. The script highlights how the compile package's functionality can be extended to V Term, enabling users to compile code and navigate errors directly in the terminal emulator, showcasing the deep integration of development tools within Emacs.

💡Regular Expressions

Regular expressions are patterns used to match character combinations in strings. In the video script, regular expressions are used to create custom filters for the compile package, allowing users to define how error messages are parsed and displayed. This is demonstrated as a way to tailor Emacs to specific programming languages or development environments.

Highlights

Emacs is a powerful editor with built-in capabilities for compiling programs, running tests, and interpreters without needing additional plugins.

The compile package in Emacs is versatile and underutilized by many users.

Emacs can be used for programming in Python, with the compile package facilitating tasks like running Python scripts.

Brilliant.org is highlighted as a sponsor, offering interactive courses in Python, math, data science, and computer science.

The compile command in Emacs can be customized for different tasks, such as running 'xrdb' for X resources files.

Errors in code can be navigated using 'n' and 'p' keys in Emacs, with the compile package automatically detecting and highlighting them.

The 'compile' command can be set up on a per-file basis or as a default command for specific programming languages like Python.

Emacs can scroll through errors automatically when compiling, enhancing the debugging process.

The ansi-color package and a custom filter can be used to handle colored output from compile commands in Emacs.

Special environments can be set up for compilation within Emacs, useful for setting variables like 'HOME' for root.

Regular expressions can be used to create custom filters for different compilers and error messages in Emacs.

The 'compile' functionality can be used in shell minor mode in Emacs, allowing navigation between errors in shell commands.

The same compile functionality works in V term within Emacs, showing the versatility of the compile package.

The video concludes with a call to action for viewers to try out the compile package and explore its features.

The video creator expresses gratitude to supporters on Patreon and GitHub sponsors for their ongoing support.

Transcripts

play00:00

how's it going everybody I love emac

play00:03

emac is a perfectly great editor and it

play00:06

has a lot of amazing things built into

play00:08

it and one thing that I think I as well

play00:10

as probably the majority of people that

play00:12

have used emac have wanted to do is

play00:14

compile programs run tests and run

play00:17

interpreters you know the usual stuff

play00:19

that you would expect to be able to do

play00:20

in an IDE now I've seen a lot of people

play00:23

create packages and come up with their

play00:25

own personal ways to do this in emac

play00:27

however I don't think as many people

play00:29

realize that this is built into emac you

play00:31

don't need to use some special Plugin or

play00:33

package to do it and it's actually

play00:34

really powerful and I see a lot of

play00:36

useful features that I don't see enough

play00:38

people taking advantage of so in this

play00:39

video I wanted to dig into the compile

play00:42

package which is built into emac that

play00:44

can be used for doing all of these

play00:46

different things and more hey everybody

play00:48

future Gavin here yes I did get a

play00:50

haircut thank you very much for noticing

play00:53

now in this video I'll be referring to

play00:54

the programming language python quite

play00:56

heavily if you aren't familiar with

play00:57

python and would like to learn it for

play00:59

free be sure to to check out today's

play01:00

sponsor brilliant brilliant offers an

play01:03

amazing interactive and multi-level

play01:05

python course and if that's not your

play01:07

thing then maybe try and dip your toes

play01:08

into any of its multile levels of math

play01:10

data science and computer science

play01:12

courses with new courses every month

play01:14

you'll never run out of content and

play01:16

you'll never run out of learning

play01:17

opportunities in addition to brilliant

play01:19

letting you learn at your own pace it

play01:20

can make the chaotic life that a lot of

play01:22

us live much easier and much more of an

play01:24

opportunity to learn at any given moment

play01:26

whether you be sitting on the bus

play01:27

waiting for a call anything like that

play01:29

you can always pick up brilliant and get

play01:30

a little bit of learning done each day

play01:32

for me this has been a huge impact in my

play01:34

life since I don't have a lot of time

play01:35

day-to-day to research and learn new

play01:37

things now I only have a few minutes to

play01:39

myself every few days because of that

play01:40

brilliant's been a huge help in this

play01:42

area since I can pick it up for a few

play01:43

minutes do a bit of learning and since

play01:45

it's so interactive I tend to absorb it

play01:47

a lot better than a big binge moment

play01:48

where I try to learn a bunch on a topic

play01:50

in a few hours to try everything

play01:52

brilliant has to offer now for free for

play01:54

a full 30 days check out brilliant.org

play01:57

Gavin Freeborn the first 200 of view

play02:00

will get 20% off Brilliance premium

play02:02

annual subscription now let's get into

play02:03

the video now for this video we will be

play02:05

using the compile package so we can just

play02:08

evaluate that eisp right here just to

play02:11

get the compile package installed and

play02:13

then what we can do is we can use MX

play02:15

compile and this will by default it will

play02:18

give you make- K and so this is

play02:22

basically a simple one if you're using

play02:24

make files for your project um but

play02:26

that's not very helpful in our case cuz

play02:27

we're not going to be using make we're

play02:29

going to be using python and a python

play02:32

file so just to open up a python file

play02:35

right here this is just a temp file and

play02:37

we can go ahead and try this out so we

play02:38

can do alt X compile this will give us a

play02:41

prompt where we can put in any command

play02:43

we could do pilent python we could even

play02:46

run any program on this really and by

play02:47

default you could also do it without the

play02:49

file name obviously so hitting enter on

play02:51

that will simply run python tmpy as

play02:55

you'd expect and this will give us the

play02:58

result right here hello world and and if

play03:00

we do compile again we get the same

play03:01

result we can also do uh recompile and

play03:04

this will just run whatever the last

play03:06

command we had was alternatively in the

play03:09

compile window you can hit G and this

play03:11

will rerun as you can see down here

play03:13

recompile which is pretty powerful now

play03:15

if you're in a project and you're using

play03:17

project. you can use control

play03:20

xpc and this will do the same thing but

play03:22

it will compile from wherever project.

play03:24

thinks the root of your project is which

play03:27

is pretty helpful and we'll use that

play03:28

later on in this video so you can use

play03:30

the compile command for a bunch of

play03:31

different things the most important one

play03:33

is finding errors so by default if you

play03:35

are in our python file and we made an

play03:38

error so let's put l at the start of

play03:40

this and let's maybe hit a couple extra

play03:41

lines just for the sake of uh showing

play03:44

this and then if we did compile and we

play03:46

compile it you see that we will get an

play03:48

error now we can actually navigate

play03:49

between these errors by hitting n and p

play03:52

by default and enter will actually take

play03:54

us to the error itself so how does it

play03:57

know about these errors well it's using

play03:58

special filters that we'll talk about

play04:00

later in the video but this is super

play04:02

helpful and Powerful for General

play04:04

debugging and testing and stuff like

play04:07

that now compile has a few other useful

play04:09

features this is uh one that I got from

play04:11

the emac wiki actually is if you go to a

play04:13

file like this this right here is an X

play04:16

resources file and whenever you modify

play04:18

an X resources file and you want to

play04:20

update it you have to run a command

play04:22

called

play04:23

xrdb and then the file name which right

play04:26

here I've added this little comment

play04:28

which will actually set the compile

play04:30

command so if I run alt X compile it

play04:33

actually sets xrdb and the file name as

play04:36

the compile command so you can actually

play04:37

use it for a bunch of different stuff um

play04:39

other than just compiling code and this

play04:41

is a really easy way to set it on a

play04:43

perile basis for example when I was

play04:46

using dwm actually I have a little uh

play04:49

shortcut right here so that way when I

play04:50

do compile it will do pseudo make clean

play04:53

install which is uh super useful and so

play04:56

you can use this for basically any file

play04:58

alternatively you can set up a default

play05:01

command so right here this is basically

play05:03

a really quick little command it will

play05:05

set the local variable called compile

play05:08

command this is what compile by default

play05:11

uses and I'm basically con catting

play05:13

python with the current buffer name so

play05:16

let's go ahead and add that and then

play05:17

we'll add this to the hook to python

play05:19

mode so whenever I open a file in Python

play05:21

mode this will be a set up for us I

play05:23

opened it brand new this time and so

play05:25

when I do compile instead of giving the

play05:27

US the previous thing that we had before

play05:29

it's able to actually determine the path

play05:31

for us so let's just go ahead and test

play05:33

this out with our error here and when we

play05:36

do compile yes it will give us the error

play05:39

message as we would expect so what if we

play05:41

want our errors to scroll so for example

play05:43

if we get a ton of Errors let's go to

play05:46

D.C and we do compile make clean and

play05:50

make so this will just basically rebuild

play05:53

our project we get a bunch of errors but

play05:55

by default it's not going to know to

play05:57

auto scroll to kind of just bring us to

play05:58

the bottom and so what we can do to do

play06:00

that is just evaluate this emac code

play06:02

right here and then if we go ahead and

play06:05

compile

play06:07

again it will scroll our errors with us

play06:10

which could be very helpful now what if

play06:12

our compile command produces colors well

play06:14

this is pretty easy to handle so let's

play06:16

go ahead and give you an example of what

play06:18

this would look like so in let's go to

play06:20

this project and we will compile but

play06:22

instead of using our previous command

play06:24

what we're going to do is we're going to

play06:25

do gp-- color equals always and this

play06:29

will be searching actually let's search

play06:31

for

play06:32

base so this will be searching all

play06:35

throughout this project and as you can

play06:37

see right here we are getting a bunch of

play06:39

garbage because of the Escape sequences

play06:41

so that's not going to really work for

play06:42

us so to solve this we can use the an

play06:46

color package as well as this filter

play06:48

right here um which I will link both

play06:51

these down in the description this

play06:52

basically adds an extra filter to our

play06:55

compilation buffer to basically filter

play06:57

our ansy colors into something we can

play06:59

can actually use so let's go ahead and

play07:02

go back to here compile run the same

play07:04

compile command and now as you can see

play07:07

we get pretty little colors no longer

play07:09

all these ugly Escape sequences now this

play07:12

setting right here for the special

play07:14

environments isn't useful for everyone

play07:16

but say for example you're compiling

play07:18

something and you need to set some

play07:19

special variable so here I'm setting the

play07:21

home directory as root for when I'm

play07:23

compiling things and if I go ahead and

play07:25

do compile and we Echo home you'll see

play07:30

that we get root now if I was to get the

play07:32

environment of home we would get Gavin

play07:35

okay because this is only available in

play07:36

the compilation buffer uh super useful

play07:39

if you guys are ever um needing a

play07:42

special environment that's not going to

play07:43

be available when you're programming

play07:44

this is kind of useful if you don't want

play07:45

to mess up your LSP but you need to do

play07:47

some special compilation settings um at

play07:50

certain points this can be useful for

play07:52

that now I alluded to a way to kind of

play07:55

set up different filters I talked about

play07:57

the sort of filters that were able to

play08:00

determine what kind of Errors we're

play08:02

getting and so these are actually

play08:03

determined using a regular expression

play08:06

now there's two important variables we

play08:07

have here so if we did uh let's go to a

play08:10

python project and if I did actually

play08:14

let's do a smaller python project uh if

play08:16

I did alt X compile and I Chang this to

play08:21

pyite Dot and hit enter just give it a

play08:24

second and we will get a bunch of errors

play08:27

and here we go so as you can see we have

play08:29

a bunch of errors but it's not really

play08:30

able to kind of determine where the

play08:32

errors are coming from and so this is

play08:34

because there isn't a regular expression

play08:36

available for it to use if we go back

play08:38

here and we look at these variables so

play08:40

we do hvv and we take a look at this

play08:43

variable this variable is basically a

play08:45

list of different filters it can use or

play08:47

different regular Expressions it can use

play08:49

and there's a big old breakdown down

play08:50

here and basically all these values are

play08:53

looked up in this compilation error rega

play08:55

XP aist aist so the A-list A-list is an

play08:58

a list of all these different values

play09:00

that we get rather than the original

play09:03

which doesn't really have anything other

play09:05

than just these symbols which are

play09:06

basically references to the actual

play09:08

regular expression in this A-list down

play09:10

here so what we need to do is we need to

play09:14

basically add a symbol which is going to

play09:16

represent our different compiler and

play09:19

we're going to add that to just the

play09:20

regular A-list and then we also need to

play09:23

actually add something to the um the

play09:26

A-list A-list I know kind of annoying

play09:29

that basically references that symbol

play09:31

and the regular expression and then how

play09:32

we want to match that regular expression

play09:34

to each of the different uh values so

play09:37

here I've set up one for pyite but we

play09:39

can actually kind of derive something

play09:40

like this on our own so let's go ahead

play09:42

and go to the errors and so what we can

play09:45

use to derive this is we can do alt X

play09:48

and we can do regex Builder now what we

play09:51

can do here is we can kind of come up

play09:52

with how we want to do this so what we

play09:53

want to do is we want to capture things

play09:55

so as we can see our error messages are

play09:57

basically two spaces so we want to do

play10:00

back slash back slash space why do we

play10:03

need two backslashes well a backslash is

play10:04

an escape and since this is a string we

play10:06

need two backslashes and if we did that

play10:09

again in space then we've matched those

play10:11

two spaces leading up to it now a back

play10:13

slash backs slash and a parenthesis this

play10:17

will basically capture something and so

play10:19

now what we want to capture is we want

play10:20

to capture uh any combination of a slash

play10:24

A to Z A to Z basically saying you want

play10:27

to capture against a slash any letters

play10:29

we also need to handle a dash or an

play10:31

underscore and then we want to repeat

play10:34

that so any repeated thing of any of

play10:36

these varieties so this will capture our

play10:39

file oh and I forgot the period there we

play10:42

go now we can capture the pi at the end

play10:44

and so that will capture our file name

play10:47

now we need to do a colon and then we

play10:50

need to capture our line number so doing

play10:52

the same thing we will do 0

play10:57

to9 Plus so basically any number from

play11:00

zero to nine and then that's what we are

play11:03

going to capture and then colon and then

play11:06

we need to do the exact same thing

play11:08

because we're basically instead of

play11:09

capturing a line number we're capturing

play11:10

a

play11:11

column and that should be enough for now

play11:14

so as you can see pretty easy to capture

play11:16

all of this stuff and then you could

play11:18

just say do a DAT star dollar sign uh

play11:22

basically just as a way to capture

play11:24

everything else all right cool now we

play11:26

have created our regex now if we put put

play11:29

that here it's basically I think it

play11:31

actually is identical yeah okay that is

play11:32

identical to what I ended up writing

play11:34

originally now we want to add this to

play11:36

our a list aist but the big thing that

play11:38

we still need to do is determine how

play11:40

we're going to map from this file which

play11:42

is here the line number that is here and

play11:45

the column number that is here now the

play11:47

nice thing is that basically the way

play11:49

that the actual matching works is in our

play11:52

A-list we give it our um obviously the

play11:56

symbol to match to it we give give it a

play11:59

regular expression and then each of

play12:00

these represents one of the things that

play12:02

we've captured so the first one is our

play12:04

file the second one is our line number

play12:06

and the third one is the column now if

play12:07

we were to transpose this that basically

play12:09

means that the first thing we captured

play12:11

was our number our line number the

play12:13

second thing was our file and the third

play12:15

thing was our column uh so basically

play12:18

luckily it's pretty self-explanatory out

play12:20

of the box when you go into this so if

play12:21

you actually look at this variable it

play12:24

explains it decently well um but you'd

play12:27

probably want to look at it so basically

play12:28

what's our reex and then the first thing

play12:31

that it captures is your file and so we

play12:34

just say that the file is the first

play12:35

element and then optionally you can give

play12:37

a line number you can give a column

play12:40

number and a type that's kind of how you

play12:42

can add your own filters if you have

play12:43

questions about that feel free to ask me

play12:45

because I feel like this was actually

play12:46

kind of a questionable example to use um

play12:49

but yeah now we can add it by doing CR X

play12:51

CR e on each of these guys and then if

play12:53

we go down into here and we hit G to

play12:56

rerun our compile compilation we will

play12:59

actually get something

play13:01

useful and there we go so now we can

play13:04

like navigate by hitting NP and we can

play13:07

see all of our

play13:08

errors very powerful very simple okay

play13:12

now this one is kind of just something

play13:14

that I never expected to see in the

play13:15

editor but I found really cool and so

play13:18

that is if we go to a Shell let's go to

play13:19

the same project we were looking at

play13:21

before and we did pyite dot so there we

play13:25

go we get our errors now obviously in

play13:27

the Shell we're not going to have the

play13:28

same available to us as we did in

play13:30

compile mode but you can do shell minor

play13:36

mode hit enter and this will actually

play13:39

allow you to use those very same regular

play13:41

Expressions as you had previously and

play13:43

then if you do contrl alt P this will

play13:45

navigate between them and if you hit

play13:47

enter it will jump to the file and you

play13:49

can use all those same rxes it works

play13:52

exactly as you'd expect it works with

play13:53

your mouse too now this is pretty sweet

play13:55

but some people don't even use the shell

play13:57

uh functionality well let me tell you

play13:58

this it works in other places there's

play14:01

even more uses for it so let's go ahead

play14:02

and kill this shell and instead we will

play14:04

open V term now in V term if we CD to

play14:08

the same thing CD Aries uh endorser and

play14:12

we do pyite dot we get the same errors

play14:15

just a second and there we go we've

play14:17

gotten the same errors now if we enter

play14:19

the same mode yep that's right it works

play14:21

just as you'd expect most support and

play14:23

everything even in V term which is super

play14:26

awesome not really something that I

play14:28

expect Ed to see and I actually was just

play14:30

only recently told about this the other

play14:32

day so pretty cool a really awesome

play14:35

feature if you guys make a lot of use of

play14:37

the shells or terminals you can make use

play14:39

of the compilation functionality right

play14:41

from there anyways guys I appreciate all

play14:43

of you for coming and watching this

play14:45

video I hope that really last part got

play14:47

you as excited as it got me excited when

play14:49

I found out about it because even though

play14:51

it's not something I use every single

play14:53

day it's something that every once in a

play14:54

while I'll find like a back trace or an

play14:57

error message in some logs when I had a

play14:58

shell open and I can just run this and

play15:00

boom right away I can jump to the errors

play15:03

and I don't have to like reverse

play15:05

engineer where it would be which is

play15:06

really awesome uh highly recommend

play15:09

giving some of this stuff a try

play15:10

especially just the general compile

play15:12

functionality um yeah anyways that's

play15:16

about it for me today uh I would like to

play15:18

give a big shout out to my supporters on

play15:20

patreon and GitHub sponsors you guys

play15:23

have done so much for me um yeah it

play15:26

really means a lot that you guys have

play15:28

supported me especially when you know

play15:30

sometimes I'm not able to upload as much

play15:31

as I would like and yeah I I really

play15:35

appreciate it great seeing you guys

play15:36

great talking to you and I hope you have

play15:38

a wonderful

play15:40

[Music]

play15:44

day

Rate This

5.0 / 5 (0 votes)

相关标签
EmacsCompile PackagePython CodingDebuggingIDE FeaturesEfficiencyCoding TutorialError NavigationTerminal IntegrationShell Minor Mode
您是否需要英文摘要?