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

To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/GavinFreeborn/. The first 200 of you will get 20% off Brilliant’s annual premium subscription.
This tutorial is focused on Emacs's Compile package. We can use it to lint, compile, and run our code.
Let me know what you think and if there is anything specific you would like to learn about.
Emacs Config:
github.com/Gavinok/emacs.d
---------------► Come Join The Community◀︎---------------
LBRY:
odysee.com/@GavinFreeborn:d
Matrix Space:
matrix.to/#/%23gavinfreeborn:...
Discord:
/ discord
This video was sponsored by Brilliant
00:00 Start Of Video
02:04 Intro To Compile
03:14 Compiling Projects
03:29 Navigating Compilation Errors
04:07 Per File compile-command
05:01 Per Major Mode compile-command
05:41 Auto Scroll Compile Buffer
06:11 Handling Colors & Escape Sequences
07:11 Setting Env Variables When Compiling Code
07:56 Creating Your Own Filters (optional)
13:11 Finding Errors In Shell-mode and VTerm
14:42 Conclusion

Пікірлер: 33

  • @GavinFreeborn
    @GavinFreeborn6 ай бұрын

    To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/GavinFreeborn/. The first 200 of you will get 20% off Brilliant’s annual premium subscription.

  • @chrishipple4419
    @chrishipple44195 ай бұрын

    Incredible video. using the compile mode for python development to run tests & linters and other one off bash commands is something I saw tsoding do so I've been doing it a lot more lately , but this takes it to next level.

  • @blahblah49000

    @blahblah49000

    5 ай бұрын

    See also flymake-mode for linting live.

  • @gagagero

    @gagagero

    5 ай бұрын

    ​@@blahblah49000I was just about to mention it. I highly prefer it since it also gives highlighting.

  • @theodorealenas3171

    @theodorealenas3171

    5 ай бұрын

    Tsoding taught me that Emacs is more similar to Vi than NeoVim is to Vi. And now I love it. Compiling grep find-me -rn .

  • @Argletrough
    @Argletrough4 ай бұрын

    I've found it helpful to set compile-command as a dir-local variable (C-h f add-dir-local-variable) in the root of a project, so it's available in every file without having to add a header.

  • @GavinFreeborn

    @GavinFreeborn

    4 ай бұрын

    Great idea. I don't know why I didn't think to mention that in this video

  • @dianejaeger6427
    @dianejaeger64275 ай бұрын

    Great video Gavin. Love the runtime environment.

  • @GavinFreeborn

    @GavinFreeborn

    5 ай бұрын

    Glad you enjoyed it

  • @YoniDebel
    @YoniDebel5 ай бұрын

    Very helpfull video, please make more!

  • @randomsearches369
    @randomsearches3695 ай бұрын

    Glad, your are getting sponsored.

  • @GavinFreeborn

    @GavinFreeborn

    5 ай бұрын

    Thanks, I'm glad to have the opportunity 😊.

  • @intermarer9145
    @intermarer914524 күн бұрын

    Emacs has a regex builder?? Awesome 🥳

  • @alternateved1199
    @alternateved11995 ай бұрын

    Ah, custom filters are amazingly helpful. Thanks a lot Gavin for that tip!

  • @GavinFreeborn

    @GavinFreeborn

    5 ай бұрын

    Happy to help

  • @rlifts
    @rlifts2 ай бұрын

    Thanks. No Wayland yet? You got me started on eMacs a long time ago. Now I’m going from vanilla to doom. Checking it out.

  • @GavinFreeborn

    @GavinFreeborn

    2 ай бұрын

    Emacs has Wayland before using PGTK aka the pure gtk implementation. A quick google should bring you to the right place

  • @rlifts

    @rlifts

    2 ай бұрын

    @@GavinFreeborn I was asking if you're not using wayland yet? You're still on X11? Yea I've been using PGTK for a while now.

  • @antoniocorbibellot6532
    @antoniocorbibellot65325 ай бұрын

    Hi Gavin! Are you using eww for your bar? If so, mind you share the config? Thx!

  • @DooMWhite
    @DooMWhite5 ай бұрын

    Holy shit, this is amazing!

  • @theodorealenas3171
    @theodorealenas31715 ай бұрын

    Okay I have to say it: I read the title of the video, tried M-x compile and left without watching. I knew of C-x p c but not of M-x compile.

  • @abenezerasamnew219
    @abenezerasamnew2194 ай бұрын

    what border/frame are u using ? It's beautiful!

  • @insane_tux
    @insane_tux23 күн бұрын

    Hi, please tell me what kind of theme you have in emacs ?

  • @siksniper1996
    @siksniper19965 ай бұрын

    What font are you using? It looks really nice!

  • @GavinFreeborn

    @GavinFreeborn

    5 ай бұрын

    Pragmatapro

  • @garklein8089
    @garklein80895 ай бұрын

    I have a really jank script I wrote for running files, and one of the main things I use it for is running code in scratch buffers. Is there a way to do this with compile-mode?

  • @francisst-amour646

    @francisst-amour646

    5 ай бұрын

    Maybe you could call (compile "the command) in your jank scripts? Or perhaps call (compile-mode) to change the buffers' mode? Or even create your own major-mode that "inherits" compile-mode (just like grep-mode).

  • @muhammadaneeqasif572
    @muhammadaneeqasif5725 ай бұрын

    hi i really like your emacs setup can u please share your config?

  • @GavinFreeborn

    @GavinFreeborn

    5 ай бұрын

    github.com/Gavinok/emacs.d

  • @muhammadaneeqasif572
    @muhammadaneeqasif5725 ай бұрын

    which theme are u using

  • @GavinFreeborn

    @GavinFreeborn

    5 ай бұрын

    Spaceway, it's a custom version of space grey. You can find it in my config

  • @_idiot
    @_idiot5 ай бұрын

    is that a tiny house?

  • @GavinFreeborn

    @GavinFreeborn

    5 ай бұрын

    No just a tiny studio 😭