From: Pankaj Jangid <pankaj@codeisgreat.org>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: 44804@debbugs.gnu.org
Subject: bug#44804: 28.0.50; loading EBDB using use-package is throwing error
Date: Mon, 23 Nov 2020 08:29:59 +0530 [thread overview]
Message-ID: <m2mtz8rd5c.fsf@codeisgreat.org> (raw)
In-Reply-To: <87blfpkxk2.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sun, 22 Nov 2020 11:21:01 -0800")
Eric Abrahamsen <eric@ericabrahamsen.net> 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))
> 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
next prev parent reply other threads:[~2020-11-23 2:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-22 18:27 bug#44804: 28.0.50; loading EBDB using use-package is throwing error Pankaj Jangid
2020-11-22 19:21 ` Eric Abrahamsen
2020-11-23 2:59 ` Pankaj Jangid [this message]
2020-11-23 4:13 ` Eric Abrahamsen
2020-11-23 5:47 ` Pankaj Jangid
2020-11-23 6:02 ` Eric Abrahamsen
2020-11-23 6:40 ` Pankaj Jangid
2020-11-23 18:28 ` Eric Abrahamsen
2022-01-28 15:08 ` Lars Ingebrigtsen
2022-01-28 16:21 ` Eric Abrahamsen
2022-02-28 9:52 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2mtz8rd5c.fsf@codeisgreat.org \
--to=pankaj@codeisgreat.org \
--cc=44804@debbugs.gnu.org \
--cc=eric@ericabrahamsen.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).