emacscollective / borg

Assimilate Emacs packages as Git submodules
https://emacsmirror.net/manual/borg
GNU General Public License v3.0
255 stars 28 forks source link

borg-activate: Extend load-path before loading autoloads #159

Closed dennis-hamester closed 7 months ago

dennis-hamester commented 7 months ago

This changes borg-activate to extend load-path always and unconditionally before loading autoloads.

The current code only extends load-path after loading the autoloads, and it does that also in a bit of a redundant way. Once as part of the local activate function and then again outside as a fallback.

edit: Sorry, I just realize I didn't motivate this PR. I tried to load el-patch with borg. That package emits a (require 'el-patch-stub) into its autoloads file (see el-patch.el). This then fails when borg tries to load the autoloads file. While that may be unconventional (?), it still seems reasonable to me to assume that a package is in load-path before its autoload file is evaluated.

dennis-hamester commented 7 months ago

Well, thanks for figuring out the correct fix or work-around. It takes a lot of experience to know all these intricacies in Emacs.

tarsius commented 7 months ago

You're welcome and thanks for the report!