DT is being so much productive with videos recently! So much great content! Thanks DT
@nabarunr32 жыл бұрын
This is such a perfectly timed video for me I can't even.... It was just YESTERDAY I started using org-babel-tangle for programming. I needed to think for a second to press the default bindings for tangle. Seems like I do not need that anymore! Thanks DT!
@flip41192 жыл бұрын
I love the Emacs content DT. Is the best on your channel imo.
@DistroTube2 жыл бұрын
Glad you enjoy it!
@jackt-z2m2 жыл бұрын
+1!
@auroradraco99742 жыл бұрын
I have added org-babel-tangle to the after-save-hook so didn't know of this. I assume this is what that package does as well. Its definitely a necessary add if you tangle stuff often.
@Syncratci2 жыл бұрын
To be honest, I don't really understand the point of this package. That after-save-hook is literally 1 line of code and you can have it set for all org files or for only specific ones with local variables.
@jotix25702 жыл бұрын
yes, is literaly shorter to use after-save-hook... totally pointless this plugin
@nabarunr32 жыл бұрын
Just tried adding the after-save-hook. It's just: (add-hook 'after-save-hook 'org-babel-tangle) and it works just perfect.
@Syncratci2 жыл бұрын
Looking through the actual code, I guess the actual value proposition is that the tangling is asynchronous. I guess that could appeal to someone with an insanely large org file where tangling takes a while.
@predragmiletic30782 жыл бұрын
of course.. but these youtubers have no idea how emacs works so they need "packages" for everything. this was an awful video.
@Zakaros10002 жыл бұрын
I was persuaded to learn a bit of Org Mode by you when I see how you organized your config files, and I wanted to do the same with my html,css, javascript files, now that I-m learning web development. Now everything is easier to organize and keep track of what I was learning the day before o several days before. I don-t have the large chunk of code, instead I have one html, css and javascript files with foldable bullets for whatever they are mean to, and links among several related sections of those files. Everything is easier to track. Several months ago I was learning too, but because I let id for a while when I returned everything looked like a mess and a whole chunk of code hard to follow that require me to make a hella debug to see what everything was about, and the comments where hard to read and because of not being foldable the different sections it was well, I just give up on that xD. note: Btw don-t try to do just one large org file of front end divided in different things, it-s just a horrible Idea and the benefits of the foldable bullets are vanished in that situation. Another bad idea is to use org/mode to automate the creation of the html files, those hella names.... lol are okay for a blog but for large projects emmm nope. instead use it to organize your file and create a nice documentation.
@SouProds2 жыл бұрын
I was so impressed by your config files, I was inspired to go make my own using Org mode in Emacs, but didn't know how to make it write to my actual config file, this helped a ton!
@haidermirza1922 жыл бұрын
I had packaged this a few months ago for the Guix operating system/ package manager.
@AeriaVelocity2 жыл бұрын
I usually just use Org mode to write up college work and convert to PDF through LaTeX, but this looks pretty useful, maybe I'll end up using it at some point. Side note: I need to start experimenting with Elisp.
@erikgiorgis23352 жыл бұрын
I mostly use it for my doom emacs config, so I can have a single file that outputs code snippets to init.el config.el and package.el
@drishalballaney2 жыл бұрын
you can also directly export from org to pdf using C-c C-e and then select to which format you want to export to edit nvm it does not support directly exporting to pdf lol
@AeriaVelocity2 жыл бұрын
@@drishalballaney Yeah, but I typically just convert to LaTeX and then convert to PDF using MiKTeX, because my college's computers all have Windows, unfortunately, which for some reason the direct export doesn't work on :/
@drishalballaney2 жыл бұрын
@@AeriaVelocity rather you can export to html instead, that is a lot more portable :P
@AeriaVelocity2 жыл бұрын
@@drishalballaney Sure, but my college doesn't accept HTML documents XD
@thefearlessgeek2 жыл бұрын
Can Emacs do time travel? I need to go back in time and make a few different decisions.
@aritraranjanchowdhury14122 жыл бұрын
Can I write Mathematical expression in Org mode ?
@hermannpaschulke15832 жыл бұрын
This is known as literate programming, invented by Donald Knuth iirc. The original TeX source code was written this way.
@QQ-gn7tc2 жыл бұрын
Is it possible to get linting to work within Code blocks inside Org document ? Linting for Haskell as example ?. Thanks a lot DT.
@gflorin7761 Жыл бұрын
Hey, DT! What do you think of org-roam? Would love to see a video on this!
@valizeth40732 жыл бұрын
Is there a possibility to enable lsp-like features in org? Cause when I'm modifying my emacs config through a regular elisp file I get not only syntax highlights but also proper suggestions and linting, but I'm not in org mode.
@danieldoherty503411 ай бұрын
Use indirect buffers. In a source block, type C-c '. It puts the block in an elisp-mode buffer. When done, type C-c ' again.
@johannesjoseph8232 жыл бұрын
I started to watch more of your org mode videos. I write a lot of technical documentation and reference materials in French and German. How can I add spellcheck capabilities for org mode in those languages? Currently I only see autosuggestions for English
@mustafaakillll2 жыл бұрын
Hey DT, which wm are you using??
@DangerSepp2 жыл бұрын
Now I want bi-directional auto-tangle. Can Emacs do that? 😁
@DistroTube2 жыл бұрын
Since "tangle" is an org-specific program, I would assume that it wouldn't work going the other way (from a non-Org file to the Org file) since you would not be in Org Mode.
@theodorealenas31712 жыл бұрын
Can I link a file? Similar to how I can link an image in markdown. So only it's path is in the org file, but the org viewer actually displays me the contents. And perhaps Emacs would let me modify them as well. Because markdown shows images but if you look at what's in the markdown file, there's no image data.
@flip41192 жыл бұрын
@@theodorealenas3171 yes you can. by default inline images aren't shown in doom emacs i think though, and need to change that or open each image in an org file, but they are inline.
@theodorealenas31712 жыл бұрын
@@flip4119 Ok that's interesting. Although I meant if I can link a text file in org, similar to linking images in markdown. If I can do what DT did here, but without putting the text data in the org document itself. If an org document can display contents of text files, with inlining as you called it.
@drishalballaney2 жыл бұрын
pro tip: you just need a 4 line function in your config to automatically tangle currently open file :P
@hexisXz2 жыл бұрын
I just had an idea what if you make a video about you building the os that is the opposite of your os like for example i like xmonad with the alacritty terminal running the bash shell and doom emacs as my text editor so my opposite would be i3 running kitty as the terminal and fish as the shell then atom as the text editor so you should do something like that it would be all the things you dislike or all of the programs that are the opposite to the ones you use it would be cool
@wumi24192 жыл бұрын
It probably would be Windows )
@theodorealenas31712 жыл бұрын
Nice! I want to mention that there's a program, inotifywait I think, which can execute commands whenever a file is changed. So you could have used that to execute some tangling script I suppose. And if you know how to use it you can automate anything that should happen upon file/directory modification. Actually I'm sure you knew about it so how come?
@user-he4ef9br7z2 жыл бұрын
How is it any different from entr?
@theodorealenas31712 жыл бұрын
@@user-he4ef9br7z I don't know. I've barely seen how inotifywait works.
@eriklundstedt94692 жыл бұрын
Alacritty/wezterm, automatic config reload and the fact that I sometimes work on multiple functions simultaneously and often introduce crashes while wanting to save for security or gitsync, this is a fairly bad idea Plus, I just wrote all my configuration in lisp nowadays (a dialect called fennel if anyone is interested) and prefer removing a step, I also prefer working with modules which makes everything a lot more readable and manageable
@brickviking6672 жыл бұрын
One thing I learned a while ago: don't axe "production code", check that your new code works first, then you can simply copy over. Yes, it's an extra step to make sure that you diff the two, but it pays off. Generally, you can :tangle filename-new.ext and diff filename.ext with filename-new.ext to make sure the changes make sense to you.
@muddyexport56392 жыл бұрын
Yet another just like the others! #just-a-thought; #Idea_for_follow-up: Add the line to the "Org" scripts using a BASH file with standard GNU tools -- like one of the previous vids. Real world imiplementation.
@noferblatz2 жыл бұрын
Here's the problem with an ORG mode README. If I'm looking at the README for a project, I don't want to page through endless pages of code. I just want to see what the package does and other documentation details. Interspersing code with the documentation is a bad idea. Works for you, but not for other people.
@alt24582 жыл бұрын
But having the documentation and the code example in the same place helps a lot not only to follow along, but also to use as a template for our own purpose.
@overclucker2 жыл бұрын
I hate complicated readmes. Sometimes I'll make it 3/4ths of the way through before realizing the project doesn't do what I need.
@undefinednull5749 Жыл бұрын
@@overclucker This doesn't negate the superiority of the org format. It's just a shortcoming of people who don't include such a summary at top of file.
@minamur Жыл бұрын
the real problem is that actually, no one asked your opinion.
@amadocabrera5007 Жыл бұрын
I understand what you say, you don't always want to have both source code and documentation in the same file. But in my opinion you can keep having a sepparate file to make simpler documentation and the org file with a better detailed one. 😋
@yuvanmichael2 жыл бұрын
WOW! 381 UPDATES!!!
@armandfavrot3210 Жыл бұрын
Inspiring
@samwdp2 жыл бұрын
org-babel-tangle writes the org file as well as tangling it
@itsfish86722 жыл бұрын
Not a Emacs user but GVDT.
@m4rt_2 жыл бұрын
he he, I saw myself 1:35
2 жыл бұрын
05:44 Can Emacs get me a girlfriend?
@yuliusseraph49732 жыл бұрын
It can help! Org is amazing for productivity and self-improvement, which always translates into someone being attracted to you.
2 жыл бұрын
@@yuliusseraph4973 I wasn't expecting an answer, but it actually makes sense hahahah.
@rashie2 жыл бұрын
👍👍
@zeocamo2 жыл бұрын
DT if you like Emacs Org-mode then you will love Norg-mode in Neovim, it is org-mode done the right way, fair wraning if you try it, you will stop using Emacs org-mode.. it is so much better
@matsmcmats2 жыл бұрын
yeah, the me-too copy is probably surperior :P
@END902102 жыл бұрын
First
@DistroTube2 жыл бұрын
Confirmed!
@emvdl2 жыл бұрын
elisp -> after-save-hook
@aehjr12 жыл бұрын
You don't have to add a package to auto tangle your org file. A simple local variable can do the same thing. I have the following in my Emacs config org document, which every time I save it asks me if I want to tangle the file. I like to have choices, hehe. Local Variables: eval: (add-hook 'after-save-hook (lambda ()(if (y-or-n-p "Tangle?")(org-babel-tangle))) nil t) End:
@aehjr12 жыл бұрын
I should have added, nothing else is needed in the org doc, and that the Local Variables block is placed at the END OF THE FILE.
@theodorealenas31712 жыл бұрын
Replacing packages with simple scripts is my favourite mindset. I use a simple vim macro for bracket completion. It's expandable
@TrueWordsOfEternity2 жыл бұрын
if you did not know you can use this line inside of the init.el and it will read that org file without ever needing to tangle it this is what i use :) `(org-babel-load-file (expand-file-name "README.org" user-emacs-directory))`