Morgan Smith <[email protected]> writes:

>>> +  (with-suppressed-warnings ((suspicious eq))
>>> +    (should-not
>>> +     (eq '("text") (org-element-copy '("text")))))
>>>    ;; Do not alter the source.
>>>    (org-test-with-temp-text "*bold*"
>>>      (let* ((source (org-element-context))
>>
>> This looks like a valid warning. Can change to equal I think.
>
> We do use equal in the line right above my changes.  This test is
> ensuring the string gets copied.  So it makes sure the strings are
> "equal" but not "eq".

You are indeed right.

>>> * testing/org-test.el (org-test-at-time): Advise time functions with
>>> `add-function' instead of directly setting the functions with
>>> `cl-letf'.
>>
>> This looks clunky. I suspect that invalid read syntax errors might be
>> originating from ,at instances when AT is a string with properties that
>> contain some metadata that includes unreadable objects like buffers.
>> If my suspicion is correct, as simpler way to avoid runtime errors is
>> simply stripping AT from text properties. They are not needed anyway.
>
> Unfortunately, it's not that simple.  The error stems from the
> ",(symbol-function 'current-time-string)" part which emits bytecode that
> includes "#<subr current-time-string>".  I don't think we are supposed
> to use raw references to C source code functions in our code.  By
> applying the diff shown below, the errors go away even though the
> references to ",at" remain the same.  The included diff stores all the
> original functions in a dedicated obarray.

I see. I have no better ideas how to fix self-reference to subr then.

Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=de998dfe8
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=c8dcd11e3
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=51a9eb17c
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=c318ddd0c
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=6548ca99d
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=821e898fe
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=67c5c4c1e
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=fe51304a1
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=400e312d4
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=88c3c7d7f
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2a0d5860e
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=15143601b
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5cb67a630

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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>

Reply via email to