Hi Leo!

On Thu, Apr 08 2021, Leo Prikler wrote:
guix-emacs should still be loaded by site-start.el, which also initially loads your autoloads.
Now that I've had more of a chance to play with it, you're right 
about this. I'm not sure what I did earlier, but it loaded 
properly just now.
What changes for "Guix in Emacs modifying Emacs", is that you'll probably have to reload the subdirs.el file before autoloading the packages.
Ah, okay. I just played around with this, and it seems like the 
sequence I now need is:
 $ guix install emacs-magit # shell command
 ...
 $ load subdirs # emacs command
 t
 $ guix-emacs-autoload-packages # emacs command
 (... list of autoload files ...)

It also sees like I'm able to require the packages in Emacs after the "load subdirs" step, as well, so in practice it's still only two commands to make new Emacs packages loadable, it's just that the second command has changed. 👍
Obviously, there are exceptions to this, that we can argue on a case by case basis, but to summarize, I don't think hardcoding paths throughout Emacs is a good idea.
I think there are two different cases which are more clear-cut, 
with a significant middle ground that's fuzzy, and using PATH just 
ignores this distinction entirely. There are program uses that are 
an implementation detail (e.g. the fact that dired uses ls), and 
there are programs that a user is directly interacting with (e.g. 
anything that I run in a shell). My thinking is that ideally the 
former should use hard-coded paths, and the latter should come 
from PATH.
The tricky ones are things like geiser, or magit, where the Emacs 
package is a wrapper around a program's functionality. These feel 
like it's reasonable to go either way, but they are also the types 
of packages that provide ways to easily change which program they 
run (i.e. geiser-guile-binary and magit-git-executable for these 
specific examples), so they could default to a hard-coded store 
path because a user can easily change them if they want to use a 
different version.
Although, as you mentioned in a previous email, TRAMP may make 
even those "clear-cut" cases a bit trickier. I'll admit I haven't 
considered TRAMP much in my thinking.
As a more general comment, I feel like Guix's wrappers are often 
treated as "cheaper" than they are. It makes me sad that using 
awesome as a window manager means that I have to have 
LD_LIBRARY_PATH= GI_TYPELIB_PATH= before calls to external 
programs to stop things from crashing (and working out that I 
needed that was a pain in itself). I'll admit that this case with 
Emacs and PATH seems less dangerous than the awesome wrapper, but 
I'm wary of the unexpected problems that it might cause.
Carlo

Reply via email to