From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#44804: 28.0.50; loading EBDB using use-package is throwing error Date: Sun, 22 Nov 2020 20:13:44 -0800 Message-ID: <87im9wd81z.fsf@ericabrahamsen.net> References: <87blfpkxk2.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35917"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 44804@debbugs.gnu.org To: Pankaj Jangid Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 23 05:14:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kh3Ev-0009Da-HW for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 05:14:09 +0100 Original-Received: from localhost ([::1]:52906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kh3Eu-0006L7-HU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Nov 2020 23:14:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kh3Eo-0006Kr-Mx for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2020 23:14:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37169) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kh3Eo-0005MT-G5 for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2020 23:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kh3Eo-0005Ju-CF for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2020 23:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Nov 2020 04:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44804 X-GNU-PR-Package: emacs Original-Received: via spool by 44804-submit@debbugs.gnu.org id=B44804.160610483720432 (code B ref 44804); Mon, 23 Nov 2020 04:14:02 +0000 Original-Received: (at 44804) by debbugs.gnu.org; 23 Nov 2020 04:13:57 +0000 Original-Received: from localhost ([127.0.0.1]:48715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kh3Ei-0005JU-RY for submit@debbugs.gnu.org; Sun, 22 Nov 2020 23:13:57 -0500 Original-Received: from ericabrahamsen.net ([52.70.2.18]:53502 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kh3Ef-0005JF-4n for 44804@debbugs.gnu.org; Sun, 22 Nov 2020 23:13:55 -0500 Original-Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 91DCEFA08F; Mon, 23 Nov 2020 04:13:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1606104826; bh=vE06CpSD9/10x5tyVQs9zWgpjF+9Hf1ivAU54Mi6sFw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=wQhWC9COrvQVEU4cAHubPGegO6WygJdiN5wQ8f43y0j1ONM7rvyu0Ro6pve+FFsUY psWW0cFenIarqoFLz33JKY15bK6aCqN5VleHwJq6oXa9oWqKAOOfojfmgXsclfFUyk sfKxyZryuLX5HGK1Wny+T/b9p5Uum6Zyq5uJwbYA= In-Reply-To: (Pankaj Jangid's message of "Mon, 23 Nov 2020 08:29:59 +0530") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193892 Archived-At: Pankaj Jangid writes: > Eric Abrahamsen writes: > >>> Error (use-package): Failed to parse package ebdb: Wrong type argument: >>> listp, require Disable showing Disable logging >>> >>> My configuration is: >>> >>> (use-package ebdb >>> :ensure t >>> :config >>> (setq ebdb-mua-pop-up nil) >>> :hook >>> (emacs-startup . (progn >>> (require 'ebdb-gnus) >>> (require 'ebdb-message)))) >> >> I've never used use-package so I'm not sure how much help I'm going to >> be here. But looking at its documentation, I wonder if it wouldn't make >> more sense to do this: >> >> (use-package ebdb-gnus >> :ensure t >> :config >> (setq ebdb-mua-pop-up nil) >> :hook gnus-startup) >> >> (use-package ebdb-message >> :ensure t >> :hook gnus-startup) > > Not actually. Basically use-package's argument is the package name that > we usually see in the `M-x package-list-packages'. The `:ensure t' > option is to make sure that the package is installed if it is not > already installed. `:init' is executed before loading and `:config' is > executed after loading of the package. So ideally this should work: > > (use-package ebdb > :ensure t ; this will make sure ebdb is installed > :config ; this will be executed after ebdb is loaded > (require 'ebdb-gnus) > (require 'ebdb-message)) > > But this increases load time. Hence the startup hook. So I would rather > use this when `use-package' will be part of core emacs: > > (use-package ebdb > :ensure t > :config > (use-package 'ebdb-gnus ; no `:ensure t' here, installed with ebdb > :hook emacs-startup) > (use-package 'ebdb-message > :hook emacs-startup)) So this is causing the same error? >> EBDB is set up to load everything you need if you just require the >> relevant MUA packages, so this should do it. All other likely entry >> points to EBDB should be autoloaded already. I don't know what :ensure >> does, but I left it in there. > > explained above. > >> >> Having these statements on the `emacs-startup-hook' seems like you're >> not gaining anything by using use-package. You might as well just >> (require 'ebdb-gnus) at the top-level of your init. > > actually when we use `:hook' in use-package it implies `:defer t'. This > saves some startup time. > > Without `use-package', my setup is working perfectly fine. But > eventually, people will report this bug. > > (add-hook 'emacs-startup-hook > (lambda () > (progn > (defvar ebdb-mua-pop-up nil) > (require 'ebdb-gnus) > (require 'ebdb-message)))) > > BTW your snippet is also giving same error, > > ;; Error (use-package): Failed to parse package 'ebdb-gnus: Wrong type > argument: symbolp, 'ebdb-gnus Disable showing Disable logging > ;; Error (use-package): Failed to parse package 'ebdb-message: Wrong type > argument: symbolp, 'ebdb-message Disable showing Disable logging Can you turn on debug-on-error (or start with --debug-init if it's blowing up at startup) and see what the actual backtrace is? Your original error was "Wrong type argument: listp, require", which doesn't mean very much to me.