GNU bug report logs -
#64842
30.0.50; org-mode hook doesn't load as expected
Previous Next
Reported by: Protonmail <ccqpein <at> protonmail.com>
Date: Tue, 25 Jul 2023 01:38:01 UTC
Severity: normal
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 64842 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thanks for you reply Eli. I think I figure out what’s going on. The `flyspell` also hooked with org-mode load failed by `failed to define function flyspell`. Then all other modes hooked in my org configuration don’t load.
Sorry for bothering. This issue can be closed.
Thanks
> On Jul 25, 2023, at 07:52, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> Date: Tue, 25 Jul 2023 01:37:12 +0000
>> From: Protonmail via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>
>> I add several modes hooks to org-mode via `use-package` and `straight.el`. However, it doesn't load
>> any of them as it did in several previous versions.
>>
>> Here is my configuration:
>>
>> ```elisp
>> (use-package org
>> ;;:straight (:type built-in)
>> :ensure org-plus-contrib
>> :hook
>> (
>> (org-mode . org-indent-mode)
>> (org-mode . visual-line-mode)
>> (org-mode . ejira-mode)
>> ))
>> ```
>>
>> Regardless of whether `:straight (:type built-in)` is configured or not, the modes that are being hooked
>> don't load.
>
> AFAICT, you are using :hook incorrectly. The "Hooks" node of the
> use-package manual explains how to use it correctly. In a nutshell,
> :hook is not for adding stuff to the hook of the package you are
> declaring with use-package.
[Message part 2 (text/html, inline)]
This bug report was last modified 1 year and 302 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.