From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id mEO0AYt2QmP5HgEAbAwnHQ (envelope-from ) for ; Sun, 09 Oct 2022 09:21:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id mO7cAIt2QmM4SAEAG6o9tA (envelope-from ) for ; Sun, 09 Oct 2022 09:21:47 +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 AEA6D20B90 for ; Sun, 9 Oct 2022 09:21:46 +0200 (CEST) Received: from localhost ([::1]:41834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohQd7-0007xj-Tm for larch@yhetil.org; Sun, 09 Oct 2022 03:21:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohQcC-0007wj-FV for emacs-orgmode@gnu.org; Sun, 09 Oct 2022 03:20:49 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:39447) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ohQc7-0002cF-WC for emacs-orgmode@gnu.org; Sun, 09 Oct 2022 03:20:48 -0400 Received: by mail-pj1-x1033.google.com with SMTP id v10-20020a17090a634a00b00205e48cf845so10639875pjs.4 for ; Sun, 09 Oct 2022 00:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=2WgaRHk3JM2af0y1XsL1XnUiowh+hN7upSdyj0REz6I=; b=c68eR0xWhrNIP+KelJp6lwcr+JNvQA4+cLgRvkwim7hxKhcW66Wydrd2ili3Tsdlnk WBaRmd2piJAfqk28iPP8me/MDdgT8cefttKLAc1gWBHrqhnDPtQ0yNmEjr3dfw1bOPOL ee/shAl6JVAGigOTSMuk2HkRbXtXi0l0zKtHwcmT4Dtnwo678cXggveO6y1fFSI8GFzV ZwUr9DM5SF4trLj8Q7OgO1pDqo4LbNQb+TEwaLdMEk2bMMebINbdsGaOzkyk4+QAphZ/ IDvzbzb9aLS1niYd5B18pCBUAEoWEK4NQEumz35UKygEzQ5lTDGCRDt1Umy50Y1PUJDU OMDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2WgaRHk3JM2af0y1XsL1XnUiowh+hN7upSdyj0REz6I=; b=6GCIe8OHzFM/ow1odMwEMpMP5jU6FsI9YLsN16tECGoExN2EsQlRVS+vkAjDy9s35m 3SaNhzFPgjkD11WZ0suVDvpYDYKNQ3dGpYbUCMqCYBlzpBeMYk5CJxHmeWofeqZWu8S4 QCCqcipkjD+rZq287bIRvp2E+WR/OqvHBXf5wSfG5iSVi9RWrpk6CRoIiMLHiQ4p8Dnr ssM9iJoLbtqyrzsy95hoFyWvc1IFsM2MePrUiP0uzFl6rAS2U73S7T/HWI6qXehxY8aO SH+ax7iNFtlHBnIHW4EgHlMYxFaaDWeJc690HslG6EHeH4PoZ+5k6F1bvpwIOI/ecBs4 /8hw== X-Gm-Message-State: ACrzQf15RT41lJ/cSn1YMIRPGn2DH9BeeSIo9OJBVrHjbaEALtkFMMo/ tk2T1YD4bqdXnekkzWD/dko= X-Google-Smtp-Source: AMsMyM6vFaSAB5d53H1ESn590PL2ls420Oy7WE8tu59hRFTXDw/ltYznNlpI1ChG7z07FuwLluMxkw== X-Received: by 2002:a17:902:820a:b0:178:456e:138 with SMTP id x10-20020a170902820a00b00178456e0138mr13430052pln.145.1665300042465; Sun, 09 Oct 2022 00:20:42 -0700 (PDT) Received: from localhost ([2409:8970:af2:32f:6c23:3ad5:f37d:541b]) by smtp.gmail.com with ESMTPSA id e65-20020a621e44000000b0056170e7299csm4479223pfe.9.2022.10.09.00.20.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Oct 2022 00:20:41 -0700 (PDT) From: Ihor Radchenko To: "Christopher M. Miles" Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'. In-Reply-To: <634149f4.c80a0220.1376.e564SMTPIN_ADDED_BROKEN@mx.google.com> References: <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> <634149f4.c80a0220.1376.e564SMTPIN_ADDED_BROKEN@mx.google.com> Date: Sun, 09 Oct 2022 15:21:27 +0800 Message-ID: <87h70dea2w.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1033.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , 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=1665300106; h=from:from:sender:sender: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:dkim-signature; bh=2WgaRHk3JM2af0y1XsL1XnUiowh+hN7upSdyj0REz6I=; b=E8w2fwIVSLQJc88i09Ki/qeiqpJCs0LfXvi2y9cv6bW3aS/IeNdLNnzl4U6TBv6atPELoa +i7XJ/E59+lGWcs6VR2ELApoS7h1b1cjtX9llwKVeeDJfszn73+OHKXMCXNziOSot1KcHE npRiStkniWViuk3U9IQSW2kWwg65dyFz18Tpn0MLuXJLVl5azokng+ZzkLhmPnaglWFRUo GO1OJtFbDRS5VcC7/h5q4Ch/bY7BkmLQjy97orSu5RYmMAT1drfIvqhJPLuQXFe+FlfQHs P7wOBCSw288OX6ZqpWwWCRUMU8ymXd5h1yPEJHMpZkXeMqx+yKvnZLt0kiYYuw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665300106; a=rsa-sha256; cv=none; b=EDFAnP5oY2eA14NjozALgIiNV91dJdgQSsV/JMr8YyACoQjIi284YDY/dPp6KCgpBSXmjv TDDAaZsGAUc3gIUJjTqSKDEiz5P//MA96lOJgTW6/T9KOJISj+DdtAUFpY/82wGhDsTHQD s02cZ6paYHG61OVBtOrFckQGra+VuuFN5yIYgQhUUCL1vPVSxMcwrEHK4RZ14Blj2akf0x MarrMoxSTq8q5shJJQldbzUoME+Xjsp6vWXLt55uWoxMKdiSDX64NTqjl42Hq0iQzlz1he djsVTU54D4CVP56KJoFUFIMnYyPuCSN7YE1cBNOmZkDaBJUC9cdMz2buQNaRcg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=c68eR0xW; dmarc=pass (policy=none) header.from=gmail.com; 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: -1.89 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=c68eR0xW; dmarc=pass (policy=none) header.from=gmail.com; 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: AEA6D20B90 X-Spam-Score: -1.89 X-Migadu-Scanner: scn1.migadu.com X-TUID: KqNUVEiDhZi+ "Christopher M. Miles" 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")))) ) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at