emacs-orgmode
[Top][All Lists]
Advanced

[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: Ihor Radchenko
Subject: Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'.
Date: Sat, 08 Oct 2022 15:53:35 +0800

"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 think that the best we can do in this situation is mocking
`create-image' in batch mode to return non-nil using `cl-letf'.

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]