From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 uAefMgTEKmPhAQEAbAwnHQ (envelope-from ) for ; Wed, 21 Sep 2022 09:57:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mCZ4MgTEKmOUQQEAauVa8A (envelope-from ) for ; Wed, 21 Sep 2022 09:57:56 +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 509D017C8A for ; Wed, 21 Sep 2022 09:57:56 +0200 (CEST) Received: from localhost ([::1]:42676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaucE-0007W9-So for larch@yhetil.org; Wed, 21 Sep 2022 03:57:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oauY4-0005NP-JS for emacs-orgmode@gnu.org; Wed, 21 Sep 2022 03:53:42 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:42530) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oauY3-0000lb-0U for emacs-orgmode@gnu.org; Wed, 21 Sep 2022 03:53:36 -0400 Received: by mail-pl1-x62b.google.com with SMTP id v1so4826676plo.9 for ; Wed, 21 Sep 2022 00:53:34 -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; bh=DKu7zE4ucEg8a9+VI+VbLaLVVmn2LcwK16xPu5si/h4=; b=huyAq2He3vqFRd3skXFeFUhbNx2GFhdG+VfnZjbmxxDJzR4lfbNWP+gOSaCi0m7aE2 nnEEViK/7muLzylj8X7v06cxU+5sZA377XVSTfAYviro59KkfNzLl4lVt0TUrH+Bnmb4 8TV3Dz2pPZIZ7WpxpjP0Pb8lIqCvdgt2QI+BsCcnfRz8peHEW3mt415+MONDpgXf+Evy Fux91hIYFrV48moAWcQeRsqIqBVIiRAZ0w+Xe8HTiW3+kING8+xS9v2dIhl0UI5zB3Nv Hc4olh+0mQVEXuVUb/ho69G9Ucd8FIGwSeFvSt7vawW+L1sjst4fzSEIMSB6XJ4t1Ib1 8Yzg== 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; bh=DKu7zE4ucEg8a9+VI+VbLaLVVmn2LcwK16xPu5si/h4=; b=PA3Ix1Rt/rAvqantfzwFf8qw+idT6c2eP+xk+NB2vEd/vshnTw2h1d9aY8dlyVYlkV kLCEi1zQiEbbnh8n75ugXBD/1q+0zMaW87Q6y/tyc9T7kOozrdKre32m5YyQA+DIcB7s sKhh8Y1i8mTnhE+7EEMbGV6CV3iRw07cUhqAsaGzGp9utgW55UXUrX4dMLa2wYzJXRRs 3DhlCVDns22ynrfB3ODvVj54GTS4nFyWsiUIh8cMoSCHaQkfIyS7WLVoqQwr4WB3z5lm X5RQa3u4u7FdPGW8nlp/1toXz192y3YMEnVzTRNSgE+D45+cQ6umQx5G7Qy3c3V3bTGr i/+w== X-Gm-Message-State: ACrzQf2+gznY5A7BXUpdtvi4pySvwTgLBbbqPciX59eDvFg5NZrBK1bZ QE5Du770PBrNGBIYpJgtKAw= X-Google-Smtp-Source: AMsMyM72xBKEQRdjf7Bq6jmPy3xThOni7CgN++U24FLvsup/Vsc7czAqvROKNLj3cUOd1yJdc1YSCw== X-Received: by 2002:a17:90b:4d92:b0:202:f200:a3c9 with SMTP id oj18-20020a17090b4d9200b00202f200a3c9mr8185335pjb.4.1663746813420; Wed, 21 Sep 2022 00:53:33 -0700 (PDT) Received: from localhost ([1.83.154.224]) by smtp.gmail.com with ESMTPSA id f126-20020a623884000000b0052e987c64efsm1392996pfa.174.2022.09.21.00.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 00:53:32 -0700 (PDT) From: Ihor Radchenko To: "Christopher M. Miles" Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH v6] New: auto display inline images under subtree when `org-cycle'. In-Reply-To: <6329c8b0.050a0220.412d.0a6cSMTPIN_ADDED_BROKEN@mx.google.com> References: <631d472b.c80a0220.2b4b2.bf86SMTPIN_ADDED_BROKEN@mx.google.com> <87h71ew0m0.fsf@localhost> <631e92ee.050a0220.f9c18.92f5SMTPIN_ADDED_BROKEN@mx.google.com> <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> Date: Wed, 21 Sep 2022 15:54:26 +0800 Message-ID: <87tu51xivh.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=yantar92@gmail.com; helo=mail-pl1-x62b.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-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663747076; 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=DKu7zE4ucEg8a9+VI+VbLaLVVmn2LcwK16xPu5si/h4=; b=r+8BtmNgJZ27w+Cn7KS0vd8C19bvMUocwzkKo9BAp4NHNrTIj+5aVKT23vwMTLPmYwUlKd xeo1Vd30LQigCZlxwrlQvg4PX3+gq5dci5jczeVCtdCc+SmBkWVYx3cjWqSfFATeV8rxCz xnSqxGGlQfH7jTBG8+FR5/rRxc791GJk3SdRunBYD20uBpo1oePpb7G6H4a5+9iwNxCsYN 33CHNmu1VxuVpsJCyli9DmY0yZDIh02h/8PD3yYNY9Y/3hq1ZB9EI9sk3MMEETQDyrhzC7 +PueppLNvV6bFn5r8kzHBA6GhNMRL3VU7DiX54gNNxFG6kNFUVKM+bWQ69BzAg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663747076; a=rsa-sha256; cv=none; b=b7oK8YlOBGexrWMGgwYjlx8lFpLDngRXKe7oeigMZLwWZbdmDkFQ+TAIqcDpqMu0stuNW7 mxTyvSWukGd7fZ6u3MtOB/lVWu4GzBmSS2EO60zPOt3ruVliCzxWWvg87uDFz7/DuxjPVK xVhgb2AZy0I/1AKiWej8fBaeW2p40X10EEFbcuag5xr+YQIyMhZvK5ICYOaUauJS4MCpSc Np6zNizJmNibQd6TJ0NZXDh3zeRqOcoyHPd7a2qrQs3X8hn1A3twte7zPkANQy+LQ0Jg4H o+uQ2fJR5pBaD/C5ce3U0AKjiWGWHvMBH+zErgimpELkwnTeONAmh/I+5n0Szw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=huyAq2He; 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: -8.84 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=huyAq2He; 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: 509D017C8A X-Spam-Score: -8.84 X-Migadu-Scanner: scn0.migadu.com X-TUID: lhT3gbuI9Uv5 "Christopher M. Miles" writes: > I checked out your patch, it's fine to me. Should be fine to apply. Done. Applied onto main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=95df82c5fcf926088da2aaab9354a902956ae881 Going back to cycling inline image visibility now. I think that the first step should be extending `org-remove-inline-images' and `org-display-inline-images' to work on regions. `org-display-inline-images' already provides BEG and END optional arguments, but it currently clears all the images in buffer unconditionally. We will need to make `org-remove-inline-images' work on region and modify `org-display-inline-images' to not affect images outside the provided region. Then, we can modify `org-toggle-inline-images' accordingly and make use of it in org-cycle.el to toggle images in section/subtree. -- Ihor Radchenko, 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