el-get icon indicating copy to clipboard operation
el-get copied to clipboard

autoload → autoinstall

Open rrthomas opened this issue 11 years ago • 8 comments

I often have to hunt for an el-get package to edit a new type of file. It would be nice if el-get converted package autoloads into el-get-wide (semi?)autoinstall actions, so that when I open example.foo, el-get prompts me with Install foo-mode?

Obviously one would need to offer a list where there are multiple conflicting autoloads.

rrthomas avatar Nov 02 '14 20:11 rrthomas

It sounds a little crazy / overboard, but I would accept such a feature when off by default. Do you want to work on it?

dimitri avatar Nov 02 '14 22:11 dimitri

I haven't time at present, but I'll happily add it to my to-do list since you say you'd accept it.

rrthomas avatar Nov 02 '14 22:11 rrthomas

I think the main difficulty would be compiling the file extension -> package list. I don't see a way to automate it short of installing every package which would really take quite a long time (and would probably hit problems with many of the recipes, so it would not be really all that automatic).

npostavs avatar Nov 02 '14 23:11 npostavs

What if there were a semi-automatic way, e.g. a helper function that automatically added autoloads to a recipe buffer?

rrthomas avatar Nov 02 '14 23:11 rrthomas

I'm not sure if semi-automatic is better than fully manual: typing M-x el-get-auto-mode vs :auto-mode ".foo"

npostavs avatar Nov 03 '14 03:11 npostavs

I meant that the helper would be for recipe authors. Then the "autoinstalls" would be in the recipe.

rrthomas avatar Nov 03 '14 10:11 rrthomas

Yes, that is what I was thinking too. I'm just not sure invoking a helper function would be faster/easier than typing in the autoinstall info directly.

npostavs avatar Nov 03 '14 16:11 npostavs

I guess manually looking through the autoloads is not such a task. But the main thing is to have the information in the recipes so that, as @npostavs observed above, you don't have to compile each package, which would certainly remove the whole point of the idea.

However, there might be other information one might like to automatically extract from packages into recipes, so this general approach might still have something to commend it. But I guess if/when I get around to looking at an implementation, I should start with the recipe file features.

rrthomas avatar Nov 04 '14 20:11 rrthomas