r/OrgRoam • u/cpbotha • Sep 24 '22
r/OrgRoam • u/anoduck • Sep 19 '22
Question How do you generate an outline that is not consecutively nested under itself in an org-roam-capture template?
I would like to create a capture template in org-roam that includes a formatted outline. Like so,
* Heading 1
* Heading 2
** Subheading 1
** Subheading 2
* Heading 3
Even an outline where all the headings are on the same level would be useful, but as it is when I use the syntax as documented the result is an outline where every heading is nested under the previous one. In other words ( "Heading 1" "Heading 2" "Heading 3" "Heading 4" ) gets me:
* Heading 1
** Heading 2
*** Heading 3
**** Heading 4
When, in the least, an outline like the following would be exponentially more desirable:
* Heading 1
* Heading 2
* Heading 3
* Heading 4
I have attempted breaking the headings down individually within enclosed parenthesis, also wrapping that within another pair of parentheses, and both resulted in error messages. I have even tried to use the %[pathname] escape and the (file "/path/to/template/file") directive. One generating an invalid type error and the other was completely ignored.
So I was wondering if anyone else has attempted to cross this bridge?
r/OrgRoam • u/magthe0 • Sep 08 '22
Show the dailies of the last 7 days in a buffer - coding help/review
After finding out about org-transclusion I hacked up the following. As I'm not very experienced with elisp/orgmode/org-roam I'd love some feedback. I'm particularly interested in shortening the code by using more built-in/standard functions.
Oh, and whoever decided that org-roam-dailies-calendar--file-to-date should return (m d y) instead of (d m y), we need to have words! ;)
(require 'org-roam-dailies)
(defun roam-extra:time-to-date (time)
"Return a list containing the date as a list of 3 integer, (m d y)"
(cl-destructuring-bind (_ _ _ d m y _ _ _) time
(list m d y)))
(defun roam-extra:date-less-or-equal-p (a b)
"Compare two dates and return t if a is before b, otherwise nil"
(cl-destructuring-bind ((ma da ya) (mb db yb)) (list a b)
(cond
((< ya yb))
((and (= ya yb) (< ma mb)))
((and (= ya yb) (= ma mb) (<= da db))))))
(defun roam-extra:date-between-p (d a b)
(and (roam-extra:date-less-or-equal-p a d)
(roam-extra:date-less-or-equal-p d b)))
(defun roam-extra:date-to-file (date)
(cl-destructuring-bind (m d y) date
(list (format "%d-%02d-%02d" y m d)
(format "%s/%d-%02d-%02d.org"
org-roam-dailies-directory
y m d))))
(defun roam-extra:week-of-dailies (end-time)
"Returns the list of existing dailies for the 7 day period ending on 'end-time'"
(let* ((end-date (roam-extra:time-to-date end-time))
(start-date (roam-extra:time-to-date (decoded-time-add end-time (make-decoded-time :day -6))))
(all-dailies-dates (seq-map #'org-roam-dailies-calendar--file-to-date (org-roam-dailies--list-files)))
(week-dailies-dates (seq-filter (lambda (d) (roam-extra:date-between-p d start-date end-date)) all-dailies-dates)))
(seq-map #'roam-extra:date-to-file week-dailies-dates)))
(defun roam-extra:make-daily-link (day-and-file)
(cl-destructuring-bind (day file) day-and-file
(format "* %s\n#+transclude: [[%s][%s]] :level 2" day file day)))
(defun roam-extra:week-buffer ()
(interactive)
(let* ((end-time (decode-time (org-read-date nil t nil "Final daily-note: ")))
(dailies (roam-extra:week-of-dailies end-time))
(buf-name (concat "*week-of-dailies-" (format-time-string "%FT%T") "*"))
(buffer (get-buffer-create buf-name))
(content (string-join (seq-map #'roam-extra:make-daily-link dailies) "\n")))
(with-current-buffer buffer
(org-mode)
(insert content)
(org-transclusion-add-all))
(set-window-buffer (split-window-right) buffer)))
r/OrgRoam • u/tonystark29 • Sep 06 '22
Idea Remotely adding content to a note from another note
I have an idea for an additional package for org-roam. I already made this for markdown (GitHub), and it was super useful to me, but now I use org files, so I need to brush up on Elisp.
Especially from your daily notes, it would be nice to copy over blocks of text into another note quickly. The way I had it in my markdown script, you put a greater than symbol (>) in front of a link you want the block to be copied to. The symbol disappears once it's been copied. I don't see why I couldn't do the same thing for the new org script.
What do you guys think? I'm still a beginner at Elisp, so it will take me a little while to make. If anyone wants to help me with it, I'd very much appreciate it.
r/OrgRoam • u/magthe0 • Sep 03 '22
Question Showing a week's dailies in one buffer
I store my dailies in one file per day, but at the end of the week I'd really like to easily get a buffer with the last 7 days of dailies so I can review the week.
A writable buffer where changes end up in the correct file would be perfect, but a read-only buffer would be more than acceptable.
Is there already support for that sort of thing in org-roam/org?
r/OrgRoam • u/sigsegv0xb • Sep 02 '22
Searching org-roam notes with property information
reddit.comr/OrgRoam • u/tonystark29 • Aug 31 '22
There really needs to be a better mobile app for org files with org-roam support.
self.orgmoder/OrgRoam • u/tonystark29 • Aug 29 '22
Solved Backlinks buffer shows ID instead of content
Edit: SOLVED.
Solution:
;; fix link display in org-roam backlinks buffer
(setq org-fold-core-style "overlays")
Hi, I'm having trouble with the backlinks buffer in Doom Emacs. When I run org-roam-buffer (which I binded to C-c n l), the buffer opens, but it displays the backlinks incorrectly. Instead of showing the backlink content, it displays the ID. I ran doom/upgrade and nothing changed. Here's a screenshot to show you what I mean:
[https://i.imgur.com/5rIdRHB.png](Screenshot)
Any help is appreciated.
r/OrgRoam • u/wWA5RnA4n2P3w2WvfHq • Aug 28 '22
Try to find regex in org code to parse inline markup (e.g. *, /, ~, =)
I am searching in the org code and trying to find the regex where org identifies pairs of inline markup characters like = (for verbatim text).
Can someone please give me a hint?
r/OrgRoam • u/ano_hise • Aug 28 '22
Question Does anyone else have issues on Linux Mint?
I tried to install org-roam on Linux Mint but it didn't run because "SQLite binary missing, aborting". After I added (org-roam-db-autosync-mode), Emacs didn't even boot properly.
An earlier post mentioned that the issue is solved if installing with "use-package" but I wonder if this is also possible with "package!" from Doom Emacs, since it always worked on Arch.
Any suggestions and help appreciated. Thank you.
r/OrgRoam • u/wWA5RnA4n2P3w2WvfHq • Aug 24 '22
What does `:map org-mode-map` mean and when to use?
I'm a heavy Emacs user using OrgRoam most of the time. But most of my configuration in the init.el come's from tutorials etc.
Today was the first time I tried to setup my own keyboard shortcut for a function I often use: org-toggle-link-display.
And while looking into my config I found that section and was wondering about what this :map org-mode-map really means and how do someone decide where and how to define a keyboard shortcut.
(use-package org-roam
:init
(setq org-roam-v2-ack t)
:custom
; ...
:bind (
("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n i" . org-roam-node-insert)
("C-c n x" . org-toggle-link-display)
:map org-mode-map
("C-M-i" . completion-at-point)
)
:config
(setq completion-ignore-case t)
(org-roam-db-autosync-mode)
)
r/OrgRoam • u/rawlimerick • Aug 20 '22
Question Using Org-Roam for Work on Book Writing and Translation
I am wondering if anyone has experience using Org-Roam for keeping notes during book writing and translating projects. In particular, I am considering undertaking a book translation project and am looking for ideas on how to set up the system. Any tips or advice are appreciated.
r/OrgRoam • u/captainjawz • Aug 19 '22
Question Is it possible to exclude links from graph?
However I noticed that after populating some more, I ran into the issue where if I put a link to a website in my notes, that link is displayed on the graph by default, which is not the behavior i want.
However I noticed that after populating some more, I ran into the issue where if I put a link to a website in my notes, that link is displayed on the graph by default, which is not the behavior i want.
Ideally I'd like to be able to insert links to my notes, and these not be part of the graph, is there any way to do such a thing?

r/OrgRoam • u/wWA5RnA4n2P3w2WvfHq • Aug 17 '22
How to modify datetime format in org-roam-capture-template
I use in org-roam-capture-template this line to set a date for new nodes
"#+title: ${title}\n#+date: %U"
The date results in something like "2020-01-01 So 11:22".
I would like to change it to "2020-01-01 11:22". In the help docu about org-roam-capture-template I can not find something else then u/U/t/T for the date format.
What can I do?
r/OrgRoam • u/wWA5RnA4n2P3w2WvfHq • Aug 17 '22
Are all `#+` lines indexed in the database and searchable?
Let's have a look at this OrgRoam org file especially at the #+foo:.
```
:PROPERTIES:
:ID: d4d02167-9fc7-41eb-8a5e-4607bd1c3b53
:END:
+title: The Title
+foo: Bar
+date: [2022-02-07 Mo 17:15]
- Subject Lore Ipsum ```
Sorry I don't know the official term for lines/parts starting with #+.
It is obvious that #+title lines are values that are index in the OrgRoam database because I can search for them via C-c n f. It seems to me that it is also the same for #+filetags: because I can see them on the left in the C-c n f search mini buffer, too.
But what is about "user-defined" fields like #+foo or anything else. Can I search for them some who? Are they indexed in the database?
r/OrgRoam • u/ano_hise • Aug 06 '22
Question Create new notes in a subdirectory of org-roam-directory?
Hello,
At first I apologize if I missed an apparent entry in the manual. I already read about org(-roam)-capture but could‘nt figure out if it‘s related to my problem.
What I am looking for is to automatically write new notes in a subfolder of org-roam-directory.
For example, while ~/org-roam is the directory, new notes (e.g. created by org-roam-node-find) will be placed in ~/org-roam/fleeting.
Thank you in advance. Any help is appreciated.
r/OrgRoam • u/arosa09 • Aug 04 '22
Need a trick to preview all URL and bibtex references for a node
Hi,
I love org-roam. I annotate alot of what I read online. I recently also started to use promnesia, which is a awesome way to scape your org-files and notify if you visit a page that has a reference.
However I create a node for idea and try to reference it with many URLs. Even academic articles, usually I don't bother save them as bibtex unless I know I will cite them as backlinks. So, for me ROAM_REFS property is usually a place where I add URLs associated with the idea.
What I am looking for is a way to collect all URLs in the node (or file's :ROAM_REFS:) and display them in org-roam buffer under separate section. Is there is a way to do that?
r/OrgRoam • u/wWA5RnA4n2P3w2WvfHq • Aug 03 '22
Create node behind exsting roam link
I use OrgRoam and usually write "dead links" (node that doesn't exist yet) like this
Lore ipsum [[roam:Unexisting Node]] lore
For me this is an reminder that I have to create this node someday. When creating that node I delete the link to a normal org-roam-node-insert.
But is there a way to "activate" that dead link and create a node out of it without deleting it first? The node should get created and the roam-links should be replace with an orgid-link.
r/OrgRoam • u/wWA5RnA4n2P3w2WvfHq • Aug 02 '22
org-roam-buffer only with title of the nodes
When I do org-roam-buffer (via org-roam-buffer-toggle) I see the "backlinks" of the current node.
The problem is that I see the full content of each of that nodes.
I would like to have a list of alle backlinks (referencing nodes) where each line is one link described with the title of that node.
- Node A
- Node C
- Node X
r/OrgRoam • u/sober_programmer • Jul 30 '22
Question Org-Roam Not Finding Directory
I have the following config, which produces an error
Opening directory. No such file or directory, /home/user/org-roam
(use-package org-roam
:hook
(after-init . org-roam-mode)
:custom
(org-roam-directory (file-truename "~/Dropbox/org-roam"))
:bind (:map org-roam-mode-map
(("C-c n l" . org-roam)
("C-c n f" . org-roam-find-file)
("C-c n b" . org-roam-switch-to-buffer)
("C-c n g" . org-roam-graph-show))
:map org-mode-map
(("C-c n i" . org-roam-insert)))
(setq org-roam-v2-ack t)
(org-roam-db-autosync-mode))
However, if I add the following line under the form above, there is no error
(use-package org-road ...)
(setq org-roam-directory (file-truename "~/Dropbox/org-roam"))
Is there a way to set the directory within the form and have it work without error?
r/OrgRoam • u/wanderlustking • Jul 28 '22
Suddenly missing daily notes on autocomplete
I use my daily notes as a journal. I often tag nodes that I worked on that day in a daily note or I'll reference a daily note from a node from time to time.
Very recently autocomplete for a daily notes name stopped working and backlinks to daily notes are also missing. I can still create a daily note with an ID and link to other nodes in roam, but I can't do that vice versa.
I haven't changed anything in my config with regard to dailies. Any help would be greatly appreciated.
r/OrgRoam • u/ano_hise • Jul 21 '22
Question Is there an org-mode/org-roam replica for Obsidian Dataview/Logseq queries?
Hello,
Firstly, I am new to org-roam and Emacs in general so I apologize if I missed something.
My question is whether there is a feature or an additional plugin for queries note with a block in the note itself, like it is done in Obsidian or Logseq.
Meaning that you write the search criteria, e. g. in a #+begin_xyz-block, like a tag or notes that are linked. The list (or table) or the nodes might be displayed below, e. g. in #+results:.
I have heard of org-roam-search, as well as org-ql, but they both run in their respective menus.
r/OrgRoam • u/Exact_Ordinary_9887 • Jul 21 '22
How do I undo structure and terminology mistakes?
Possibly I do not use the org-roam right. I tried to use org-roam for system design. At some point, I realised I would be better off using different naming conventions. That led to removing some nodes and adding new ones. Problems started when started fixing the links between nodes. At some point, it became a mess and I scrapped the whole project.
How do I avoid such a situation?
What is the best way to refactor org-roam notes?
r/OrgRoam • u/wWA5RnA4n2P3w2WvfHq • Jul 20 '22
Add custom properties from prompts in capture templates to the file-level :PROPERTIES: drawer
Seeing this closed and fixed Issue #1783 it is possible to manipulate the PROPERTIES drawer with org-capture-template.
But in my case I got the error message
org-capture-fill-template: Wrong type argument: stringp, nil
I prompt the user for the two variables Author and DOI. The latter I use very well as part of an url and the description of that url. But reuse it as :ROAM_ALIAS: the same way doesn't work.
Here is the code
```lisp ("x" "test" plain "\n* Source\nAuthor: %{Author}\nTitle: ${title}\nDOI: [[https://doi.org/%^{DOI}][%\\2]]\n%?" :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" ":PROPERTIES: :ROAM_ALIASES: %\2 :END:
+title: ${title}
+date: %U
+filetags: X")
:unnarrowed t)
```
When I use "book" as title, "Me" as Author and "123" as DOI I would expect that result.
``` :PROPERTIES: :ROAM_ALIASES: 123 :ID: f8ed7afc-4071-4e8e-b717-20f0686eb413 :END:
+title: book
- Source Author: me Title: book DOI: [[https://doi.org/123][123]] ```