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: 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>



reply via email to

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