emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Potential bug: Invalid function: org-encode-time
@ 2022-08-14 20:23 Duy Nguyen
  2022-08-16  9:20 ` Ihor Radchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Duy Nguyen @ 2022-08-14 20:23 UTC (permalink / raw)
  To: Emacs-orgmode

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

Hi everyone,

I am having issues trying to use the latest version of Org with straight
(the built-in version works fine. Currently testing with a minimal config,
i.e. I only have the necessary code to enable straight and use-package in
my init.el, and I have added the following as well:

(use-package org
  :straight t)

Initially, when I generate an ~org-clock-report~ table it works just fine.
However, at some random point it stops working and just gives me the
following error: "Invalid function: org-encode-time". Not sure if I
explained it well, so here is a short video <https://youtu.be/wSrqDHNlMNA>
to show what is happening (I am continuously pressing C-c to refresh the
org clock table).

If I manually delete the contents of the =eln-cache= folder and restart
emacs, I can use ~org-clock-report~ again, but at some point it will just
give me the same error just like in the video.

Anyone could help me find out what the issue is?

Thanks,
Duy

[-- Attachment #2: Type: text/html, Size: 1170 bytes --]

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

* Re: Potential bug: Invalid function: org-encode-time
  2022-08-14 20:23 Potential bug: Invalid function: org-encode-time Duy Nguyen
@ 2022-08-16  9:20 ` Ihor Radchenko
  2022-08-16 10:08   ` Duy Nguyen
  2022-08-16 11:47   ` Max Nikulin
  0 siblings, 2 replies; 7+ messages in thread
From: Ihor Radchenko @ 2022-08-16  9:20 UTC (permalink / raw)
  To: Duy Nguyen; +Cc: Emacs-orgmode

Duy Nguyen <ddnguyen2101@gmail.com> writes:

> Initially, when I generate an ~org-clock-report~ table it works just fine.
> However, at some random point it stops working and just gives me the
> following error: "Invalid function: org-encode-time". Not sure if I
> explained it well, so here is a short video <https://youtu.be/wSrqDHNlMNA>
> to show what is happening (I am continuously pressing C-c to refresh the
> org clock table).

This is Emacs bug. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56746

I just pushed a workaround that should hopefully fix the issue.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


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

* Re: Potential bug: Invalid function: org-encode-time
  2022-08-16  9:20 ` Ihor Radchenko
@ 2022-08-16 10:08   ` Duy Nguyen
  2022-08-16 11:47   ` Max Nikulin
  1 sibling, 0 replies; 7+ messages in thread
From: Duy Nguyen @ 2022-08-16 10:08 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Emacs-orgmode

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

>
> I just pushed a workaround that should hopefully fix the issue.
>

Thanks Ihor, it seems to work for me now! Before when I evaluated
~(org-matcher-time "<2022-08-15 Mon 00:00>")~ manually it would give me the
error, however I don't have it anymore with the latest main branch.

Duy

[-- Attachment #2: Type: text/html, Size: 508 bytes --]

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

* Re: Potential bug: Invalid function: org-encode-time
  2022-08-16  9:20 ` Ihor Radchenko
  2022-08-16 10:08   ` Duy Nguyen
@ 2022-08-16 11:47   ` Max Nikulin
  2022-08-16 11:55     ` Ihor Radchenko
  1 sibling, 1 reply; 7+ messages in thread
From: Max Nikulin @ 2022-08-16 11:47 UTC (permalink / raw)
  To: emacs-orgmode

On 16/08/2022 16:20, Ihor Radchenko wrote:
> Duy Nguyen writes:
> 
>> Initially, when I generate an ~org-clock-report~ table it works just fine.
>> However, at some random point it stops working and just gives me the
>> following error: "Invalid function: org-encode-time". Not sure if I
>> explained it well, so here is a short video <https://youtu.be/wSrqDHNlMNA>
>> to show what is happening (I am continuously pressing C-c to refresh the
>> org clock table).
> 
> This is Emacs bug. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56746
> 
> I just pushed a workaround that should hopefully fix the issue.

Is there a chance that `eval-when-compile' around the original 
definition will help? Sorry, I am still avoiding setting up of 
development environment for emacs.




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

* Re: Potential bug: Invalid function: org-encode-time
  2022-08-16 11:47   ` Max Nikulin
@ 2022-08-16 11:55     ` Ihor Radchenko
  2022-08-16 12:44       ` Max Nikulin
  0 siblings, 1 reply; 7+ messages in thread
From: Ihor Radchenko @ 2022-08-16 11:55 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-orgmode

Max Nikulin <manikulin@gmail.com> writes:

>> This is Emacs bug. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56746
>> 
>> I just pushed a workaround that should hopefully fix the issue.
>
> Is there a chance that `eval-when-compile' around the original 
> definition will help? Sorry, I am still avoiding setting up of 
> development environment for emacs.

It could, but I took a different approach.
See https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d3a9c424ba32382fff1da4f4ecb447dc99205261

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


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

* Re: Potential bug: Invalid function: org-encode-time
  2022-08-16 11:55     ` Ihor Radchenko
@ 2022-08-16 12:44       ` Max Nikulin
  2022-08-16 12:51         ` Ihor Radchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Max Nikulin @ 2022-08-16 12:44 UTC (permalink / raw)
  To: emacs-orgmode

On 16/08/2022 18:55, Ihor Radchenko wrote:
> Max Nikulin writes:
> 
>>> This is Emacs bug. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56746
>>>
>>> I just pushed a workaround that should hopefully fix the issue.
>>
>> Is there a chance that `eval-when-compile' around the original
>> definition will help? Sorry, I am still avoiding setting up of
>> development environment for emacs.
> 
> It could, but I took a different approach.
> See https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d3a9c424ba32382fff1da4f4ecb447dc99205261

Thank you for the fix. I asked about `eval-when-compile' because lack of 
it may be my mistake and with hope to find a workaround with no 
performance impact. Testing of `encode-time' version by running it on 
each macro expansion can hardly be called optimal.



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

* Re: Potential bug: Invalid function: org-encode-time
  2022-08-16 12:44       ` Max Nikulin
@ 2022-08-16 12:51         ` Ihor Radchenko
  0 siblings, 0 replies; 7+ messages in thread
From: Ihor Radchenko @ 2022-08-16 12:51 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-orgmode

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

> Testing of `encode-time' version by running it on
each macro expansion can hardly be called optimal.

It will mostly impact the compile time. If you wish, you may wrap the
version check and the `encode-time' test into `eval-when-compile'

On Tue, Aug 16, 2022 at 8:44 PM Max Nikulin <manikulin@gmail.com> wrote:

> On 16/08/2022 18:55, Ihor Radchenko wrote:
> > Max Nikulin writes:
> >
> >>> This is Emacs bug. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56746
> >>>
> >>> I just pushed a workaround that should hopefully fix the issue.
> >>
> >> Is there a chance that `eval-when-compile' around the original
> >> definition will help? Sorry, I am still avoiding setting up of
> >> development environment for emacs.
> >
> > It could, but I took a different approach.
> > See
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d3a9c424ba32382fff1da4f4ecb447dc99205261
>
> Thank you for the fix. I asked about `eval-when-compile' because lack of
> it may be my mistake and with hope to find a workaround with no
> performance impact. Testing of `encode-time' version by running it on
> each macro expansion can hardly be called optimal.
>
>
>

[-- Attachment #2: Type: text/html, Size: 1876 bytes --]

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

end of thread, other threads:[~2022-08-16 12:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-14 20:23 Potential bug: Invalid function: org-encode-time Duy Nguyen
2022-08-16  9:20 ` Ihor Radchenko
2022-08-16 10:08   ` Duy Nguyen
2022-08-16 11:47   ` Max Nikulin
2022-08-16 11:55     ` Ihor Radchenko
2022-08-16 12:44       ` Max Nikulin
2022-08-16 12:51         ` Ihor Radchenko

Code repositories for project(s) associated with this public 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).