# Emacs: Confusion with zetteldeft, deft, org-roam, org-mode

edited October 2021

The problem with Emacs and its modes is that you can not simply install something and click some minutes around to get an idea about if it could fit your needs or not. Some question comes up with all the (for me) known possibilities with ZK around emacs.

In the context of ZK I currently started using zetteldeft which is build on deft.

1. What is the difference between zetteldeft and deft - in description of feauters?

2. What is the difference between org-mode and org-roam?

3. Do I understand it correct that org-roam use sqllite database instead of plain text files? In that case it would be disqualified for ZK.

4. What is the diff between org-roam and zetteldeft?

5. Any other suggestions in the context of Emacs here?

• What is the difference between org-mode and org-roam?

Org-roam sits on top of org-mode.

Any other suggestions in the context of Emacs here?

Get really, really good at org-mode in order to craft your own setup. It is very flexible and probably the only thing you need, if you know how to rule it.

1. Deft is a way to quickly full-text search and filter your notes or any directory of text-based files. Zetteldeft is an extension to deft which adds backlinking functionality.
2. Org-mode is a mode/syntax for doing task-management, (academic) writing, project planning, and, notably, note taking. Think of a really beefed up Markdown, but integrated into a system in which everything uses that syntax and can communicate with each other seamlessly, rather than having different systems for each (TeX/Word for academic writing, Markdown/whatever for notes, Google Calendar for agenda, Todoist for todos etc).
Org-roam is an extension of org-mode which adds a database to keep track of backlinks and other stuff. This database is generated from your notes, so don't worry about lock-in. It encourages small, atomic notes, rather than the ginourmous notes with tons of headings you would normally be inclined to create just using plain org. It also has a number of useful extensions (see later).
3. As I mentioned in 3, it uses both. The text of your notes is just stored in your notes, org-roam adds the database on top of that in order to make searching and indexing easier, but is wholly independent on it. Notably, the text of your notes is not stored in that database, just links, ids, and certain other properties.
4. Org-roam works with the database, has a much more lively community and more extensions that integrate with it. It's also (as the name suggests) more closely attached to Org-mode specifically, while Zetteldeft is file agnostic. I think this is a pro for org-roam, as I think more managed workflows can be much more useful than figuring out everything from scratch yourself, but that is up to your preference. Org-roam also provides a native backlink sidebar which is very useful.
5. I'd recommend using org-roam (duh), and also (shameless plug) org-roam-ui, an extension I am developing which provides (for now) a highly customizable graph overview of your notes/links, plus a way to preview your files. It only works with org-roam though, as I need the database (else I'd reimplement it all myself, which seems a bit of a waste).

The one disadvantage of org-mode is that it is quite Emacs specific and does not have a lot of good ways of interfacing with it outside of emacs. I am trying to rectify that with org-roam-ui, but that'll take a while.

Hope that helps!

• edited October 2021

Thank you very much for your details.
Can you recommend a ZK-how-to for org-roam? The official docu (https://www.orgroam.com/manual.html) does not help here because it simply describe features but does not lean on ZK-workflow like the zetteldeft tutorial (https://www.eliasstorms.net/zd-tutorial/). And I am scared that I have to learn org-mode first before starting with org-roam. Zetteldeft itself (with it's tutorial) is usable without knowing about deft.

EDIT:
E.g. see the introduction of a "node" (is it a zettel?)
https://www.orgroam.com/manual.html#The-Org_002droam-Node
Looks damn complexe. do I have to write such multiline headers with meta-infos for each zettel? I know there is a template mecha in org-roam. But do I have to set this up for myself or is there a usefull ZK fitting default-setup?
Questions like this are not answered by the manual and a manual is not suited for that but a tutorial would be. Zetteldeft is a good example here comparing its "manual" and its "tutorial".

EDIT:
I see it coming that I have to step back to youtube and watch a lot.

Just to make it clear: I am not dissatisfied with zetteldeft. But org-roam still keeps me interested because it is org-mode under it. And the whole world talk about org-mode.

Post edited by buhtz on
• No, you don't have to write all that information yourself, org-roam takes care of doing all the IDs through the default template. So if you do 'org-roam-node-find' and type in a new title, say "My first note", org-roam will automatically create a file with
1. A file name of YYYYMMDDHHMMSS-my_first_note.org
2. A #+title: My first note
3. the property drawer you see in the manual with an :ID: property, which by default is just a random string of characters.

That's it! You can customize the templates to say a lot of things, such as add custom properties, tags, or prefilled content! I for instance have a template for people, which prompts me for their name, birthday and address and then fills the properties with them. I also created an extension (org-roam-timestamps) which auto adds creation and modification times to the nodes.

The neat thing about org-roam is that you are not limited to just linking to other files, you can also have headlines as notes. Say you have a "Topic" file for "Workflow" notes. Then you can have headings with their own IDs which function as their own independent note, by calling (org-id-get-create).
I personally don't really use that that often, but it's nice that the option is there. It gives you some flexibility in how you would like to group notes.

Note (ha) that these "sub" notes do not have any kind of relationship to the parent file note: they are treated as separate. In org-roam-ui you can choose to visualize this link anyway, if you want.

• I also would not worry about having to "learn" org-mode first before jumping into org-roam, as the basic syntax (which is what you would mostly use for notes regardless) is very simple.

If you press TAB on the heading you will collapse it.
If you add TODO in front of the heading, it will be a TODO item (not that important yet for note taking, but you can create an agenda with these things/collect them)

Italics is /italics/
Bold is * bold *
Code is = code =
Underline is _ underline _
Strikethrough is tildes (this key broke on my keyboard but you know what i mean haha)

You can add latex by surrounding it with $or ( ) for inline, and $$or [ ] for block latex. You can add source code by adding #+begin_src emacs-lisp (setq something "something") #+end_src You can add quotations by #+begin_quote Wow, a quote. #+end_quote You can add citations (this is very new) by doing [cite:@] (there's many more options) You can create tables by kind of drawing a table or doing M-x org-table-insert. It will auto justify itself if you press enter within it. You can create bulleted lists with - on new lines. You can create numbered lists with 1, 2, etc on new lines. You can cycle between different kinds of these lists (a, b, c; i, ii, iii... for numbered lists for instance) by pressing TAB on them. If you write - [ ] they will become checkboxes. You add tags by calling M-x org-roam-tag-add You add links by calling M-x org-roam-link-insert You find nodes by calling M-x org-roam-node-find. Some more advanced features you don't really need for note taking: • setting scheduled times/deadlines for TODO items. • Clocking the time you have been working on an item • Compiling the code from the source blocks • Creating plots from source blocks + gnuplot • Custom agenda views • Moving trees (headline plus its contents) up and down • Editing trees in a different buffer • Exporting your org files to pdf, docx, markdown • Publishing your org files to a website • All the plugins/packages that work with org-mode TLDR Org-mode has a TON of functionality, but you don't need to touch most of it (I barely use any of the advanced features myself). The point is more that if you ever think "huh, I wonder if I could do X in org-mode", the answer is probably: YES! • Wow okay I just wrote a big ass post about how to use org-mode and then accidentally deleted it, nice haha • edited October 2021 Very quickly, the basics ## Headings • Heading ** Subheading *** Subsub... Collapse them with TAB, collapse/toggle all with Shift-Tab ## Markup (spaced so Markdown doesn't do anything funky) * bold * / italics / _ underline _ = code = (tilde) strikethrough (tilde) (my tilde key broke lol) ## blocks ### Source code #+begin_src emacs-lisp (or whatever language) (setq something "something else") #+end_src ### Quotes #+begin_quote "wow" - Ghandi #+end_quote In general they all work like this ## Latex \LaTeX (\LaTeX)$$\LaTex$\$ [\LaTeX]
or just plain

\int_a^b dx

## Citations(very new)

[cite:@someBibTexKey]

## Org-roam most useful commands

• org-roam-node-capture
Create a note/node (same thing)

• org-roam-node-find
finds a node by title, or creates one if it doesn't exist. I always use this instead of capture.

• org-roam-node-insert

Hope that helps!

• In my understanding org-roam does a lot of more things then "just" helping with creating a ZK, right? It is more like deft in relation to zetteldeft. I mean there should be a org-roam-zettel mode build on org-roam.
But I see the mistake in my mind now.

• @ThomasFKJorna you probably hit "post" multiple times by accident or edited the post too rapidly, so the system put it into the spam queue -- was restorable, though, so not all is lost after all

Author at Zettelkasten.de • https://christiantietze.de/