[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: |
Sun, 09 Oct 2022 15:21:27 +0800 |
"Christopher M. Miles" <numbchild@gmail.com> writes:
>> 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?
I imagine something like
;; Mock `create-image' to work noninteractively.
(cl-letf (((symbol-function 'create-image)
(lambda (&rest _)
`(image :type "dummy" :data "dummy"))))
<your test code here>)
--
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>
- 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, 2022/10/08
- Message not available
- Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'.,
Ihor Radchenko <=
- 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