# No Prompt for Templates using \`org-roam-node-find\`

**URL:** <https://org-roam.discourse.group/t/no-prompt-for-templates-using-org-roam-node-find/3262>\
**Category:** Troubleshooting\
**Created:** [October 23, 2023, 4:22pm UTC](https://org-roam.discourse.group/t/no-prompt-for-templates-using-org-roam-node-find/3262 "2023-10-23T16:22:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zonsopkomst](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/zonsopkomst/32/1374_2.png) [@zonsopkomst](https://org-roam.discourse.group/u/zonsopkomst)\
**Post date:** [October 23, 2023, 4:22pm UTC](https://org-roam.discourse.group/t/no-prompt-for-templates-using-org-roam-node-find/3262/1 "2023-10-23T16:22:17Z")

</div>

Hello all. I’m trying to use org-roam templates and have the following configuration, but I cannot get `org-roam-node-find` to prompt for the different templates. I’ve tried some other individuals’ templates, in case I made an error, and have part of the SystemCrafters example in right now. I also tried adding in:

```auto
:init
(setq org-roam-v2-ack t)

```

but that did nothing. I was thinking maybe it needed to be specified, but I should already be using the latest `org-roam`. Creating a node works, but does the default without prompting for the other templates. There are no messages or warnings.

Could my templates not be working due to the `org-roam-directory` setup I have or is there something else that I have missed? The closest issue I could find to mine was this: [Reddit - Dive into anything](https://www.reddit.com/r/DoomEmacs/comments/sk8558/orgroam_templates_not_showing_up/), but they were using Doom Emacs and I am using vanilla, so slightly different issue. I’ve also been trying to learn from similar setups from the following sources:  
[Where are templates defined](https://org-roam.discourse.group/t/where-are-templates-defined/76)  
[Capturing Notes Efficiently with Org Roam - System Crafters](https://systemcrafters.net/build-a-second-brain-in-emacs/capturing-notes-efficiently/)  
[Org-roam User Manual](https://www.orgroam.com/manual.html#The-Templating-System)

Any help is much appreciated!

Current config:

```auto
(use-package org-roam
  :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)
         :map org-mode-map
         ("C-M-i" . completion-at-point))
  :custom 
  (setq org-roam-complete-everywhere t) 
  (setq org-roam-capture-templates 
      '( 
          ("d" "default" plain "%?" 
          :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
	  "#+title: ${title}\n")
	  :unnarrowed t)
          ("b" "book notes" plain
	  "\n* Source\n\nAuthor: %^{Author}\nTitle: ${title}\nYear: %^{Year}\n\n* Summary\n\n%?"
	  :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
	  :unnarrowed t)
	  ("p" "project" plain "* Goals\n\n%?\n\n* Tasks\n\n** TODO Add initial tasks\n\n* Dates\n\n"
          :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+filetags: Project")
          :unnarrowed t)
      ) 
  ) 
  :config
;; Change path for PC
  (cond ((string-equal (system-name) "weda")
	 (setq org-roam-directory "~/Syncthing/org-roam/"))
        ((string-equal (system-name) "tyr")
	 (setq org-roam-directory "~/Syncthing/org-roam/"))
        ((string-equal (system-name) "DESKTOP-FIS3P5B")
	 (setq org-roam-directory "c:/Users/Church/Documents/Syncthing/org-roam/"))) 

  (cond ((string-equal (system-name) "weda")
	 (setq org-roam-db-location "~/Syncthing/org-roam/org-roam.db"))
        ((string-equal (system-name) "tyr")
	 (setq org-roam-db-location "~/Syncthing/org-roam/org-roam.db"))
        ((string-equal (system-name) "DESKTOP-FIS3P5B")
	 (setq org-roam-db-location "c:/Users/Church/Documents/Syncthing/org-roam/org-roam.db"))) 
  
  (org-roam-setup))

```

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [October 23, 2023, 6:48pm UTC](https://org-roam.discourse.group/t/no-prompt-for-templates-using-org-roam-node-find/3262/2 "2023-10-23T18:48:55Z")

</div>

Review the syntax of `:custom` of `use-package`. You cannot use `setq` there.

---

<div class="post-metadata">

**Author:** ![zonsopkomst](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/zonsopkomst/32/1374_2.png) [@zonsopkomst](https://org-roam.discourse.group/u/zonsopkomst)\
**Post date:** [October 23, 2023, 8:56pm UTC](https://org-roam.discourse.group/t/no-prompt-for-templates-using-org-roam-node-find/3262/3 "2023-10-23T20:56:12Z")

</div>

A couple of terms I have learned, that others may run into in the future-

Source: [GitHub - jwiegley/use-package: A use-package declaration for simplifying your .emacs](https://github.com/jwiegley/use-package)

`:config` can be used to execute code after a package is loaded. This execution is deferred until after the autoload occurs.  
`:bind` can be used to bind a key to that command.  
`:custom` keyword allows customization of package custom variables.  
Similar to `:bind` , you can use `:mode` and `:interpreter` to establish a deferred binding within the `auto-mode-alist` and `interpreter-mode-alist` variables. The specifier to either keyword can be a cons cell, a list of cons cells, or a string or regexp:

But a lot of the programming terminology is above my head right now.

I ended up haphazardly copying and pasting as follows:

```auto
(...

:config
 (setq org-roam-capture-templates 
      '( 
          ("d" "default" plain "%?" 
          :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
	  "#+title: ${title}\n")
	  :unnarrowed t)
          ("b" "book notes" plain
	  "\n* Source\n\nAuthor: %^{Author}\nTitle: ${title}\nYear: %^{Year}\n\n* Summary\n\n%?"
	  :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
	  :unnarrowed t)
	  ("p" "project" plain "* Goals\n\n%?\n\n* Tasks\n\n** TODO Add initial tasks\n\n* Dates\n\n"
          :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+filetags: Project")
          :unnarrowed t)
      ) 
  ) 

(org-roam-setup))

```

and am now prompted to choose a template. I thought I knew why, but to be honest, I’m a bit confused as to why this works in my init.el under `:config` vs. [Capturing Notes Efficiently with Org Roam - System Crafters](https://systemcrafters.net/build-a-second-brain-in-emacs/capturing-notes-efficiently/#the-complete-starting-configuration), where they have added the template section under `:custom`.

I have found this post, which may explain it somewhat, at least the `setq` portion, but I will have to revisit later as I do not fully comprehend at the moment.

Thanks for your help again @nobiot.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [October 24, 2023, 4:49pm UTC](https://org-roam.discourse.group/t/no-prompt-for-templates-using-org-roam-node-find/3262/4 "2023-10-24T16:49:40Z")

</div>

> [@zonsopkomst](#):
>
> I thought I knew why, but to be honest, I’m a bit confused as to why this works in my init.el under `:config` vs. [Capturing Notes Efficiently with Org Roam - System Crafters](https://systemcrafters.net/build-a-second-brain-in-emacs/capturing-notes-efficiently/#the-complete-starting-configuration), where they have added the template section under `:custom`.

If you look carefully at what System Crafters does for `:custom`, you will see that `setq` is not used. That’s the syntax.

From functional perspective, if you stick to note-taking with Org-roam, you can safely ignore the difference between `:custom` and `:config`. There is difference, and not relevant for Org-roam. Personally, I only learned the difference once I started to develop my own Emacs packages and took me a long time.

---

<div class="post-metadata">

**Author:** ![zonsopkomst](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/zonsopkomst/32/1374_2.png) [@zonsopkomst](https://org-roam.discourse.group/u/zonsopkomst)\
**Post date:** [October 24, 2023, 8:47pm UTC](https://org-roam.discourse.group/t/no-prompt-for-templates-using-org-roam-node-find/3262/5 "2023-10-24T20:47:50Z")

</div>

Thanks for the explanation. The thing that confused me, was that I tried both with and without the `setq` under `:custom`. But, like your own experience, it is probably just a matter of time and learning to pick up on these nuances.

I was able to create a somewhat complex template today that will help me with my workflow, so I very much appreciate your help.
