5 ms·
I have started to use org babel for a lot of things these days. To just write little experiments, or do ephemeral tasks. This is especially useful when I want t
by beepbooptheory 5y ago
I have started to use org babel for a lot of things these days. To just write little experiments, or do ephemeral tasks. This is especially useful when I want to operate on a db and remember the query, or have an org file that is like dashboard of views into a db, with lots of notes and links to other notes.
I use org-roam, and put a lot of things in dailies, so I have a temporal log of work that is easily searchable (using deft, or just rg). So much of the mental burden of where to put things is gone, they are in my journal now, and I can always tangle them into a file if I need to, and then I just start linking commits into org to continue to keep track.
Talk about tangling, I also have one big "system config" file that contains all of my rc files and other system configurations and scripts, with sensitive information encrypted transparently with org crypt. I just keep this all in my shared nextcloud Sync folder. I even have configuration and scripts for my homelab and personal server in other files!
Not only that, but I have started relying on org attach to keep a repository of miscellaneous files. Have some PDF or zipfile I dont want to forget about? I just attach it to the daily document and write some notes about it, and wherever I am I can get it. Even have started compressing old projects and "backing them up" into org.
I work through SICP these days in an org babel document, with liberal tangling and noweb, and now I have a journal to myself of my progress, constantly linking to other nodes as I gain more concepts.
I am not a professional computer person, so I don't work with other people. I understand that this works for me because of that.
- mynameismon 5y ago> I work through SICP these days in an org babel document Would you mind sharing a bit more on your workflow? I am personally going through Crafting Interpreters myself, and I am struggling to organise my code and notes, since I am unable to get org-babel to work like in separate files, and build in one go.
- Jtsummers 5y agoNot GP, but I've done this before. I don't have access to it at the moment, but I wrote a small shell script that invoked emacs (without running init.el/.emacs) and ran org tangle on a file. I incorporated that into a Makefile so it ran on every org file. I placed my org files in the same places (in the file system) as normal source files and had a 1-to-1 mapping of org files to <target language> files (C, Java, Lisp, Go, doesn't matter, done it all). 1-to-1 isn't necessary, I've also done one mega-file that tangled into many source files, including into subdirectories. After tangling, you can trigger any particular build system commands needed (like in rust, run `cargo build` or `cargo run`). Another thing I've done for smaller things is something like: #+BEGIN_SOURCE language :tangle foo.language ... #+END_SOURCE #+BEGIN_SOURCE sh build command foo.language ./foo #+END_SOURCE Run C-v-t (to tangle the source file(s)) and then navigate to that last block and use C-c C-c to execute it, which will execute the language specific build commands and then run the executable (adjust to particular circumstances). You can also have many of those shell blocks to run different things or in different ways (one to build a release version, another to build a debug version, another to run all the tests, etc.).
- mynameismon 5y agoAh, that actually seems extremely interesting. Thanks for clearing the multifile bit of it!