From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Extra information in autoload error Date: Sun, 23 Oct 2016 08:53:42 +0300 Message-ID: <83eg37pq55.fsf@gnu.org> References: <87k2e5nfdr.fsf@gmail.com> <87fuosoq4k.fsf@gmail.com> <87a8dw8iad.fsf@gmail.com> <87wph06sl5.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1477202062 18010 195.159.176.226 (23 Oct 2016 05:54:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 23 Oct 2016 05:54:22 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Alex Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 23 07:54:18 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byBjK-0001lk-C2 for ged-emacs-devel@m.gmane.org; Sun, 23 Oct 2016 07:53:58 +0200 Original-Received: from localhost ([::1]:39795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byBjM-0001sh-Nj for ged-emacs-devel@m.gmane.org; Sun, 23 Oct 2016 01:54:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byBjG-0001sP-Gp for emacs-devel@gnu.org; Sun, 23 Oct 2016 01:53:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byBjA-0000zz-8w for emacs-devel@gnu.org; Sun, 23 Oct 2016 01:53:54 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byBjA-0000zt-5C; Sun, 23 Oct 2016 01:53:48 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2374 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1byBj9-0006XE-EG; Sun, 23 Oct 2016 01:53:47 -0400 In-reply-to: <87wph06sl5.fsf@gmail.com> (message from Alex on Sat, 22 Oct 2016 14:23:34 -0600) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:208607 Archived-At: > From: Alex > Cc: emacs-devel@gnu.org, Eli Zaretskii > Date: Sat, 22 Oct 2016 14:23:34 -0600 > > (error "Autoloading failed to define function nlinum-mode2 in file > /home/alex/.emacs.d/elpa/nlinum-1.6/nlinum.elc") > > I also replaced the (require 'linum) with (load "linum") and got the > same result. > > So it seems to work. It seems that if there's a `require' or `load', > then those files get added to `load-history' before the initial file. > > >> Ping. Does anyone have an opinion on which of the two diffs is better? > > > > I'd go with the second, > > > > > > Stefan > > Is it just because it's a "safer" option, or do you (and Eli) figure the > second error message would just be better? The second variant is IMO more accurate: it doesn't claim that the missing autoload is in the named file. In the case above it would say Autoloading file /home/alex/.emacs.d/elpa/nlinum-1.6/nlinum.elc failed to define function nlinum-mode2 which is more honest, since we don't know whether the problematic/missing autoload is in the named file or in some file(s) loaded/required by it, or some macro defined elsewhere altogether.