Hi everyone,
u/daviwil had released an excellent video in his System Crafters channel, where he showed how to hack org-roam:
https://systemcrafters.net/build-a-second-brain-in-emacs/5-org-roam-hacks/
I have copied his code into my config (the function that allows to create a TODO in a project file that we select (or create if not existing) is very useful.
I want to create a similar one: I want to create an event in a select customer file and to create this customer file if it does not exist.
The filter of the nodes with the tags “customer” works, but I am stuck with the definition of the content to insert as the event:
- I want the events to be inserted as subheadings of the heading “History” of the customer file (easy)
- I want the events to be saved as a tree structure:
** Year
*** Month
**** day
***** Event 1
***** Event 2....
I am trying to modify his code, but I always have errors
- I have replaced plain
with entry
in order to get the content as a heading
- I have replaced file+head+olp
in the template definition by file+olp+datetree
(org-roam-capture- :node (org-roam-node-read
nil
(my/org-roam-filter-by-tag "customer"))
:templates '(("p" "project" entry "* %<%u>%?/n%i\n%a"
:if-new (file+olp+datetree "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+category: ${title}\n#+filetags: project"
("History"))))))
But still I get the error save-excursion: Wrong type argument: integer-or-marker-p, nil"
What do I get wrong??
Could you fix the formatting?
The only code block formatting method which works for all users of reddit is to switch the reddit editor to markdown mode* and indent the code by 4 spaces (you can use
M-4 C-x C-i
on a region followed byM-x untabify
to achieve this in Emacs); and you need to use empty lines to separate the indented lines from the other text. Otherwise for lots of readers your message looks like this: https://old.reddit.com/r/emacs/comments/17etbx8/saveexcursion_wrong_type_argument/k685ohy/Be sure to remove any different syntax intended for formatting (such as triple backticks) at the same time.
(*) Switching to the markdown editor may or may not still be necessary. At one time it prevented problems.
I will, thx
I have difficulties with the formatting, are you still able to read and write in Reddit via Emacs?
What package do you use? md4rd?
I read reddit in Firefox and I make use of https://addons.mozilla.org/en-US/firefox/addon/edit-with-emacs1/ , but you can also just copy/paste between the markdown editor and emacs.