all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrea Corallo <acorallo@gnu.org>
To: Andrea Corallo <akrl@sdf.org>
Cc: Eli Zaretskii <eliz@gnu.org>,
	56746-done@debbugs.gnu.org,
	Kenneth Stuart <kstuart@hotmail.co.uk>
Subject: bug#56746: 29.0.50; Probable bug with native compilation
Date: Wed, 07 Jun 2023 17:20:46 -0400	[thread overview]
Message-ID: <yp1h6rj9dg1.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <xjfk07zkm6k.fsf@ma.sdf.org> (Andrea Corallo's message of "Wed, 27 Jul 2022 08:13:39 +0000")

Andrea Corallo <akrl@sdf.org> writes:

> Kenneth Stuart <kstuart@hotmail.co.uk> writes:
>
>> Andrea Corallo <akrl@sdf.org> writes:
>>
>>> Eli Zaretskii <eliz@gnu.org> writes:
>>>
>>>>> From: Kenneth Stuart <kstuart@hotmail.co.uk>
>>>>> Date: Sun, 24 Jul 2022 15:16:42 +0100
>>>>> 
>>>>> Note that I'm not using 'emacs -Q' as a later version of Org is
>>>>> required, however the issue strongly appears to be with emacs native
>>>>> compilation as it does not occur from a build without native
>>>>> compilation.
>>>>> 
>>>>> org-mode commit: 127e7fee4959ceb33dba2e442b72189f3c25eaa1
>>>>> 
>>>>> Steps to reproduce:
>>>>> 
>>>>> 1. Create an org-mode buffer and insert a clocktable dynamic block with a
>>>>> `tstart` option.
>>>>> 
>>>>> #+BEGIN: clocktable :scope file :maxlevel 2 :tstart "2020-01-01"
>>>>> #+END:
>>>>> 
>>>>> 2. Evaluate the clocktable (C-c C-c on the #+BEGIN line)
>>>>> 
>>>>> Result: `Invalid function: org-encode-time`
>>>>> Expected: No error, clocktable updated successfully
>>>>> 
>>>>> Notes:
>>>>> 
>>>>> References:
>>>>> https://mail.gnu.org/archive/html/emacs-orgmode/2022-07/msg00738.html
>>>>> https://mail.gnu.org/archive/html/emacs-orgmode/2022-07/msg00696.html
>>>>> 
>>>>> In early April Org introduced a new macro `org-encode-time` which is
>>>>> used in the `let` special form of function `org-matcher-time`
>>>>> 
>>>>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org-macs.el#n1395
>>>>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org-macs.el#n1463
>>>>> 
>>>>> Function `org-matcher-time` is used by the clocktable dynamic block
>>>>> options, for example adding a `tstart` option and evaluation the
>>>>> clocktable emits the error "Invalid function: org-encode-time".
>>>>> 
>>>>> If then going to the source for `org-matcher-time` and evaluating the
>>>>> defun, the clocktable can then be evaluated without error.
>>>>> 
>>>>> As previously stated this issue does not occur when not using native
>>>>> compilation.
>>>>
>>>> Andrea, could you please look into this bug report?  It sounds like
>>>> 'defmacro' in a conditional code is mis-compiled somehow?
>>>
>>> I'm currently on holiday so I've only time to check the mails and reply
>>> when necessary.  I won't have time to look into this before next week
>>> *but*... if it's a macro issue it might be some missing require in the
>>> org code, we have seen this kind of issue is the most common.
>>>
>>> Is this org async compiled?  If so Kenneth have we verifed the emitted
>>> warnings?
>>>
>>> Thanks!
>>>
>>>   Andrea
>>
>> During async compile there are a couple of warnings emitted:
>>
>> In end of data:
>> org-macs.el:1463:29: Warning: the function ‘org-encode-time’ is not known to be defined.
>> org-macs.el:1361:10: Warning: the function ‘org-time-string-to-seconds’ is not known to be defined.
>
> Nice, those are clear markers of this issue.
>
>> However org-encode-time is earlier defined in org-macs.el (within 'if' statement).
>
> Okay, I can't read the code now but I guess should be easy to
> investigate why during async compilation this 'if' is not triggered.
>
>> Also interesting, if I touch org-macs.el and synchronously compile, I see no issue:
>
> This is because compiling synchronously the definition of those macros
> is most likely loaded and already present in the environment.
>
>   Andrea

Hello all,

closing this as I believe was a (I guess solved) org bug.

Happy to reopen if necessary.

Best Regards

  Andrea





  reply	other threads:[~2023-06-07 21:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-24 14:16 bug#56746: 29.0.50; Probable bug with native compilation Kenneth Stuart
2022-07-26  2:30 ` Eli Zaretskii
2022-07-26 16:48   ` Andrea Corallo
2022-07-26 19:39     ` Kenneth Stuart
2022-07-27  8:13       ` Andrea Corallo
2023-06-07 21:20         ` Andrea Corallo [this message]
2022-07-26  2:37 ` Ihor Radchenko

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yp1h6rj9dg1.fsf@fencepost.gnu.org \
    --to=acorallo@gnu.org \
    --cc=56746-done@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=eliz@gnu.org \
    --cc=kstuart@hotmail.co.uk \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.