unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: W. Greenhouse <wgreenhouse-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org
Subject: Re: Emacs Package Loading & .emacs ??
Date: Tue, 01 Apr 2014 14:42:31 +0000	[thread overview]
Message-ID: <8761mt9kmg.fsf@motoko.kusanagi> (raw)
In-Reply-To: 86r45ikk8l.fsf@gmail.com

David Masterson <dsmasterson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> As mentioned above, if I don't (require 'org) at the right time, then
> the wrong version of org is loaded.  Since org-version is already
> defined, then that means that Org has already been loaded and, so, there
> is no need to reload it.  The only problem is that it is that wrong one.

Indeed, `require' doesn't do anything if a library fitting that feature name
(`provide' form) is already loaded. So there should be nothing magical
about `require' here that would cause it to load the correct org.

>> 2. The correct form would be (require 'org-install) anyway, if you were
>>    manually loading org.
>>
>> 3. If you decide for some reason that you really do need to use
>>    (require 'org-install), you should do this from `after-init-hook'
>>    (which is run at step 17 of (info "(elisp) Startup Summary"), well
>>    after package init), OR you can explicitly (package-initialize) early
>>    in init and (setq package-enable-at-startup nil) to skip step 15.
>>    above. (info "(emacs) Package Installation") details some of the
>>    pros and cons of each approach.
>
> Hmmm.  I'll have to recheck that.  This goes against the standard way of
> loading Emacs libraries that I've been using for 20+ years! Never needed
> to use after-init-hook before. It's so hard to teach an old dog new
> tricks...

The after-init-hook method works for me. What config did you use?




      parent reply	other threads:[~2014-04-01 14:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31  4:49 Emacs Package Loading & .emacs ?? David Masterson
2014-03-31  7:43 ` Martin
2014-03-31 17:18 ` W. Greenhouse
2014-04-01 11:49   ` Alan Schmitt
2014-04-01 14:44     ` W. Greenhouse
     [not found] ` <mailman.18607.1396286371.10748.help-gnu-emacs@gnu.org>
2014-03-31 23:43   ` David Masterson
2014-03-31 23:51     ` David Masterson
2014-04-01  1:38       ` Rusi
2014-04-01 14:42     ` W. Greenhouse [this message]

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=8761mt9kmg.fsf@motoko.kusanagi \
    --to=wgreenhouse-sgozh3hwpm2stnjn9+bgxg@public.gmane.org \
    --cc=help-gnu-emacs-mXXj517/zsQ@public.gmane.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).