reddit / emacs

looking for a solution for note-taking

filipoi · 2022-06-16 17:18
I already use org-mode but in a very simple way so please assume that I have 0 knowledge about org-mode and I can miss something very obvious. I'm looking for a solution that will let me: - take notes that are stored in separate files (I don't want to think in what file I should save the note [ otoh I like how org-roam-node-insert first lists all of the existing notes] but I also don't want to have everything in one file) - notes should have tags - notes should have creation and last update date - I could easily list all my existing tags and show all notes from a tag - I could search my notes using dates - the solution should handle at least 1k notes I'm ready to write elisp but I would prefer to have something that ticks all the boxes. Please advise!
mclearc · 2022-06-16 17:28
For searching and creating notes files you might look at my https://github.com/mclear-tools/consult-notes package, which also works with org-roam. If you do use org-roam you should check out their Templating system for note capture/creation: https://www.orgroam.com/manual.html#The-Templating-System. Of course, org capture is very powerful and can be used whether or not you use org-roam.
00-11 · 2022-06-16 17:40
Here's one possibility: Use [**Bookmark+**](https://www.emacswiki.org/emacs/BookmarkPlus) bookmarks. Use bookmark [*annotations*](https://www.emacswiki.org/emacs/BookmarkPlus#BookmarkAnnotations) for your notes. Jumping to a bookmark goes directly to a location (in a file, at a URL, wherever). You can optionally automatically pop up an annotation buffer whenever you create or jump to a bookmark. With Bookmark+, annotations are in Org mode by default. An annotation (e.g. your notes for some location) is stored as part of a bookmark. Bookmarks are stored in one or more bookmark files. With Bookmark+ it's easy to have multiple bookmark files and switch among them, if you like. Instead of having your notes being stored in a bookmark, they can be *external* to the annotation, in one or more separate files (or at URLs, or at other bookmark locations). In that case, your annotation is *indirect* - when you show it you automatically end up at its external location. The annotation itself can include any other text (e.g. notes) you like, in addition to the indirection to the external note destination -- e.g. put a short description or meta-info in the annotation itself, and point to the full note. It's easy to edit bookmark annotations. They're just plain text (in Org mode by default, but you can use any modes). And you can [**tag**](https://www.emacswiki.org/emacs/BookmarkPlus#BookmarkTags) bookmarks in a completely flexible way: tags are arbitrary strings (or even arbitrary Lisp values!). You can easily find, sort, etc. bookmarks by their tags, matching regexps, sets of values, etc. You can search, group, sort, and otherwise organize bookmarks by type, date, tags, and in other ways. You can even bookmark sets of bookmarks, in several ways. You can also [highlight](https://www.emacswiki.org/emacs/BookmarkPlus#HighlightingBookmarkLocations) the locations of bookmarks, so when you're in, say, a file where you've bookmarked some locations, you can easily see where those bookmarks are. This makes bookmarks a bit like footnotes: you see an indication that there's a note there that you can access.
[deleted] · 2022-06-16 18:26
[deleted]
tangonov · 2022-06-16 19:02
Throwing my vote for `org-roam` into the hat. It does 90% of what the OP wants. I don't think there's a built-in for "listing all tags used in org-roam" but you can easily list all notes with a tag. It's powered with SQLite in the back and can handle heaps of notes. My only hang-up with roam is taking my notes on the go. The current version prefers the `#+:TITLE` attribute over a simple top level headline. Orgzly for Android (the best android app for org in my opinion) doesn't know what to do without any headlines. I don't want to add them because the look super redundant in all of roam's interfaces.
filipoi · 2022-06-16 19:35
tbh I'm just not sure how I can search notes by tags in org-roam. Do I need to write my own sql queries? Or does org-roam provide such a functionality out of the box?
filipoi · 2022-06-16 19:36
Thanks, that looks interesting! I will give it a try.
tangonov · 2022-06-16 19:44
You just need to update the display template to include the tags and whatever completion engine you're using (hopefully something vertical) should show the tags. This works for me with vertico + marginalia. [Section 5.5](https://www.orgroam.com/manual.html) of the manual details how to set the `org-roam-node-display-template`
filipoi · 2022-06-16 19:46
ah thanks! it works. I remember that in org-roam v1 you could search by tags by default and when I tried v2 I noticed that tags where gone from the default search list...
brwendel · 2022-06-16 20:55
Maybe Deft can help you
sudeenhux · 2022-06-16 21:23
Try org-roam? Could be more helpful than you might think.
Vagrian · 2022-06-16 21:48
Im using Logseq for similar workfow as yours. Open up journal, write notes, add tags. Each tag has page you can visit and see all the references, write queries etc etc. Take a look. Logseq basically replaced org-roam/org-mode for me since it does the job out of the box. Only issues I have is that its electron app so performance can be not so good. By the way, you can set logseq to work with .org files so you can use both logseq and org-mode
takeonrules · 2022-06-16 22:11
I make extensive use of Org Roam and tags; one "feature" I added to my setup is to be able to configure a list of tags and while that was set, all of my finds and inserts would apply those tags. https://github.com/jeremyf/dotemacs/blob/main/emacs.d/knowledge-management-config.org#org-roam
oldjawbone · 2022-06-17 01:32
You might try zk. I think it checks most of those boxes. https://github.com/localauthor/zk
E3D3redit · 2022-06-17 10:56
I use the builtin [org-capture](https://orgmode.org/manual/Capture.html) for easy note-taking. One great feature is that it can use org protocol for automatically adding notes from e.g. Firefox or Chromium. It stores the notes in one or more separate org files. I don't use an agenda in my daily life but recently started reading the info pages about org agenda. Org agenda has some interesting functions that make it very easy to collect and filter information, and much much more. No wonder the info manual about Org agenda is huge. Luckily it is not hard to read and it has nice examples for some of the intelligent customizations. What I like from my agenda experiments so far is that it doesn't need to create or modify existing files, unless we explicite order it to do so. So we can simply add our precious files or directories to the agenda and use this, for example, to easily grep in all the agenda files, not only for tags, properties, timestamps or other Org elements, but also for plain text.
jtr3322 · 2022-06-17 11:18
Every time someone asks a question like that, usually the first responses come with a bunch of packages you can install to get what you want. Everything you listed already exists in vanilla org mode. Some of the tools listed are great, but I for one implore you to learn org mode and discover what's there already before you install all the different things. I've been using emacs since 2018, and I keep going *backwards* and learn that do any things I installed work out the box already. So where do you start? Break down what you asked to focus on each item and look it up, then ask questions about that as you go. There are wonderful YouTube videos, blogs (I'm one of those), and of course the built in manual.
Tratentra · 2022-06-18 03:20
You can do all of that with Logseq if you learn a bit of Clojure.
AuroraDraco · 2022-06-19 02:30
The method org-roam-node-tags takes an org roam node and returns its tags. You can prompt for a tag and then filter org-roam-node-find to only show files with that tag. You need not mess with SQL queries. You can also display tags in the completion UI for a more direct search which I see was also mentioned here. But writing a set of functions to get all tags used in the network, prompt the user to select one and then only show the nodes with that tag should be close to trivial with some familiarity of the org roam code base. I presume it would take me like 1-2 hours to do it if you are interested in something like that. And if you are do mention all details that interest you. If I like the result I might use it for my own stuff as well
ovopax · 2022-06-19 18:59
[Denote](https://protesilaos.com/emacs/denote) by Prot. Just released.
AuroraDraco · 2022-06-19 19:16
For a more complete follow-up to my answer yesterday here is the code required for this. You can get all the tags existent in org-roam through a function such as ``` (defun org-roam-get-tags-interactive () "Collect all tags existent in org-roam. Collection is done with a `cl-loop' and duplicates are removed through `delete-dups'. This is the interactive version of `org-roam-get-tags' which also prints the results in the *Messages* buffer." (interactive) (let ((tags (cl-loop for node in (org-roam-node-list) if (org-roam-node-tags node) collect it))) (delete-dups tags) (message "%s" tags))) ``` which will print these results to the `*Messages*` buffer as well. For searching notes by any arbitrary tag, you can first collect all tags and then prompt the user to select one. After selecting you can filter `org-roam-node-find` to only show nodes with that tag. For this, you need these two functions ``` (defun org-roam-get-tags () "Collect all tags existent in org-roam. Collection is done with a `cl-loop' and duplicates are removed through `delete-dups'." (let ((tags (cl-loop for node in (org-roam-node-list) if (org-roam-node-tags node) collect it))) (delete-dups tags))) (defun org-roam-select-node-from-tag () "Prompt for a tag and run `org-roam-node-find' on nodes with that tag. The tags that exist in the database are gathered through `org-roam-get-tags' and the function checks if the selected tag is a `member' of the list generated by `org-roam-node-tags' for each node." (interactive) (let ((tag (completing-read "Tag: " (org-roam-get-tags)))) (org-roam-node-find nil nil (lambda (node) (let ((node-tags (org-roam-node-tags node))) (member tag node-tags)))))) ``` The first is the same function as above but not interactive and returning the list to be used in the second function which does what I mentioned above. This is a more direct way of approaching this since you asked for it. However the other answer of customizing `org-roam-node-display-template` is also a great one. I show node tags in my display-template as well. Peace