emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-contacts.el use lexical-let  not defined in cl-lib
@ 2021-04-23 10:27 Michael Eliachevitch
  2021-04-24  5:05 ` Kyle Meyer
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Eliachevitch @ 2021-04-23 10:27 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1717 bytes --]

Dear all,

I'm not sure if this is the correct mailinglist for org-contrib bugs. I found that org-contacts.el uses `lexical-let*` which is defined in `cl`, but it only requires `cl-lib` where it is not defined.

I found this because I use 
`org-contacts-message-complete-function` to autocomplete contacts 
in mu4e and recently it started giving me errors, see this 
stacktrace:

    Debugger entered--Lisp error: (void-function start)
      start(121)
      org-contacts-message-complete-function()
      completion--capf-wrapper(org-contacts-message-complete-function 
      all)
      completion-at-point()
      message-tab()
      funcall-interactively(message-tab)
      command-execute(message-tab)

However, when I went to the source file and evaluated it (or used 
the debugger), everything worked fine. So it seems this error was 
just occurring when running over the compiled file (I compile to 
elc via the nativ-comp branch and with straight).

I then did a search for the query and found a stackexchange post 
(https://emacs.stackexchange.com/a/18727) which gave me the idea 
for the cause. Adding `(require cl) to the file and recompiling it 
fixed the error.

My org version is release_9.4.5-321-ge641d3. However, I see that 
on the master branch still uses lexical-let*.

Is this a bug or some error in my configuration? Should I send an 
email elsewhere or submit a bug-report? Because (require 'cl) is 
deprecated, test solution would be to replace the lexical-let* 
with something else like a normal let*, but I'm not confident 
enough in my lisp to do this by myself.

Best regards,
Michael Eliachevitch

--
Michael Eliachevitch
PGP: https://keyoxide.org/546908C782383AD0E7D894EC1B8F95C8125DCE31

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 519 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: org-contacts.el use lexical-let  not defined in cl-lib
  2021-04-23 10:27 org-contacts.el use lexical-let not defined in cl-lib Michael Eliachevitch
@ 2021-04-24  5:05 ` Kyle Meyer
  0 siblings, 0 replies; 2+ messages in thread
From: Kyle Meyer @ 2021-04-24  5:05 UTC (permalink / raw)
  To: Michael Eliachevitch; +Cc: emacs-orgmode

Michael Eliachevitch writes:

> Dear all,
>
> I'm not sure if this is the correct mailinglist for org-contrib
> bugs.

Thanks for the report.  Yes, this is the place [*].  stardiviner (+cc)
recently took over maintaining org-contacts.el.

> I found that org-contacts.el uses `lexical-let*` which is defined in
> `cl`, but it only requires `cl-lib` where it is not defined.
[...]
> My org version is release_9.4.5-321-ge641d3. However, I see that 
> on the master branch still uses lexical-let*.
>
> Is this a bug or some error in my configuration? Should I send an 
> email elsewhere or submit a bug-report? Because (require 'cl) is 
> deprecated, test solution would be to replace the lexical-let* 
> with something else like a normal let*, but I'm not confident 
> enough in my lisp to do this by myself.

This is a bug in org-contacts.el.  Loading cl was dropped in ea238b78f
(contrib: move a few libraries to cl-lib in place of compile-time cl,
2015-11-06), and, as you note, it's still needed for lexical-let.

I haven't looked at the org-contact's lexical-let call sites closely,
but I think the way forward is to move org-contacts.el over to lexical
binding and stop using anything from cl.el.

stardiviner, what do you think?


[*] ... though sometime soon the plan is to move contrib/ packages
    elsewhere, at which point I guess it mostly will depend on who is
    taking care of a given contrib/ package.

    https://orgmode.org/list/87wnzfy60h.fsf@bzg.fr


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-24  5:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 10:27 org-contacts.el use lexical-let not defined in cl-lib Michael Eliachevitch
2021-04-24  5:05 ` Kyle Meyer

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).