emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: Loris Bennett <loris.bennett@fu-berlin.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: [OT] Requiring packages which may be missing?
Date: Tue, 25 Apr 2017 00:01:33 +1000	[thread overview]
Message-ID: <87pog1c3ds.fsf@gmail.com> (raw)
In-Reply-To: <8760hudw4g.fsf@fu-berlin.de>


Have a look at the use-package package. I have found it makes this much
easier. There are some complications associated with using it and
org-mode, due mainly to emacs being bundled with one version and another
vesion being available in both the gnus and org-mode elpa
repos. However, once you have that bit sorted, the rest really makes
managing your packages easier.

One of the nice things about use-package is that it includes the :ensure
keyword, which tells emacs to ensure that the package has been
installed. So you emacs init file ends up being essentially a lot of
use-package stanzas that are easy to maintain and ensure all the
packages are loaded. I keep my emacs init file on github and when I run
emacs on a different system, all I need to do is clone the repo and
start emacs. The first run will be a little slow as emacs installs all
the packages I need, but after that, it is fast - in fact, use-package
has options which can speed up emacs startup by delaying loading of
package (it sets up autoloads for you). I also find managing my
configuration much cleaner.

Yes, I am definitely a convert. There are wrinkles - it isn't magic and
you will go through some trial an error, but I've been using it for a
while now and am very happy with how much easier managing my init.el and
all my elpa packages is.

HTH

Tim

Loris Bennett writes:

> Hi,
>
> This is more of a general emacs question.
>
> I often use the same .emacs on various machines which may not have all
> the packages I normally load.  To get around this I use the Fabrice
> Niessen's 'try-require' function taken from
>
>   http://www.mygooglest.com/fni/dot-emacs.html
>
> Due to some recent  problems, I wanted to look at the  way I load things
> and wondered how others deal with missing packages.
>
> Cheers,
>
> Loris
>
> PS: I mainly use Emacs 25, but would be interested in Emacs 24
> compatibility.


-- 
---
Tim Cross

      parent reply	other threads:[~2017-04-24 14:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24  8:53 [OT] Requiring packages which may be missing? Loris Bennett
2017-04-24 10:16 ` Adam Porter
2017-04-24 14:09   ` Tim Cross
2017-04-24 23:07     ` Adam Porter
2017-04-24 14:01 ` Tim Cross [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.orgmode.org/

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

  git send-email \
    --in-reply-to=87pog1c3ds.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=loris.bennett@fu-berlin.de \
    /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 public inbox

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

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).