all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: .emacs not loading libraries
Date: Sat, 17 Oct 2015 23:44:25 +0200	[thread overview]
Message-ID: <87wpuluq4m.fsf@debian.uxu> (raw)
In-Reply-To: 86r3ktiao1.fsf@gaheris.avalon.lan

Mart van de Wege <mvdwege@gmail.com> writes:

> Teemu had the right idea: in order to load elpa
> packages, I have to call (package-initialize) in
> .emacs. Thanks for going the trouble.

OK, but still: Without the tilde in the `load-path', it
only works because probably when loading is done the
`default-directory' *is* your HOME!

Try this:

    $ touch .emacs.d/test.el

Then do this in Emacs:

    (setq load-path '(".emacs.d/"))
    (cd "~")
    (load "test.el") ; t
    (cd "..")
    (load "test.el") ; nil - doesn't work

Now instead do:

    (setq load-path '("~/.emacs.d/"))
    (cd "~")
    (load "test.el") ; t
    (cd "..")
    (load "test.el") ; t - works!

-- 
underground experts united
http://user.it.uu.se/~embe8573




  reply	other threads:[~2015-10-17 21:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-17 12:58 .emacs not loading libraries Mart van de Wege
2015-10-17 15:34 ` Emanuel Berg
2015-10-17 15:38 ` Teemu Likonen
     [not found] ` <mailman.509.1445095516.7904.help-gnu-emacs@gnu.org>
2015-10-17 18:59   ` Mart van de Wege
2015-10-17 21:44     ` Emanuel Berg [this message]
     [not found]     ` <mailman.522.1445117721.7904.help-gnu-emacs@gnu.org>
2015-10-17 22:29       ` Mart van de Wege
2015-10-17 22:56         ` John Mastro
2015-10-18 12:19           ` Emanuel Berg
     [not found]         ` <mailman.528.1445122641.7904.help-gnu-emacs@gnu.org>
2015-10-18  9:04           ` Mart van de Wege
2015-10-18 14:29             ` Drew Adams
2015-10-18 12:14         ` Emanuel Berg
     [not found] ` <mailman.512.1445096312.7904.help-gnu-emacs@gnu.org>
2015-10-17 18:59   ` Mart van de Wege

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wpuluq4m.fsf@debian.uxu \
    --to=embe8573@student.uu.se \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.