From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2IA8KZfnO2NbEAEAbAwnHQ (envelope-from ) for ; Tue, 04 Oct 2022 09:58:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id aN5tKJfnO2Pk4QAAG6o9tA (envelope-from ) for ; Tue, 04 Oct 2022 09:58:15 +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 275BC9E21 for ; Tue, 4 Oct 2022 09:58:15 +0200 (CEST) Received: from localhost ([::1]:40460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofcog-0007y6-44 for larch@yhetil.org; Tue, 04 Oct 2022 03:58:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofcWN-0001In-2H for emacs-orgmode@gnu.org; Tue, 04 Oct 2022 03:39:19 -0400 Received: from [39.171.214.39] (port=19861 helo=Mac-mini.local) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofcWK-0003aZ-T7 for emacs-orgmode@gnu.org; Tue, 04 Oct 2022 03:39:18 -0400 Received: by Mac-mini.local (Postfix, from userid 501) id 43F0966CE929; Tue, 4 Oct 2022 15:39:09 +0800 (CST) References: <87y1uovp9w.fsf@localhost> <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> 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: Tue, 04 Oct 2022 15:27:11 +0800 In-reply-to: <87sfk4urvz.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 39.171.214.39 (deferred) Received-SPF: softfail client-ip=39.171.214.39; envelope-from=numbchild@gmail.com; helo=Mac-mini.local X-Spam_score_int: 58 X-Spam_score: 5.8 X-Spam_bar: +++++ X-Spam_report: (5.8 / 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, RCVD_IN_PBL=3.335, 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: reject 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=1664870295; 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=KA3URoAJFn0144WMDU+bG3tCm/VSe+BwPUdc48Yai2c=; b=VQdewSgt5QHD6v0odgnmgdV0YcnKIVAAh/vhtYyfRvzYm2sBHJT5Ib4l1TbcHy2yuyYawa kyIdFQhtkB3+lEyBhSmRCQQdDAtqVDjf1p5suoekt/EhZetY2Yd38lV+4jpodi10e6L7oa XMaV5BAr8+VQSky1g8jP/+32xXcYW47NAUJR+rqh/IvDuOYhXL90zQmraPyFYWwWgGKmPT 3Fr6hyW+4Xy+m6LRESkco0oYTKnpQPbLrAdjCn/OGbAvS8uCgyf2QgwZWLcoUqNZ6ezoBC YUeiiZlGfZmzwn7qeHUit7rOpdziNMB1K+2Qu9hPe4xoVALiakS9lGIV4XcxZw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664870295; a=rsa-sha256; cv=none; b=fXUi3Wc51M94GEIqn9hoJYxON4x8PNQKbnhs7Lxje3fuQ3sMZC1vtL9p1RTvNuWi5NI4iA AjWmjwnmbgdOAxET8rIm4idYHw4gZkPCLr/wJ2z5LZu/PByXQKiXd4aaWsahSa6gRNCmrk rkv/nndTHIJjzmaMRKsPga8rc/OiS+0VkgB4vZb0dNhOVpor587gXJBe35+QA2kkZxokAx I9eW2vbXEeSRC3rJSrxCAZueSZxbh9xPL2KLufaucMelMQxDiLo95LFMEnXWB7k0aS7lhj yI5DsGO0S4dg6cv31aSMvJHOgyiw2lvQhW72NRIydHWnE0D8DntJJ/gqUh4cvw== 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: 2.74 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: 275BC9E21 X-Spam-Score: 2.74 X-Migadu-Scanner: scn0.migadu.com X-TUID: B6Ya/75L+cMu --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> I think the patch is finished. Please review, Ihor. Thanks for helping. > > Thanks for the update! > I have cleaned the manual and ORG-NEWS wordings. > > Upon reading the exported version of the manual, I realized that the > part in 2.2.1 Global and local cycling section sounds very awkward and > that we do not mention other cycle hooks like hiding archived > subtrees there. So, I decided to remove it. > > I also rewrote the other part in a bit more direct tone and moved the > index entry. > > (In general, it is useful to try reading the exported version of the > manual with the additions to check if things are still coherent - manual > is not just a collection of independent statements; we need to make sure > that it is not confusing the new readers). > > I also updated the commit message adding the CHANGELOG entries about the > manual and ORG-NEWS. > It's OK. > I am attaching the updated version of the patch with my amendments. Applied your updated patch. > 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-inli= ne-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 th= is 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-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 tes= t? #+begin_src emacs-lisp (ert-deftest test-org-fold/org-fold-display-inline-images () "Test inline images displaying when cycling." (let* ((org-cycle-inline-images-display t) (images-dir (expand-file-name "examples/images/" org-test-dir)) (org-logo-image (expand-file-name "Org mode logo mono-color.png" i= mages-dir))) ;; `org-cycle' -(state)-> `'children' display child inline images. (org-test-with-temp-text (format "* Heading 1 [[file:%s]] " org-logo-image) (org-overview) (org-cycle) ;; (org-cycle-internal-local) ;; (run-hook-with-args 'org-cycle-hook 'children) ;; (org-cycle-display-inline-images 'children) (org-next-link) ;; (should org-inline-image-overlays) (should (overlays-at (point))) (org-toggle-inline-images) (should-not (overlays-at (point)))) =20=20=20=20 ;; `org-cycle' -(state)-> `'subtree' display subtrees inline images. (org-test-with-temp-text (format "* Heading 1 [[file:%s]] ** Subheading 1 [[file:%s]] ** Subheading 2 [[file:%s]]" org-logo-image org-logo-image org-logo-image) (org-overview) (org-cycle) (org-cycle) ;; (org-cycle-internal-global) ;; (run-hook-with-args 'org-cycle-hook 'subtree) (org-next-link) (org-next-link) ;; (should org-inline-image-overlays) (should (overlays-at (point))) (org-toggle-inline-images) (should-not (overlays-at (point)))) =20=20=20=20 ;; `org-cycle' -(state)-> `'folded' remove inline image overlays. (org-test-with-temp-text (format "* Heading 1 [[file:%s]] ** Subheading 1 [[file:%s]] ** Subheading 2 [[file:%s]]" org-logo-image org-logo-image org-logo-image) (org-overview) (org-show-subtree) (org-fold-subtree t) (run-hook-with-args 'org-cycle-hook 'folded) (should (null org-inline-image-overlays)) (should (null (overlays-in (point-min) (point-max)))) (org-show-subtree) (should-not org-inline-image-overlays) (should-not (overlays-in (point-min) (point-max)))))) #+end_src =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----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAmM74xkACgkQG13xyVro msN3swgAzELiu4DvpXzCNY70ne2gbm6iMTORMxO5qWwecMS9gsL3dX3JjuFGzPwF gErUDjVP9ZBVqZ0j1c4Jf/V3pdGjdt5mqx9mrhD0DhV/IZ+BaiPe4s3u6J4CCtKs MGhyQaMqtQbiGwsgsnMcm9nt9vmsPo7UOaYFjIP9j47KIfLLaO3zedtBptke8jCU 9G0RoCeUKkR4NgDz11Gd8iyOfYHunYhfphmhedw8UNsc6t3JJ+wZjaKUClgJLVi7 UPiqNHbnAWBHAk/sc/AUSW5g/HvKh8lyEt5QTFcxEgZNUXolaG9tfPTLrxHKCFxd Lg/iNb30+XhP2t4jno3n6rooByozlA== =u2jg -----END PGP SIGNATURE----- --=-=-=--