org-menu
org-menu copied to clipboard
Support for alternative template packages
Hey, I recently developed Tempel, so I wonder if there is interest in supporting different template packages in org-menu in addition to yasnippet? One could either check for the template packages via fbound or introduce an template-expand-function defcustom, which will then take a template key as argument.
Originally posted by @minad in https://github.com/sheijk/org-menu/issues/4#issuecomment-1037965460
Yes, I'm very open to that. When I added yasnippet support I thought it had been moved into Emacs core. Otherwise this would be some form of extension. I'm haven't spent time to consider how to best do this for every use of yasnippet, yet. If you have ideas I'd be happy to hear them. Ideally it would be more or less automatic
Copied from original post
The simplest solution would be to add a configuration option org-menu-template-expand-function which takes a symbol as argument, the name of the template. Then the templates would have to be made available separately and added to the user configuration. The advantage would be that the user can configure and adjust the snippets, in comparison to the hard-coded snippets you have right now.
@minad I finally got around to implement this. Hope it still will be useful
Thanks! That's nice. If you are interested you could give my Tempel package a try. :)