From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iLf8CUpKQWNk7AAAbAwnHQ (envelope-from ) for ; Sat, 08 Oct 2022 12:00:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qCvNCUpKQWPBAAEAauVa8A (envelope-from ) for ; Sat, 08 Oct 2022 12:00:42 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C40961641A for ; Sat, 8 Oct 2022 12:00:41 +0200 (CEST) Received: from localhost ([::1]:49750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oh6dI-0005CA-QK for larch@yhetil.org; Sat, 08 Oct 2022 06:00:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oh6bl-0004aw-Mz for emacs-orgmode@gnu.org; Sat, 08 Oct 2022 05:59:01 -0400 Received: from [2409:8a28:603a:44b0:52d2:f5ff:fe16:c591] (port=58234 helo=Mac-mini.local) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oh6ba-0001pG-1r for emacs-orgmode@gnu.org; Sat, 08 Oct 2022 05:59:01 -0400 Received: by Mac-mini.local (Postfix, from userid 501) id 0EA0A674E63B; Sat, 8 Oct 2022 17:58:40 +0800 (CST) References: <631fe1c9.050a0220.3ab2b.3f52SMTPIN_ADDED_BROKEN@mx.google.com> <87bkrhwc42.fsf@localhost> <6322b0a8.050a0220.59bb8.6923SMTPIN_ADDED_BROKEN@mx.google.com> <87y1uluir1.fsf@localhost> <6322f5ad.c80a0220.5e936.823eSMTPIN_ADDED_BROKEN@mx.google.com> <878rmesf64.fsf@localhost> <6329c8b0.050a0220.412d.0a6cSMTPIN_ADDED_BROKEN@mx.google.com> <87tu51xivh.fsf@localhost> <633454e3.050a0220.7278b.1fa5SMTPIN_ADDED_BROKEN@mx.google.com> <87y1u298yn.fsf@localhost> <63353c69.370a0220.67788.e8a1SMTPIN_ADDED_BROKEN@mx.google.com> <87o7ux4khz.fsf@localhost> <6336a955.050a0220.4e72e.2b23SMTPIN_ADDED_BROKEN@mx.google.com> <87bkqw2pzc.fsf@localhost> <63380f57.370a0220.a9d9a.dee8SMTPIN_ADDED_BROKEN@mx.google.com> <878rlxzj5i.fsf@localhost> <633a67d8.050a0220.733e8.e57dSMTPIN_ADDED_BROKEN@mx.google.com> <87sfk4urvz.fsf@localhost> <633be6d3.370a0220.4060.bacdSMTPIN_ADDED_BROKEN@mx.google.com> <87edvikayo.fsf@localhost> User-agent: mu4e 1.8.9; emacs 29.0.50 From: "Christopher M. Miles" To: Ihor Radchenko Cc: "Christopher M. Miles" , emacs-orgmode@gnu.org Subject: Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'. Date: Sat, 08 Oct 2022 17:50:34 +0800 In-reply-to: <87edvikayo.fsf@localhost> Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2409:8a28:603a:44b0:52d2:f5ff:fe16:c591 (deferred) Received-SPF: softfail client-ip=2409:8a28:603a:44b0:52d2:f5ff:fe16:c591; envelope-from=numbchild@gmail.com; helo=Mac-mini.local X-Spam_score_int: 25 X-Spam_score: 2.5 X-Spam_bar: ++ X-Spam_report: (2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, MSGID_MULTIPLE_AT=1, NML_ADSP_CUSTOM_MED=0.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, SPOOFED_FREEMAIL_NO_RDNS=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: numbchild@gmail.com Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665223241; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=PujSQ5mFOb7h/9FyveQ0PIu4EXNUauyw8R0GJDxQ6Go=; b=U2L5w/DBxcCG8kmgSWZZznBuqhXaOYO94c93Fr49iMAV3MwlnCCmt/Usu49NDzMTo5y0Xq bAHYuy6a0cMSYJi497m3ot/nvQ4hE6rDI9sTjlprUDBKp6JPlBd+odQbbHaE8KW6drIbzS r/25GboLCA1PvnIvP65oysNoREPQv0F5gleftghhsQntjPp1vdQVPnQx+Gh1v9ZRMJNV4h SxsABcsBCag0iCYsOoSjFmqzNr0B6vG4v7vCH7DGovEc07yxa7LpKnl1E0M5PDCyMTtqAU Rpb2hOYDM0nVITVXRhv4YfCEcdy8AvaxgA64uTyUqKLWfgTPKwhAYjKYICnhpg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665223241; a=rsa-sha256; cv=none; b=S1Yw7qsR4HjSahl7f7gNm7LdsW+R7TUTwncfEAuBARiZDXWvpmSYmmPSZv3p+u8RX06+Xo 6P2fsJn6/sFX58r91wIlu23TcUAS1mJQDz3GA6SdFGx5z0PNgyVm56Sh5Pq8PMOauN7g46 90hMNV146yjJk07EfHSApM+o0BFasdSPXA/mCRxbQKS5HvjVZy+JnlK/UI316HWfCQkAvt B1KvO5eu6YgCyBi7nS3Ll045UOLRbOfBypVYQQomLevPOji24xe8ZGzPAm2vR23E+CvZb4 /Rqvmb5MYQXoMLf+E8eKm73ewNg7GF70djM+lN6DLUC4Ov5yX4PMsQL8rIxiZg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 0.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C40961641A X-Spam-Score: 0.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: +AsYY8wxSh3s --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Ihor Radchenko writes: > "Christopher M. Miles" 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-i= nline-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=3D"test-org-fold/org-fold-display-inline-images" test-dir= ty". >> >> 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 e= rt]". > 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? =2D-=20 [ stardiviner ] I try to make every word tell the meaning that I want to express without mi= sunderstanding. Blog: https://stardiviner.github.io/ IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAmNBSc0ACgkQG13xyVro msPCRQf+O8RfikcLYUQZ2X1irlVkMfi4b9dhH2SKQhA1FqJxVSfk3G/uyc0Cueg7 zuEmCIkhZF3fPTs3IWbtHKiCelLPK0eGhNjDRpBagt5zW2/MnLifVnnuix6bVkF5 2XSLhKn2tVdSrZt5/Ld2M3SkI73PEImHpiQDssR6hBVYtqQuo5JGyMMb3mhTCiSI Gcvl11nhW49nVlUsJw2aOa+ZhP3sDyy+gWh6qbo4iur2MuvsPXiJfWbXfQQQBmMb rawII1ViQ89MYRogVO0YTOQwGCoUYKCmyu1Uhw/TrN1/cF2T46e3yE8liLISSO3W YWa2jGHlj/wlNlxpLpqxSFwTRe0ypw== =EIgX -----END PGP SIGNATURE----- --=-=-=--