From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Visher Newsgroups: gmane.emacs.help Subject: Re: transition to package.el Date: Tue, 27 Aug 2013 09:17:12 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1377609488 22858 80.91.229.3 (27 Aug 2013 13:18:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 Aug 2013 13:18:08 +0000 (UTC) Cc: emacs To: Perry Smith Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 27 15:18:12 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VEJ9u-0004IO-Tt for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Aug 2013 15:18:11 +0200 Original-Received: from localhost ([::1]:56391 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEJ9u-000496-9b for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Aug 2013 09:18:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEJ9i-000488-Mn for help-gnu-emacs@gnu.org; Tue, 27 Aug 2013 09:18:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEJ9g-0003hS-QH for help-gnu-emacs@gnu.org; Tue, 27 Aug 2013 09:17:58 -0400 Original-Received: from mail-vc0-x22d.google.com ([2607:f8b0:400c:c03::22d]:63032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEJ9g-0003hN-LR for help-gnu-emacs@gnu.org; Tue, 27 Aug 2013 09:17:56 -0400 Original-Received: by mail-vc0-f173.google.com with SMTP id id13so2959289vcb.18 for ; Tue, 27 Aug 2013 06:17:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=vGUPHgaN/eY2+9Fw5tfAfKSBhDBlRXS3WQvV1SO/JzA=; b=Nx+QrN2PVKmq/YthSnQ4AncsX+TibaOc0O0Rj5N99ma+HQn+EBH/wS6MhNwHsgKBF3 Rms7oBafJ0Hp8kO5mqNqxSlf/8h++VkprPDQYP/fchSBST7fXy8aroZ7r2XX55SEU49U R+W4RqeLZdu+f4jMBqqW9uxiw7YmNse6fW6VbFIZsF4SzxjI+VYqfChQbcEadEsP6EqV PEhfa7bUAcnrY4bRBHOuQ7KvP/dLHBIA6dwcYfv6CsFuYxfzY55rV1qKYCnhpRIf0Nm3 Zx5zVANmGljjIr/DCaWqUz9N9L6ZfTEIQ9Qh1tctOp5L1NEL7PZDPVrk/wns6hI36hQY 0MPw== X-Received: by 10.58.19.162 with SMTP id g2mr20448944vee.12.1377609472783; Tue, 27 Aug 2013 06:17:52 -0700 (PDT) Original-Received: by 10.221.54.129 with HTTP; Tue, 27 Aug 2013 06:17:12 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c03::22d X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93112 Archived-At: Hi Perry, On Mon, Aug 26, 2013 at 1:30 PM, Perry Smith wrote: > I have emacs 24.3 on my Mac and AIX hosts. One .el file I currently have= uses "assoc" which is obsolete so I need to update that file. I thought i= t might be good to start transitioning over to using packages. > > I currently have a big git repository for .emacs.d (that happens to be pu= blic on Github) that I pull from and push to so I can move to a new host qu= ickly and I can keep all the various accounts on various hosts more or less= synced up. Many of the things in this repository are things I've download= ed... things which are now available as packages. > > Does anyone have any suggestions for making this transition? I don't see= any blog posts on the topic. I haven't written a post but I'll say that if you're on Emacs 24 which includes package.el then it's very easy to do. See these bits from my own .emacs.d: https://github.com/timvisher/.emacs.d/blob/master/init.el#L8-L12 https://github.com/timvisher/.emacs.d/blob/master/timvisher/timvisher_packa= ge.el The basic strategy, in either direction, is to require package and then have a list of package symbols that you dolist over calling package-install. See the files for more details. This is all you'll need to do to get a consistent set of packages installed. But=E2=80=A6 > One question is if you would suggest checking in the packages downloaded = into the git repository or have git ignore them? I can see arguments both = ways. I'm wondering what other have found to work for them. If you choose to go with not checking the packages in you're going to be subject to a couple of things: 1. If ELPA/Marmalade/MELPA is ever down (I actually experienced this when attempting to help a buddy of mine install my .emacs.d), you won't be able to use your config. package will simply fail to install things but then if you haven't very carefully crafted the rest of your .emacs.d you'll almost certainly blow up because packages that should be there aren't. 2. If versions have changed then you will get updated versions. On more than one occasion I've dropped my .emacs.d down and had it start up only to find that there are bugs or features removed from more recent versions of a package. Since (atm) package doesn't allow you to specify a version (if I had more time I'd be trying to develop this feature because we really need it!), you just get whatever is most recent. That means that if you do specify both Marmalade and MELPA, for instance, you always get the dev snapshot because it sorts higher. There is a way to configure this away but I can't find it atm. 3. If you do choose to upgrade and find a subtle bug or incompatibility you'll be up a creek because there's no easy way to revert to your earlier config. So in light of those things I would recommend always checking in all the packages you install. The biggest annoyance is that you'll have to see a bunch of cruft in your commit logs. Hope that helps! -- In Christ, Timmy V. http://blog.twonegatives.com/ http://five.sentenc.es/ -- Spend less time on mail