abo-abo / oremacs

My Emacs config
https://oremacs.com/
296 stars 33 forks source link

(add-to-list 'load-path emacs-d) - Warning if emacs-d = .emacs.d and loaddefs.el problem #2

Closed srustamo closed 8 years ago

srustamo commented 8 years ago

I understand that your setup avoids .emacs.d if git cloned. One issue I have replicating the principles of your setup (particularly with loaddefs.el), is that if I have emacs-d in load-path, I get this:

Warning (initialization): Yourload-path' seems to contain your .emacs.d' directory: /Users/s3/.emacs.d/ This is likely to cause problems... Consider using a subdirectory instead, e.g.: /Users/s3/.emacs.d/lisp

If I remove emacs-d (which evaluates to .emacs.d in my setup) and run ora-para-up: command-execute: Cannot open load file: no such file or directory, shr/auto

Of course the shr is in the load-path as follows: (add-to-list 'load-path "~/.emacs.d/shr/") and auto.el is in shr.

Having emacs-d in the load-path runs ora-para-up without a problem.

abo-abo commented 8 years ago

You can update loaddefs.el with M-x update-all-autoloads. I never tried putting my config in ~/.emacs.d/. Here's my ~/.emacs:

(load "~/Dropbox/source/site-lisp/init")

Here, site-lisp is a git clone of oremacs.git.

srustamo commented 8 years ago

Off the top of your head, is it possible to move loaddefs.el out of .emacs.d, so as to exclude .emacs.d from load-path? I'm still not sure why I get command-execute: Cannot open load file: no such file or directory, shr/auto, because the auto.el is there. I'm sure I'm missing something.

abo-abo commented 8 years ago

Off the top of your head, is it possible to move loaddefs.el out of .emacs.d, so as to exclude .emacs.d from load-path?

Like I said, it's possible to move everything out of .emacs.d. I'm not using my ~/.emacs.d at all, except for starting Spacemacs, since I have a few users raising issues specific to Spacemacs and it insists on being in ~/.emacs.d.

I'm still not sure why I get command-execute: Cannot open load file: no such file or directory, shr/auto, because the auto.el is there. I'm sure I'm missing something.

Here's an example entry from loaddefs.el:

(autoload 'ora-para-up "oleh/auto" "\

\(fn ARG)" t nil)

It will try to load ora-para-up from "oleh/auto", which is a relative path. That means that whatever directory that contains oleh/auto.el has to be on load-path. And that looks to be your issue: the directory that contains shr/auto.el is not on the load-path.

srustamo commented 8 years ago

Thanks. This is helpful.

A bit tangential question: why you put all your config in Dropbox? I see two issues with this:

  1. It kind of beats the purpose of using a remote repo to bootsrtap a new machine.
  2. I didn't check the full size of your config with elpa packages and all, but my .emacs.d is around 400mb. Granted, I might have half of packages I never used, still, 200mb seems like a lot put in Dropbox.

On Nov 25, 2015 8:35 PM, "Oleh Krehel" notifications@github.com wrote:

Off the top of your head, is it possible to move loaddefs.el out of .emacs.d, so as to exclude .emacs.d from load-path?

Like I said, it's possible to move everything out of .emacs.d. I'm not using my ~/.emacs.d at all, except for starting Spacemacs, since I have a few users raising issues specific to Spacemacs and it insists on being in ~/.emacs.d.

I'm still not sure why I get command-execute: Cannot open load file: no such file or directory, shr/auto, because the auto.el is there. I'm sure I'm missing something.

Here's an example entry from loaddefs.el:

(autoload 'ora-para-up "oleh/auto" "(fn ARG)" t nil)

It will try to load ora-para-up from "oleh/auto", which is a relative path. That means that whatever directory that contains oleh/auto.el has to be on load-path. And that looks to be your issue: the directory that contains shr/auto.el is not on the load-path.

— Reply to this email directly or view it on GitHub https://github.com/abo-abo/oremacs/issues/2#issuecomment-159642861.

abo-abo commented 8 years ago

why you put all your config in Dropbox?

Mostly habit, from back when it wasn't version-controlled. I tweak the config from time to time without committing. Dropbox synchronizes without having to push/pull. And when I need the committed setup, I can just clone/pull via git.

srustamo commented 8 years ago

Thank you.