Org-roam-capture--prepare-buffer: Wrong type argument: integer-or-marker-p, nil

So I wanted to change the default file naming system so I added the following to my doom config file

;; Org-roam Template ---------------------------------------------------------------------------------------------------
      org-roam-capture-templates `(("d" "default" plain "%?"
      (file+head "${slug}.org" "#+title: ${title}\n"
      :unnarrowed t)))

After which I reloaded the doom config file. And got this error in the messges buffer

org-roam-capture--prepare-buffer: Wrong type argument: integer-or-marker-p, nil

upon doing a back trace as one of the discord member of the doom server sadid I got the following error

So How do I fix the target issue?

Missing a closing parenthesis after “${title}\n”:

This worked on my end. Adjust it for your doom. Note the closing parenthesis before :unnarrowed.

(setq org-roam-capture-templates `(("d" "default" plain "%?"
                                    (file+head "${slug}.org" "#+title: ${title}")
                                    :unnarrowed t)))
1 Like

Yes that was th mistake!

Is there any way of preserving the case sensitivity of the name That I enter?

Say rt now with the current config if i make a note called “Bakery” it will be created as “bakery” the ‘B’ is saved as ‘b’. Is this possible?

I suggest that you consider overriding the slug function. A wiki entry here as a guide. At the end of the function, the slug gets lowercased. Remove it. That would be one-line change. Or you can create your own function to use, I think.

Ok thanks. Is there a way to add certain property values while node is created?

I found this article, is there any way else to do this?

You can put them in the template directly. You can call a function too. But I’m not sure why you look for an alternative from the one linked?

Ok will try it out.