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: Wed, 21 Sep 2016 16:16:27 -0600 Message-ID: <87fuosoq4k.fsf@gmail.com> References: <87k2e5nfdr.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1474496216 20755 195.159.176.226 (21 Sep 2016 22:16:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Sep 2016 22:16:56 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: emacs-devel@gnu.org To: Davis Herring Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 22 00:16:52 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 1bmpou-0004Nv-J4 for ged-emacs-devel@m.gmane.org; Thu, 22 Sep 2016 00:16:48 +0200 Original-Received: from localhost ([::1]:60027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmpos-0005Zm-Sh for ged-emacs-devel@m.gmane.org; Wed, 21 Sep 2016 18:16:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmpoi-0005XJ-TF for emacs-devel@gnu.org; Wed, 21 Sep 2016 18:16:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmpoc-00044o-Pa for emacs-devel@gnu.org; Wed, 21 Sep 2016 18:16:35 -0400 Original-Received: from mail-io0-x22a.google.com ([2607:f8b0:4001:c06::22a]:32807) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmpoc-00044i-KO for emacs-devel@gnu.org; Wed, 21 Sep 2016 18:16:30 -0400 Original-Received: by mail-io0-x22a.google.com with SMTP id r145so67839046ior.0 for ; Wed, 21 Sep 2016 15:16:30 -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=vnYEe6NfcoZzbvQ2w9HjVjKkpkD7N8FpmGBe+nIGl6A=; b=oiVSDchPHR/7jcPpWwIfG5jvbUWrSV+dXhPn+0jQwb5VBLshMewVK2lBJLX111NdJy QKQWxHK42q7Yd85M8PHRanFm+WPNDRjIxi3wakmdn0H9GNVsta/ILHFgISOdtkHUI2R9 MYifU6jQ+iy6WRyWsr1VCJpmiS3HvaNxaAwbqzTSWDodfyg6Xa52GijPoDSAxqtwrjFo Q3+kSWnNCEczb7ectEPPomk3sAzonlJyThMpBrIwKDtQ1/L5R/ufkVjIN5zyHaMpYWFr IO1jJdg6pXQMZho1zJvFtz2ME/9nIIyHIL4TNRKy+j9xFo1CdxN7B0xsdj2/kMhILA72 Uglg== 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=vnYEe6NfcoZzbvQ2w9HjVjKkpkD7N8FpmGBe+nIGl6A=; b=gjJMd6C4UqCoML923w2tochM7oznzImBENc0u2kRrxbUM9j8O6cAKcaeOiBfABRdXM 9O9iXJDfUHaZbiINLfS78alcQ5Bs2FwqY/m8chWdK8muNeIvYIu4hB02LNTnOsZ81rGC hVzgKrwL1CJz9lV9HXsj5UvE5pW//BOIAHh6eNuX0K5aL/8e0rXdXnojmvXLLWezYLys II/acW6iCcslSwLFD7Puj+uQ/4PjlZAF2okLIGSYJlFDnm4+ADfqZiH38vJ6i+dA24ut tEcWzgJSysk21eTkS8MtziBOggY+yhvE26aZJkvkVlMENHqnzLwKiWHSeZn0XVn7Evzr AELg== X-Gm-Message-State: AE9vXwO0QduzSA1YDmV+x3GmmYuN2uMf9LjhSgDoN7RW9anI+7v6hVBPe5cOvIWtvWX3sA== X-Received: by 10.107.147.69 with SMTP id v66mr22119798iod.63.1474496190168; Wed, 21 Sep 2016 15:16:30 -0700 (PDT) Original-Received: from lylat (S01061859339e9903.ss.shawcable.net. [174.2.107.88]) by smtp.gmail.com with ESMTPSA id g78sm12899011itb.12.2016.09.21.15.16.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Sep 2016 15:16:29 -0700 (PDT) In-Reply-To: (Davis Herring's message of "Wed, 21 Sep 2016 15:13:28 -0600") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c06::22a 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:207680 Archived-At: --=-=-= Content-Type: text/plain Davis Herring writes: >> + error ("Autoloading failed to define function %s in file %s", > > I'd phrase it as "Autoloading file %s failed to define function %s". (It's a bit > odd to say the function is in the file when we've just learned it isn't.) > > Davis Thanks, I agree that it's better. I suppose I wanted to append rather than rewrite the message, but there's really no reason to hold back. The updated patches follow: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=autoload-1.patch Content-Description: vload_history diff --git a/src/eval.c b/src/eval.c index e08a25a..4daf052 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1987,7 +1987,8 @@ it defines a macro. */) Lisp_Object fun = Findirect_function (funname, Qnil); if (!NILP (Fequal (fun, fundef))) - error ("Autoloading failed to define function %s", + error ("Autoloading file %s failed to define function %s", + SDATA (Fcar (Fcar (Vload_history))), SDATA (SYMBOL_NAME (funname))); else return fun; --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=autoload-2.patch Content-Description: funname diff --git a/src/eval.c b/src/eval.c index e08a25a..8c5c5e5 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1987,7 +1987,8 @@ it defines a macro. */) Lisp_Object fun = Findirect_function (funname, Qnil); if (!NILP (Fequal (fun, fundef))) - error ("Autoloading failed to define function %s", + error ("Autoloading filename %s failed to define function %s", + SDATA (Fcar (Fcdr (fundef))), SDATA (SYMBOL_NAME (funname))); else return fun; --=-=-=--