From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Cross Subject: Re: [OT] Requiring packages which may be missing? Date: Tue, 25 Apr 2017 00:01:33 +1000 Message-ID: <87pog1c3ds.fsf@gmail.com> References: <8760hudw4g.fsf@fu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2eYn-0001m8-IG for emacs-orgmode@gnu.org; Mon, 24 Apr 2017 10:01:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d2eYd-0000KQ-SZ for emacs-orgmode@gnu.org; Mon, 24 Apr 2017 10:01:49 -0400 Received: from mail-pf0-x233.google.com ([2607:f8b0:400e:c00::233]:35264) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d2eYd-0000K7-Mw for emacs-orgmode@gnu.org; Mon, 24 Apr 2017 10:01:39 -0400 Received: by mail-pf0-x233.google.com with SMTP id v14so9160698pfd.2 for ; Mon, 24 Apr 2017 07:01:39 -0700 (PDT) In-reply-to: <8760hudw4g.fsf@fu-berlin.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Loris Bennett Cc: emacs-orgmode@gnu.org 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