Use case
I run my Emacs config on many machines. Most do not have a Racket installed, and I'd rather not have my Racket related packages installed by default. However, I would like to be able to edit Racket code if I need to.
This is just an example, I'm interested in doing this for a large number of modes, possibly all of the avalible major modes I can find.
Question
Is there any way I can tell Emacs to autoload a package from the package repository? racket-mode
won't be installed by default, but if I ever edit a *.rkt
file, the config will download, install, load, and run racket-mode
?
I'm sure I can do this with ugly hacks (just shadow the functions with a helper)? Is there a cleaner way to do it?