[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with native-compilation
From: |
Felix Dietrich |
Subject: |
Re: Problem with native-compilation |
Date: |
Sat, 26 Mar 2022 14:58:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
> What is org-contacts.el? I don't see it in Emacs.
Itʼs part of org-contrib whose package currently resides here
<https://elpa.nongnu.org/nongnu/org-contrib.html>. Org-contrib used to
be part of the org-mode repository but was removed with version 9.5. I
do not know whether it was, together with org-mode, imported into the
Emacs tree.
>> From: Jonas Damm <emails@jonas-damm.de>
>> Date: Thu, 24 Mar 2022 23:17:38 +0100
>
>> After installing
>> the org-contacts package from nongnu org-contrib, at first everything
>> works as expected.
>>
>> However, after the compiling in the background is done, some functions
>> are broken:
>>
>>
>> Warning (comp): org-contacts.el:648:13: Warning: the function ‘start’ is not
>> known to be defined. Disable showing Disable logging
>> Warning (comp): org-contacts.el:593:12: Warning: the function ‘lexical-let*’
>> is not known to be defined. Disable showing Disable logging
>> Warning (comp): org-contacts.el:505:4: Warning: the function ‘list*’ is not
>> known to be defined. Disable showing Disable logging
>> Warning (comp): org-contacts.el:459:4: Warning: the function ‘lexical-let’
>> is not known to be defined. Disable showing Disable logging
>> Warning (comp): org-contacts.el:372:28: Warning: the function ‘values’ is
>> not known to be defined. Disable showing Disable logging
>> Warning (comp): org-contacts.el:330:44: Warning: the function ‘first’ is not
>> known to be defined. Disable showing Disable logging
>
> From the messages you show, it sounds like org-contacts.el has
> problems that are flagged by the native compilation, in particular it
> needs to (require 'cl) (for lexical-let*) and probably other packages
> to resolve the other "not known to be defined" problems.
Can or should (require 'cl) be wrapped in a ‘eval-when-compile’? What
is the state of the cl library? It is marked as obsolete. Are there
plans on how long it will be supported?
Anyway, Jonas, attached is a patch that cleans up the compilation errors
and warnings (at least ‘batch-byte-compile’ is satisfied). If you have
not yet gotten around to it yourself then this might be useful for you.
I did not dispense with ‘lexical-let’ by activating ‘lexical-binding’
because I did not want to read all of the code to see whether
org-contacts makes use of implicitly dynamically bound variables. The
patch applies to the current master (8c138dc) of the git repository of
the org-contrib package <https://git.sr.ht/~bzg/org-contrib/tree>.
0001-org-contacts-Fix-compilation-warnings-and-erros.patch
Description: Patch to clean-up compilation errors in org-contacts.el
--
Felix Dietrich