Automatic templates for `Org-mode` files

What happened?

I’m having trouble getting a snippet to activate automatically on file creation. I’ve activated the file-templates module and added this line to my config.el:

(set-file-template! "\\.org$" :trigger "__" :mode 'org-mode)

and created a template in $DOOMDIR/snippets/org-mode/__ :

# -*- mode: snippet -*-
# name: temp
# --
#+latex_header: \usepackage{GlobalTemplate}

+file-templates/debug says it detects the snippet, but when I create a .org file, it still ends up empty.

What did you expect to happen?

I expected the snippet to activate and paste in:

#+latex_header: \usepackage{GlobalTemplate}

into any new org file I create.

Steps to reproduce

  1. Add set-file-template! line to config
  2. Create a new .org file with SPC f f
  3. No content is copied into the file.

System information


Loading data dump...
1 Like