From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@newcastle.ac.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: Elpa packages and macro dependencies. Date: Fri, 17 Oct 2014 13:03:29 +0100 Message-ID: <8761fiaooe.fsf@newcastle.ac.uk> References: <8761fjsp2c.fsf@Rainer.invalid> <87y4sfgm52.fsf@Rainer.invalid> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1413547435 18329 80.91.229.3 (17 Oct 2014 12:03:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Oct 2014 12:03:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Achim Gratz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 17 14:03:48 2014 Return-path: Envelope-to: ged-emacs-devel@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 1Xf6G3-0003tR-JZ for ged-emacs-devel@m.gmane.org; Fri, 17 Oct 2014 14:03:47 +0200 Original-Received: from localhost ([::1]:59678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xf6G2-0003fh-FR for ged-emacs-devel@m.gmane.org; Fri, 17 Oct 2014 08:03:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xf6Fv-0003fQ-3d for emacs-devel@gnu.org; Fri, 17 Oct 2014 08:03:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xf6Fq-0008TC-CU for emacs-devel@gnu.org; Fri, 17 Oct 2014 08:03:39 -0400 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:60093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xf6Fq-0008S8-6p for emacs-devel@gnu.org; Fri, 17 Oct 2014 08:03:34 -0400 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Xf6Fl-0004yz-F2; Fri, 17 Oct 2014 13:03:29 +0100 Original-Received: from jangai.ncl.ac.uk ([10.66.67.223] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1Xf6Fl-000091-Bw; Fri, 17 Oct 2014 13:03:29 +0100 In-Reply-To: <87y4sfgm52.fsf@Rainer.invalid> (Achim Gratz's message of "Fri, 17 Oct 2014 10:01:45 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:175517 Archived-At: Achim Gratz writes: > Again, this in particular is only really a problem for built-in packages > since there's no way to make Emacs completely forget about the built-in > package when you happen to install a newer version of it via ELPA later > on. When an autoloaded function is moved into a different file in the > new version, the new autoload definition is ignored (because there > already is one) and if you try to invoke the function the wrong file > gets loaded so it doesn't work (the original autoload definition is > always read during Emacs' startup). It's admittedly a rare occurence, > but if you split a single-file package into multiple files or if you > were to do some refactoring (like the Org 7.x->8.x transistion) it can > bite you. I've been bitten by this one. Would it not be possible to have package.el check when it installs packages from ~/.emacs.d if that package is also in Emacs core and then remove the relevant paths from load-path. So if I have in my .emacs (require 'org) (require 'org-latex) would work iff org is only in core. But would crash with "cannot open load file" if org is loaded from ELPA. If it doesn't crash in my .emacs I am going to get strange errors later anyway, from loading two versions of org. All of this could be calculated when a new package is installed, it seems to me. Phil