reddit / emacs

I think I finally "get it"

ottersinabox · 2022-09-26 17:37
I've been an emacs user for \~15 years now. I have always loved it. The ability to change the functionality of the editor, and to fit your editor to your workflow rather than the other way around is amazing. But I've never really been fully in Emacs. There are certain tasks that I do in a web browser or in a separate tool, like email or image editing, etc. For some of these, one could easily argue that Emacs isn't an appropriate tool (image editing). However, there are other features that Emacs has that don't replace functionality I already have, but rather, augment your workflow with something entirely new. And I will admit, I most definitely have not explored those as thoroughly as I perhaps should have. One of those long-untouched features is \`org-mode\`. I've tried to use it on many occasions before. I have the default buffer it opens up to be a "mega" org file that was supposed to be the center of my life. I've never been able to get into the habit of really using it. This past weekend, I finally gave \`org-roam\` a try. Wow. What a game changer! Being able to easily create new org "nodes" from anywhere, and automatically link all the org files is absolutely brilliant. I know it hasn't been long, but I feel like something is *different* this time. I'm not forcing myself to use it, but it naturally pops up in my general usage. I also use it with \`transient\`, which I always find helps me use certain functionality much more. I set up a dropbox (sorry) to sync and installed orgzly on my phone. I think the next steps for me are: * start using org agenda * tie in a cron job on my server to add daily tasks (?) maybe someone can give some advice as to what the right approach is! * generate a more visually appealing roam graph using d3js or similar * better view of org-roam tasks on mobile * tie it into a blog -> it would be nice to be able to specify a property that an org file is meant to be on a personal blog and use jekyll or similar to generate the web content. by using properties, i should also be able to filter my roam searches to just those items, etc. Curious if you have any other ideas and other workflows to suggest! :)
Nhaco · 2022-09-26 18:02
For the `generate a more visually appealing roam graph using d3js or similar`, have you heard about: https://github.com/org-roam/org-roam-ui ?
ottersinabox · 2022-09-26 18:23
Well *now* i have! Thanks! This looks awesome :)
Schievel1 · 2022-09-26 18:55
Cron job for daily tasks? What do you want to do? About the visually appealling graph, try out org-roam-ui. If that's not visually appealing enough I don't know what is
nv-elisp · 2022-09-26 19:23
> generate a more visually appealing roam graph using d3js or similar What for? I've never heard anyone make a compelling case for this.
ottersinabox · 2022-09-26 20:43
Obviously I'm new to this, but I imagine once I have lots of things in roam, it will at least be fun to explore that. In addition, it would be nice to be able to see connections between various projects, notes, ideas, and resources. It also will potentially help me "rediscover" some ideas. Of course, maybe all this is bogus, but I feel like it's worth it for me to at least take a look.
suikakajyu · 2022-09-27 00:46
Org-roam is certainly a game changer! If you find a good solution for viewing/interacting with org-roam files on mobile, though, please do share. So far the solutions I have looked into are Plain Org, which displays the files very nicely, but isn't able to offer much in the way of navigating between/searching for said files/nodes; and Logseq, which does at least provide a graph view, but doesn't render links properly or images at all.
takeonrules · 2022-09-27 01:44
Today, I just wrapped up registering two new link types: `abbr:` and `abbr-plural:` (see https://takeonrules.com/2022/09/26/on-storing-glossary-terms-in-org-roam-nodes/). Why is this cool? First, because as part of my blogging I make extensive use of the ABBR tag. But it was also a learning exercise and I'm thinking of how I might further leverage this functionality. And earlier, I amended my capture templates to help with my time tracking requirements at work. And because of the introspection of Emacs, I can "easily" fumble around and figure out how to hack and extend.
ilemming · 2022-09-27 04:09
Congrats. Yes, Org-roam is a game changer, for sure. It is kinda sad how many people don't realize that. Maybe they'd read a wikipedia article about Zettelkasten; Install Obsidian, try it and would be like: "meh, I don't think this shit works". I personally used Org (vanilla Org) extensively. I didn't want to switch to Org-Roam because I felt I heavily invested in making everything work for me. But then I read "How To Take Smart Notes", and started making notes in Org-Roam. I decided to go through the book and take notes. Remember? > "Notes aren't a record of my thinking process. They are my thinking process" - Richard Feynman. And then after that it just clicked for me. All these years I've been using Org-mode and a lot of mental effort I have wasted on thinking "how to organize my notes". Should a thing be included in one heading as a subheading? Should I use a date-tree? Should I keep everything in a few big files or a bunch of small ones? Turns out, that all really don't matter. Today, whenever I'm adding a note, I just need to ask myself a single question: "In what context should I re-discover this note?". And that's it. > I think the next steps for me are: > start using org agenda Here comes a grain of salt. You may not need to use agenda anymore. First, historically org-agenda wasn't built for thousands of headings scattered across multiple (possibly hundreds and more) files. It just can't read all the files efficiently and it doesn't have caching layer (unlike Org-Roam). So Org-Roam is not very compatible with Org-Agenda, just yet. Jethro promised to make that happen someday. But here's the thing - I haven't used Agenda since started using Org-Roam and I'm doing just fine. Note that I used Agenda *a lot* before switching to Org-Roam. I don't even use tags and TODO states anymore, because for me a "TODO" is just another Org-Roam node. It looks like this: ``` * UNREAD :PROPERTIES: :ID: todo-this-thing :roam_aliases: TODO :END: ``` The reason it's called 'UNREAD' and not 'TODO', because the latter has special meaning in Org-Mode and it would just look weird - like an empty heading with a todo state. > tie in a cron job on my server to add daily tasks (?) maybe someone can give some advice as to what the right approach is! I'm not sure what you mean, but I can probably share some ideas if you explain. > generate a more visually appealing roam graph using d3js or similar Have you tried https://github.com/org-roam/org-roam-ui ? With xwidgets you can have it right in Emacs. (defun org-roam-toggle-ui-xwidget () (interactive) (let* ((url (concat "http://localhost:" (number-to-string org-roam-ui-port))) (buf (or (xwidget-webkit-get-url-buffer (concat "localhost:" (number-to-string org-roam-ui-port))) (xwidget-webkit-url-get-create url "*org-roam-ui*")))) (if-let ((win (get-buffer-window buf))) (delete-window win) (switch-to-buffer-other-window buf)))) > better view of org-roam tasks on mobile Some people successfully used Loqseq specifically for mobile, but I haven't tried that.
snippins1987 · 2022-09-27 06:10
Dude, I think you just convinced me to use org-roam. I didn't realize that org-roam fit perfectly with how I work and learn things.
SamoedRoman · 2022-09-27 06:31
You can use [ox-hugo](https://github.com/kaushalmodi/ox-hugo ) for your blog. This works great with org-roam templates.
divinedominion · 2022-09-27 07:23
I could imagine it's fun! From a 10+ years Zettelkasten perspective, I can say it's not essential. When the complexity of the note network goes beyond a certain threshold, visualizing the connections is so noisy it's getting confusing.
[deleted] · 2022-09-27 11:37
[removed]
yantar92 · 2022-09-27 12:10
> tie in a cron job on my server to add daily tasks (?) maybe someone can give some advice as to what the right approach is! There is org-habit module, which is built-in Org mode. See https://orgmode.org/manual/Tracking-your-habits.html#Tracking-your-habits It is integrated with agenda.
emacsmonkey · 2022-09-27 13:31
Can you explain your org roam workflow without agenda? How will you know what tasks you'll work on a day and how will you schedule and followup
ilemming · 2022-09-27 17:14
So, I have a file called planning.org. The structure is a daytree (see https://orgmode.org/manual/Capture-templates.html) My dailies are also in a daytree format. I organized them a-month-per-file, i.e.: `2022-09-work-notes.org, 2022-08-journal.org`. I separate personal and work-related dailies. My daily capture templates are: ``` (setq org-roam-dailies-capture-templates '(("w" "work" plain "%(org-roam-capture-dailies--set-node-props \"work\")**** %?" :if-new (file+datetree "%<%Y-%m>-work-notes.org" 'day) :jump-to-captured t :unnarrowed t) ("j" "journal" plain "%(org-roam-capture-dailies--set-node-props \"journal\")**** %?" :if-new (file+datetree "%<%Y-%m>-journal.org" 'day) :jump-to-captured t :unnarrowed t))) ``` You can disregard `org-roam-capture-dailies--set-node-props`. It's a function that inserts a link to [[work]] or to [[journal]] at the top of the file and does some other minor things. --- As I mentioned, before Org-Roam I spent a lot of mental effort trying to organize notes, also using date-pinning. Turns out, the brain (mine at least) doesn't really work that way. There's no useful mental payload in "something that happened last Wednesday of October, last year". I now use different things to mark and label data. For example, I keep the names of all my colleagues in my team. It's very nice when you need to find something based on: "Oh, I remember we discussed that with Mark..."
ilemming · 2022-09-27 17:21
Do it. It's not that difficult. Just backup your old notes, set up org-roam and go. It feels liberating. I have thousands of notes now, and I don't even care, I never struggle to find relevant stuff, unlike before. That reason alone made me want to write down every single thing. Before, it required some mental effort. I kept thinking: "now, where this shit belongs?"
WallyMetropolis · 2022-09-27 18:51
I use and like org-roam quite a lot, but don't sleep on the built-in org-capture capability for being able to take notes from anywhere without context switching and having them templated, filed, and structured appropriately. And then dropping you right back into wherever you were. It's great for adding todo's, deadlines, meeting notes, or thoughts as they occur. Org mode allows for linking to files or headlines directly, so interconnections are also easy to establish.
paretoOptimalDev · 2022-09-27 19:02
> But here's the thing - I haven't used Agenda since started using Org-Roam and I'm doing just fine. Note that I used Agenda *a lot* before switching to Org-Roam. I don't even use tags and TODO states anymore, because for me a "TODO" is just another Org-Roam node. It looks like this: Would you mind giving an example of how you use that in practice? It sounds like your Inbox node is the only place tasks go?
paretoOptimalDev · 2022-09-27 19:04
> * tie in a cron job on my server to add daily tasks (?) maybe someone can give some advice as to what the right approach is! You may want this instead: https://www.nongnu.org/org-edna-el/
ottersinabox · 2022-09-27 23:00
A lot of interesting insights here. Last night, I spent some time playing with emacsql in conjunction with roam and I figure with the right combo of that (searching via tags, etc), I should be able to get a better workflow.
ottersinabox · 2022-09-27 23:03
Roam UI let's you look at just a small part of your tree, so perhaps that would make it more manageable. Tags as well. Obviously right now I don't have much in there, but getting some metrics on my files in the future could be fun as well.
ottersinabox · 2022-09-27 23:03
Cool, will try it out. Does it handle roam links properly?
ottersinabox · 2022-09-27 23:03
There are so many cool tools... Seems like org itself is a huge ecosystem!
ottersinabox · 2022-09-27 23:04
Thanks for the thoughtful responses everyone! Obviously I still have a lot to learn about org, but I'm excited to see how it will transform my life!
[deleted] · 2022-09-28 12:36
[removed]
ilemming · 2022-09-28 19:55
> Inbox node is the only place tasks go No. Here's my usual workflow. First thing when I start my day I open my planning.org, it looks something like this: ``` * UNREAD :PROPERTIES: :ID: todo-this-thing :roam_aliases: TODO :END: * INPROGRESS * COMPLETED * FOLDED * SOMEDAY * OBSERVE * 2021 ** January ** February ** etc. * 2022 ** January ** February ** March ** etc. ``` I would select UNREAD. remember, I couldn't name it TODO, but note the roam_alias. I can still call `org-roam-node-find` and select TODO that way. Once I jump to the heading, I open all the backlinks. These would be all the tasks in my current TODO-list. Each task could be anywhere. It could be within the daytree below in the same file. It could be a daily task. It could be any org-roam node. Or subheading in the node. Anything that I link to [[TODO]] appears in that list. TBH, I don't even need these daytree sections in this file. I can keep them TODOs scattered around my dailies. But somehow I started it this way, but there's no semantic difference where I place the task. As long as I "tag" it with [[TODO]], that will remain something that needs my attention. That's the main point of org-roam. There's no "inbox" - put your stuff anywhere you like, it doesn't matter. What matters is the context you want to rediscover a task later.
[deleted] · 2022-09-29 13:36
[deleted]
ilemming · 2022-09-29 17:36
I've never used Denote, I don't know how it differs, what does it do better or what's missing.
ottersinabox · 2022-10-02 05:00
Curious, are the \`xwidget-webkit-get-url-buffer\` and \`xwidget-webkit-url-get-create\` functions ones that you wrote? I can't find any reference to those functions.
ilemming · 2022-10-02 05:22
Oh, my bad. I missed those. (defun xwidget-webkit-get-url-buffer (url) "Returns xwidget buffer that points to URL, nil if none." (interactive) (when-let* ((r (lambda (x) (when x (replace-regexp-in-string "http\\(s\\|\\)://" "" x)))) (fnd (seq-find (lambda (x) (string= (concat (funcall r url) "/") (funcall r (xwidget-webkit-uri x)))) xwidget-list))) (xwidget-buffer fnd))) (defun xwidget-webkit-url-get-create (url &optional buffer-name) "Opens existing xwidget buffer, if it exists for the given URL, or creates new session. Optionally, BUFFER-NAME can be set" (interactive (list (or (thing-at-point 'url) (car (browse-url-interactive-arg "xwidget url: "))))) (require 'xwidget) (or (xwidget-webkit-get-url-buffer url) (progn (xwidget-webkit-browse-url url :new-session) (let ((buf xwidget-webkit-last-session-buffer)) (run-with-timer 1 nil (lambda (buf buffer-name) (with-current-buffer buf (rename-buffer (or buffer-name (concat "*xwidget " url "*"))))) buf buffer-name) buf))))
ottersinabox · 2022-10-02 11:23
Ah, sweet, thanks! Is the timer in the because the WebKit buffer renames itself at some point after the page is starting to be loaded?
ilemming · 2022-10-02 21:31
Yeah, something like that. I don't remember the details anymore. xwidget is very fickle. I don't use it much. Most annoying bug that I often hit is when <escape> stops responding. Some time ago I tried to find a fix for it, but I couldn't figure it out, IIRC something needs to be fixed in C portion of it, but I didn't know how to reproduce the bug idempotently, so I gave up. The only workaround I know is that you need to manually perform the mouse-click anywhere on the page, otherwise <escape> remains locked. And that's utterly annoying. But I use xwidget sometimes for org-roam-ui - I have similar keybindings for org-roam-toggle-ui-xwidget and browse-url for org-roam-ui (to open it in an external browser). My only complaint today is that org-roam-ui is not keyboard driven. It would've been nice to open it and start typing immediately, to filter for certain nodes. Well, maybe someday.
snippins1987 · 2022-10-08 00:36
Thanks again. I had a blast last week. Actually focus on writing the notes content without the burden of organizing is wonderful. I also found myself to retain, finding and linking information a lot quicker. It does feel liberating, just as you said.
divinedominion · 2022-10-10 08:05
> generate a more visually appealing roam graph using d3js or similar Rui Carmo visualized his 20 years worth of personal wiki/blog with a 3D library that apparently runs smoother than D3: https://taoofmac.com/space/links/2022/10/09/1930
ottersinabox · 2022-10-10 12:25
Wow. This looks very cool. At the same time, it looks largely useless hahaha. I guess I'll need to take a look at the api to see if it achieves what I'm looking for.
divinedominion · 2022-10-10 15:42
I'm with you on both :) I think that's the curse: it's inticing, but also useless