unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / 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 17:34:17 +0200	[thread overview]
Message-ID: <87vba5wlty.fsf@debian.uxu> (raw)
In-Reply-To: 86zizhirdx.fsf@gaheris.avalon.lan

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

> I've installed a bunch of libraries from elpa, and
> I found at least one of them is not available unless
> I do an explicit M-x load-library
>
> Now, I thought to add that to my .emacs, but neither
> (load-library "org-alert")

... you mean that interactive `load-library' works but
not as Lisp? If you check out the source for
load-library, the only thing it is is an interactive
interface to `load'. So probably it helps you with the
path when called with M-x. Without it, try using the
whole path. Or why not ditch it altogether in favor of
load? That should eliminate the interactive/Lisp
discrepancy, if any. load searches `load-path' and
appends .elc (first), then .el.

> (require 'org-alert)

If what you `require' isn't provided require is also
an interface to load. So use load to troubleshot this.

> .emacs.d/elpa/ is in my load-path.

Try to add a tilde

    ~/.emacs.d/elpa

or the complete path:

    /home/user/.emacs.d/elpa/

to test, put a file test.el in ~/.emacs.d

    (setq load-path '("~/.emacs.d/"))
    (load "test.el")

This works for me, but not if I do without the tilde
and then do `cd' to another directory.

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




  reply	other threads:[~2015-10-17 15:34 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 [this message]
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
     [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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87vba5wlty.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).