bug#42333: Emacs: error on guix-emacs-autoload-packages
Alexandru-Sergiu Marton writes: > > (mapc (lambda (p) (add-load-path! p)) (split-string (getenv "EMACSLOADPATH") > ":")) > Are you still needing to use this snippet to get your configuration to work?
bug#42333: Emacs: error on guix-emacs-autoload-packages
Hi, sorry for the long time it took to reply. Maxim Cournoyer writes: > If you could come with a minimal reproducer, I could have a look. > > Otherwise, I'm afraid there's too many variables to keep track > (emacs-doom, possible conflicts with Org when installed from different > places, etc.). I managed to gather more information as I found another person who had the same problems as me. Steps to reproduce: - Install emacs and emacs-telega with guix - Install Doom Emacs (https://github.com/hlissner/doom-emacs) - Start Emacs and try M-x telega RET This should give you an error saying something along the lines of "No file or directory." Even if it doesn't give you this exact same error, check what I say below about load-path. It seems that Doom plays with Emacs' load-path. Telega is just a concrete example of an Emacs package installed with Guix that isn't working. You should be able to find problems with many others. When checking the value of the environment variable EMACSLOADPATH, both the result from the shell (through echo $EMACSLOADPATH) and from Emacs (through (getenv "EMACSLOADPATH")) seem to be equal. What is not right is that the load-path Emacs Lisp variable doesn't contain the paths from EMACSLOADPATH. What fixed it for me and the other person was adding this line at the end of our config.el (Doom's config file): --8<---cut here---start->8--- (mapc (lambda (p) (add-load-path! p)) (split-string (getenv "EMACSLOADPATH") ":")) --8<---cut here---end--->8--- This is a hack but gets the job done for now. I thought about this problem being caused by Doom's envvars file, but that file contains the correct value of EMACSLOADPATH and we saw that querying that environment variable from inside Emacs gives the correct answer. Finding the root of this problem will be beneficial to a lot of potential Guix users that might ditch it if they see their beloved Emacs config doesn't work well with packages installed from Guix. Cheers, Sergiu
bug#42333: Emacs: error on guix-emacs-autoload-packages
Hello Alexandru, Alexandru-Sergiu Marton writes: > I managed to somehow fix it in a way. > > - Uninstall Emacs and all the packages installed with Guix > - rm -rf .emacs.d > - guix gc > - Reinstall Emacs > > This way guix-emacs-autoload-packages works again. I installed ALL the > packages I needed from Guix (I ditched Doom Emacs) and generating my > site work too now. > > Weird thing is that I needed to (require 'org-id) in the script for my > site but on my PC I don't have to. > > I still don't get this weird behaviour. If you could come with a minimal reproducer, I could have a look. Otherwise, I'm afraid there's too many variables to keep track (emacs-doom, possible conflicts with Org when installed from different places, etc.). Thank you, Maxim
bug#42333: Emacs: error on guix-emacs-autoload-packages
Alexandru-Sergiu Marton writes: > This way guix-emacs-autoload-packages works again. I installed ALL the > packages I needed from Guix (I ditched Doom Emacs) and generating my > site works too now. I managed to narrow down the problem. If I install Doom Emacs, Guix's EMACSLOADPATH doesn't seem to be loaded at all into the load-path variable. This can be fixed with: (mapc (lambda (p) (add-load-path! p)) (split-string (getenv "EMACSLOADPATH") ":")) At this point it doesn't complain about that contrib path not being found. To get there, I pulled my config [1] and ran `doom sync`. The next time I fired up Emacs and I tried to run `guix-emacs-autoload-packages` it started to complain about that path. So I guess somewhere in that processes it screws up the load-path even more if it manages to add "$GUIX_PROFILE/share/emacs/site-lisp/contrib" in there. Since I couldn't find anything actually there or using that path, for now I have this in my config: (delete (concat (getenv "HOME") "/.guix-profile/share/emacs/site-lisp/contrib") load-path) I still have no idea why is the thing behaving the way that it is since I never had issues like this with the same config on my other machine. If you have any pointers as to what might have happened or had similar problems yourself I would love to hear from you. [1] https://git.sr.ht/~brown121407/dotfiles/tree/master/doom/.config/doom -- Sergiu
bug#42333: Emacs: error on guix-emacs-autoload-packages
I managed to somehow fix it in a way. - Uninstall Emacs and all the packages installed with Guix - rm -rf .emacs.d - guix gc - Reinstall Emacs This way guix-emacs-autoload-packages works again. I installed ALL the packages I needed from Guix (I ditched Doom Emacs) and generating my site work too now. Weird thing is that I needed to (require 'org-id) in the script for my site but on my PC I don't have to. I still don't get this weird behaviour. -- Sergiu
bug#42333: Emacs: error on guix-emacs-autoload-packages
Hi, I'm having a bit of trouble with Emacs on Guix. When I do `M-x guix-emacs-autoload-packages` I get the following error: --8<---cut here---start->8--- guix-emacs-find-autoloads: Opening directory: No such file or directory, /home/brown121407/.guix-profile/share/emacs/site-lisp/contrib --8<---cut here---end--->8--- This happened (this time!) after I installed Org mode from the package interface in Emacs. I don't think that is exacly what triggered it now but that was the last thing I did before restarting Emacs and running into this. The other times it happened (twice before) I don't remember what I was doing. I'm using Doom Emacs right now. I have problems with Emacs almost since I set it up on this laptop. I use the same config I'm using on my PC, where everything works. Both machines use Guix System. Besides this problem with loading Emacs packages from Guix I also encountered problems with Org mode while trying to build my website. Those were also not met before, on the same config, on my PC. In case someone wants to test building the website: 1. Clone https://git.sr.ht/~brown121407/brown.121407.xyz 2. Open publish.el in Emacs 3. M-x eval-buffer RET 4. M-x b7-publish-all RET It requires Org mode and the stuff you'd expect to publish HTML like htmlize and also the contrib files of Org which on Guix should be in the emacs-org-contrib package. If all is fine (as it is on my PC) you should go through the whole site build fine. But if it's borked as it is on my laptop it should give you some obscure errors about setting IDs (if you check the backtrace it should be something about `org-id-add-location` or similar things). That is if you don't run into other errors earlier than that stage (which happened to me). Here's my EMACSLOADPATH: --8<---cut here---start->8--- [brown121407@T420 ~]$ echo $EMACSLOADPATH /home/brown121407/.guix-profile/share/emacs/site-lisp:/home/brown121407/.guix-profile/share/emacs/26.3/lisp:/home/brown121407/.guix-profile/share/emacs/site-lisp:/home/brown121407/.guix-profile/share/emacs/26.3/lisp:/home/brown121407/.guix-profile/share/emacs/site-lisp:/home/brown121407/.guix-profile/share/emacs/26.3/lisp --8<---cut here---end--->8--- Here's the backtrace: --8<---cut here---start->8--- Debugger entered--Lisp error: (file-missing "Opening directory" "No such file or directory" "/home/brown121407/.guix-profile/share/emacs/site-lisp/contrib") directory-files("/home/brown121407/.guix-profile/share/emacs/site-lisp/contrib" full-name ".*-autoloads\\.elc?\\'") guix-emacs-find-autoloads("/home/brown121407/.guix-profile/share/emacs/site-lisp/contrib") mapcan(guix-emacs-find-autoloads ("/home/brown121407/.guix-profile/share/emacs/site-lisp/contrib" "/home/brown121407/.guix-profile/share/emacs/site-lisp" "/home/brown121407/.guix-profile/share/emacs/site-lisp" "/home/brown121407/.guix-profile/share/emacs/site-lisp")) guix-emacs-autoload-packages() funcall-interactively(guix-emacs-autoload-packages) call-interactively(guix-emacs-autoload-packages record nil) command-execute(guix-emacs-autoload-packages record) counsel-M-x-action("guix-emacs-autoload-packages") ivy-call() ivy-read("M-x " ("guix-emacs-autoload-packages" "list-packages" "eval-buffer" "guix" "cd" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "lsp" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "xdb" "=irc" "=rss" "calc" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "life" "lsp!" "mail" "mpuz" "mu4e" "pass" "ping" "pong" "talk" "term" "undo" "yank" "zone" "=mu4e" ...) :predicate #f(compiled-function (x) #) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x) counsel-M-x() funcall-interactively(counsel-M-x) call-interactively(counsel-M-x nil nil) command-execute(counsel-M-x) --8<---cut here---end--->8--- Here's the output of `guix describe` and `guix system describe`: --8<---cut here---start->8--- [brown121407@T420 ~]$ guix describe Generation 3Jul 12 2020 11:33:56(current) nonguix d174095 repository URL: https://gitlab.com/nonguix/nonguix branch: master commit: d174095d26f46fa148f540fcefbdcef52451f5ec brett f2e2d5c repository URL: https://git.sr.ht/~brettgilio/cfg branch: master commit: f2e2d5ca554049715f281b80448b868197da80e6 evan 6eb4ede repository URL: https://git.sr.ht/~ev4nx99/guix-channel branch: master commit: 6eb4ede0c48502aceb681f45bda15fb28f38b990 brown121407 7245765 repository URL: https://git.sr.ht/~brown121407/guix.121407.xyz branch: master commit: 7245765f85a155ba03fada98cfe8270578