-
Hello I am recreating my emacs setup inspired by this repo where the author uses one config.org to setup his entire emacs. I want to include template snippets as part of the org file that tempel can pick up from. Now I see from the docs that we can add global/local templates but what I really want is a template only for a specific mode from the function. My org block looks like this
But the problem is that this 'imp' snippet is available globally. I want it to only be available in python-ts-mode. In my old setup I used to have a snippets/python.eld file with the following first few lines:
Is this possible? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
@minad any help please? |
Beta Was this translation helpful? Give feedback.
-
I think the simplest solution is to only set a variable buffer locally. Then you will automatically get only the templates which fit for this buffer and its mode. |
Beta Was this translation helpful? Give feedback.
-
So I tried to this with with the following code
But that didin't end up working. Instead I just added my snippets and had org tangle it into the snippets directory like so:
|
Beta Was this translation helpful? Give feedback.
So I tried to this with with the following code
But that didin't end up working.
Instead I just added my snippets and had org tangle it into the snippets directory like so: