this post was submitted on 24 Oct 2023
1 points (100.0% liked)

Emacs

311 readers
3 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

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??

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago (1 children)

I have difficulties with the formatting, are you still able to read and write in Reddit via Emacs?
What package do you use? md4rd?

[–] [email protected] 1 points 1 year ago

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.