[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2-v4] New: auto display inline images under subtree when `org
From: |
Christopher M. Miles |
Subject: |
Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'. |
Date: |
Sat, 08 Oct 2022 17:50:34 +0800 |
User-agent: |
mu4e 1.8.9; emacs 29.0.50 |
Ihor Radchenko <yantar92@gmail.com> writes:
> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>>> However, upon testing your patch, tests are still failing on my side.
>>> Can you please investigate?
>>
>> But If I use [M-x ert] to run the test
>> "test-org-fold/org-fold-display-inline-images" is passed.
>> Here is the steps:
>> 1. [M-x load-file RET /path/to/org-mode/testing/org-test.el RET]
>> 2. [C-M-x] to evaluate the target test
>> 3. [M-x ert RET test-org-fold/org-fold-display-inline-images RET] to run
>> this test
>>
>> I attached the uploaded screencast video link to prove it passed.
>>
>> https://share.cleanshot.com/tvUUoQ
>>
>> I tried many different other API functions to cycle or fold/unfold, but none
>> of them works under command "make test" or command
>> "make BTEST_RE="test-org-fold/org-fold-display-inline-images" test-dirty".
>>
>> I have nothing brain to think for this test now. Really can't figure out
>> why this image is not displayed as overlay. Can you help me to fix this test?
>
> The problem is with batch mode. `create-image' will return nil in batch
> mode and hence no overlays are ever created even though
> `org-display-inline-images' does get called.
I see, no wonder that failed for command "make test" but success in "[M-x ert]".
> I think that the best we can do in this situation is mocking
> `create-image' in batch mode to return non-nil using `cl-letf'.
I checked the `create-image' in image.el source code, don't know how to
mocking this. I have no experience and idea about this. I also searched
org testing. Have not found similar situations.
If you have idea how to write this test, I suggest pass this word to
you. What do you think?
--
[ stardiviner ]
I try to make every word tell the meaning that I want to express without
misunderstanding.
Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
signature.asc
Description: PGP signature
- Re: [PATCH 2-v3] New: auto display inline images under subtree when `org-cycle'., Christopher M. Miles, 2022/10/01
- Re: [PATCH 2-v3] New: auto display inline images under subtree when `org-cycle'., Ihor Radchenko, 2022/10/02
- Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'., Christopher M. Miles, 2022/10/03
- Message not available
- Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'., Ihor Radchenko, 2022/10/04
- Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'., Christopher M. Miles, 2022/10/04
- Message not available
- Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'., Ihor Radchenko, 2022/10/08
- Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'.,
Christopher M. Miles <=
- Message not available
- Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'., Ihor Radchenko, 2022/10/09
- Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'., Christopher M. Miles, 2022/10/10
- Message not available
- Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'., Christopher M. Miles, 2022/10/21
- Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'., Ihor Radchenko, 2022/10/23
- Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'., Christopher M. Miles, 2022/10/23
- Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'., Ihor Radchenko, 2022/10/25
- Re: [PATCH v3] New: auto display inline images under subtree when `org-cycle'., Christopher M. Miles, 2022/10/25
- Re: [PATCH v3] New: auto display inline images under subtree when `org-cycle'., Ihor Radchenko, 2022/10/26