raingloom writes: > On Mon, 16 May 2022 00:23:39 +0600 > Akib Azmain Turja wrote: > >> For each Emacs package I have installed, Emacs echoes "Loading >> /gnu/store/...-emacs-.../...-autoloads.el" while startup. This is >> very annoying. The reason is probably the function: >> >> (defun guix-emacs-autoload-packages () >> "Autoload Emacs packages found in EMACSLOADPATH. >> >> 'Autoload' means to load the 'autoloads' files matching >> `guix-emacs-autoloads-regexp'." >> (interactive) >> (let ((autoloads (mapcan #'guix-emacs-find-autoloads >> (guix-emacs--non-core-load-path)))) >> (mapc (lambda (f) >> (load f 'noerror)) ;; This should be (load f 'noerror >> 'nomessage) autoloads))) >> >> And also I wonder why Guix loads each autoloads file. Can't it merge >> (concat) all autoloads into one file while making the profile and then >> load it afterwards? This would probably save a little time. >> package.el can do this (see "package-quickstart-file" variable), so >> Guix should be able to do this too. >> > > Gonna speculate here a bit since I'm not sure if this pattern exists in > Elisp land, but I've certainly seen (and written) programs that > required to be run from a specific place, usually from next to other > submodules in the same package. If you were to concatenate (or even > just move) such a file, it would break, possibly silently. > You can't even rename a program and be sure that it will have the same > behaviour, see busybox for an example of this. It's a single binary > that checks what name it's run under and then acts like that executable. Yes, this may be a problem for ordinary Emacs Lisp file. But I'm talking about autoloads. It is a special file that defines autoloaded functions. Calling autoloaded functions will automatically load the file containing the actual definition. Autoloads files should not depend on there names, and if they does its probably a bug. All autoloads files are needed to load at runtime, so concatenating all of them should probably be a good idea. Emacs builtin package manager "package.el" and third party purely-functional package manager "straight.el" both support merging the autoloads into one file. But load many autoloads files is not a big problem, the main problem is the messages "Loading...", "Loading...", "Loading..."... -- Akib Azmain Turja This message is signed by me with my GnuPG key. It's fingerprint is: 7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5