From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Extra information in autoload error Date: Sun, 23 Oct 2016 15:24:01 -0600 Message-ID: <87eg36iwsu.fsf@gmail.com> References: <87k2e5nfdr.fsf@gmail.com> <87fuosoq4k.fsf@gmail.com> <87a8dw8iad.fsf@gmail.com> <87wph06sl5.fsf@gmail.com> <83eg37pq55.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1477257868 2239 195.159.176.226 (23 Oct 2016 21:24:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 23 Oct 2016 21:24:28 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 23 23:24:24 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 1byQFY-0007A1-Tj for ged-emacs-devel@m.gmane.org; Sun, 23 Oct 2016 23:24:13 +0200 Original-Received: from localhost ([::1]:42548 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byQFb-0003DU-Aa for ged-emacs-devel@m.gmane.org; Sun, 23 Oct 2016 17:24:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byQFT-0003DP-EO for emacs-devel@gnu.org; Sun, 23 Oct 2016 17:24:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byQFQ-0001Fh-AE for emacs-devel@gnu.org; Sun, 23 Oct 2016 17:24:07 -0400 Original-Received: from mail-yw0-x242.google.com ([2607:f8b0:4002:c05::242]:33933) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1byQFQ-0001Fb-69; Sun, 23 Oct 2016 17:24:04 -0400 Original-Received: by mail-yw0-x242.google.com with SMTP id u124so5701739ywg.1; Sun, 23 Oct 2016 14:24:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=oW8umKOyzSyWIwt3E0OBlh0wD2bOjmT9P7HtrzhUtHY=; b=D0tPxM6I33g7HZGQasKCV1eCih34q9CEklP1EKK7PSNc8SXNGcYpa1qWAiEz/e/dqL pWynP1m1M+8NFijfAO81RnkX4i9K5Q8V3Xmw7ksmrSMb+Fb7sybwmiucZhRIlYdhKU8P i+iYw34E9cjJj0EC++4v1U0VmjX04aYeHxfj/cZXXRIDlu5hCW72PlC4xiuCpF1i6Wpl ZSNQ0/tI+cthbVWDWEjK0/bFgj/NYZzPIazIGP+QHR9cMmIZzuIQNRG4LTbkPahxFwgC +Grz+ajD4TAolb1lTI+nZuaBFA58ELZZMSHAMtoMPhDYTEIFIcjFlG3/looA+mDW51e6 L2nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=oW8umKOyzSyWIwt3E0OBlh0wD2bOjmT9P7HtrzhUtHY=; b=dokWq1K6mhV9cUsBuqwMtvPxJjsljLlW3n+BnkH2fGC29Oob1PqNDoQM3kRHwVm1xS gKbeb9HMitDND/LK01RJLd7hFM5tfPH43L/00oIlSFhA7uR2YLOd7USDciDpo/ZtdAic g2AWiSeX7uhVGTPU+Zx/Nsg0s30M111JzWsbAJTY/oaZ5mR2GUOWrXr9RociRqE4GN/1 oB5jeNnZZ5J/Ot1s5UygNZOTU9eF3dxAqMlB7sTnWSzP2sNUn8lAph27Tc2vN5H9XJYE lsSJakGtGMr3PPZ7zZWBLhH1TUx0xr0zzJ1GlK1mAMLASWaXzLZVqduvd38x63bJ66SF oRoQ== X-Gm-Message-State: ABUngvdUqAFF8Rm1JhNc3RQrmiKjwIwhYkrWZUG3mdHZGGXrFQsrNJmZAHc9lWWMhjnLDg== X-Received: by 10.107.3.218 with SMTP id e87mr10596202ioi.113.1477257843557; Sun, 23 Oct 2016 14:24:03 -0700 (PDT) Original-Received: from lylat (S01061859339e9903.ss.shawcable.net. [174.2.107.88]) by smtp.gmail.com with ESMTPSA id 65sm263203itg.19.2016.10.23.14.24.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Oct 2016 14:24:03 -0700 (PDT) In-Reply-To: <83eg37pq55.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 23 Oct 2016 08:53:42 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c05::242 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:208646 Archived-At: Eli Zaretskii writes: >> 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. Sorry, I accidentally posted the older error message instead of the new one. I was wondering if you preferred the version that used SDATA (Fcar (Fcar (Vload_history))) or SDATA (Fcar (Fcdr (fundef))) to get the extra information. The first one gets the file path, while the second one just gets what was in the autoload object.