Open gcantieni opened 4 years ago
After reading your post on profiling, it seems you do a lot of this to improve performance by manually adding autoloads. In a comment you also said that you don't put everything in use-package
blocks because it splits up the autoloads in a bunch of different places. I'm still a bit confused about the last part of your comment, though:
use-package :commands
is only viable when there aren't too many. It basically just splits what update-all-autoloads generates into various places. update-all-autoloads is automatic on one hand, but only for fixed directories. So I use both.
Mainly I just don't get the last part: if it's more performant to put all your autoloads in one place, why use the :commands
keyword? What does the comment about fixed directories mean exactly?
Fixed directories means (looking at the source of update-all-autoloads
):
emacs-d
/emacs-d
/modes/emacs-d
/git/org-fu/emacs-d
/personal/update-all-autoloads
allows to easily hook up all ;;;autoload
cookies in many modes/ora-*.el
files.
The advantage of e.g. keeping all Python config in modes/ora-python.el
are:
use-package
python-mode-hook
is run, ora-python
and load all Python config, since it will likely be useful.
Hi there, just a subjective question about organization:
It seems that the adoption of use-package often has people writing their configs in the style of:
Whereas you generally seem to prefer
I was wondering why you favor this organization scheme? Does it offer performance advantages? Is it easier to wrap your head around? Does it scale better? I tried organizing it this way but found that it sometimes complicated things because I would, for example, have to use an
eval-after-load
inkeybindings.el
to avoid an error about a keymap that doesn't exist yet. Perhaps you just handle this with some autoloads?