this post was submitted on 31 Oct 2023
1 points (100.0% liked)

Emacs

314 readers
2 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

Hi all,

I've just got Emacs 28.1 running on WSL2. I've been using Emacs on Windows for many years and I now want to switch to WSL for the speed benefit. However, I'd like to keep the ability to run my Windows installation of Emacs, using the same packages and configuration files as my WSL version.

The Home directory for my Windows Emacs installation is C:\Dropbox\Home, therefore I added the following lines to the init.el file loaded by the WSL Emacs installation:

(setq user-init-file "/mnt/c/Dropbox/Home/.emacs")
(setq user-emacs-directory "/mnt/c/Dropbox/Home")
(add-to-list 'load-path "/mnt/c/Dropbox/Home/.emacs.d")
(add-to-list 'load-path "/mnt/c/Dropbox/Home/.emacs.d/elpa")

The first line works, in that it does read the specified .emacs file. However, when it attempts to load some of the packages (specifically those found in C:\Dropbox\Home\.emacs.d\elpa) it fails, saying it cannot find the file or folder specified.

I can't figure out where it's looking for those packages and why it cannot find them despite me adding the package folders to the load-path var. Any help much appreciated.

you are viewing a single comment's thread
view the rest of the comments
[–] maxkool@alien.top 1 points 1 year ago

Thanks for the suggestion, but it didn't work. I updated my post with the solution that worked for me, maybe it will help others in the future.