From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id wHS2I7u8yGRZvgAASxT56A (envelope-from ) for ; Tue, 01 Aug 2023 10:05:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id uBa4I7u8yGTLBwEA9RJhRA (envelope-from ) for ; Tue, 01 Aug 2023 10:05: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 940494F928 for ; Tue, 1 Aug 2023 10:05:14 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="FY5n8/C4"; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690877114; 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=aQ5f8wma8XoSJvm8tB/fMNbLui9kJ0/zPIZXS/otzi0=; b=ljyuzb/epKNCI3SB/idvUukXKhVtuQPRvqipsjab0Lda5YsYihL9fHJjTf80kQsOjAYb3D T7AG1DFxBFBit7lhGvj23a2/WieE6oJEt40iFtri89fNIC5vlG5fTRCY8f0cE8iU1PkEcJ WQMUqd6K1zeTESDTDKk8BdflShjyf2ezaigLIEzMPUjZIaTcqJSXeRVMkFAYyqByeJjpki x8n/Xzyf4TbpSLucL88SjmLtyDQxaiWMDHvEMLoYQNrLuZK7yUN1TCUdV1rvqV8rLTjUmQ pOKBFM+ceJXArFxV/Sx4IejJTVumh36mpesi+SqoIPRPr2Eii+Fd+CkpkLLQpQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="FY5n8/C4"; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1690877114; a=rsa-sha256; cv=none; b=TtEesxKjOM94kFf0aVx5jHfUrC2hFD3pJzfpCsrwxtNGPJ8wolxHPiOjME1O/bY09I+Y/v Q3APooW6zZ14xz6UkPLhUU4rI/AFs3tN63dhfq/ijISvYG1/6Bwd+nwTeq9bDq5ZuBYtbm fZPR1MrkfAXuG5UyNdgqvQI/fuzZwbr67jcjKikaqFhiAtWsMBPmm3u21QFsCFjCfpDPRk TD9Z2nCq2nqkIRnYCIabRApyIeUv8uySZSv0Sc8cLkueC6xdqKaSkzwBPGs6ZigEm4IVG7 GrgAoXnqkCjB7TQygRgZNzhHu0ORt7sXaU1b8q/aZLiVPIfKRW8BQJ924YzD1g== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQkMg-0006xo-IR; Tue, 01 Aug 2023 04:04:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQkMb-0006xZ-4h for emacs-orgmode@gnu.org; Tue, 01 Aug 2023 04:04:17 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQkMY-00073Y-DQ for emacs-orgmode@gnu.org; Tue, 01 Aug 2023 04:04:16 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1F40424010A for ; Tue, 1 Aug 2023 10:04:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1690877052; bh=SolDeZc+rn66XqS/LhI9L9FnZpZ2DLTvlr3fI0CYilE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=FY5n8/C4fvOkkxcHV7XdW8SR4c6ye69swE2mnQBSAVDKm/gyauAIjAGIYnQLFvY1a yLRwlMFJ7yvup43P4lK9owpz6TuRGWVntABRm/10aC85HDs8mINVKIqO2dOyiIGuqZ vOyRxJwxUArNoP12wJkFlHF0QT7X0jTQmVzL5nkMdhtVtQ5Mg35dt42W8zxJ+7Vf64 he75lE5bbbNzk0UUe6uhFyLrwuqloiBVCqq9BW3m9SgriTpd/I72pg6Zk43bQwD2qc 5ONZTkhhdS8J42pE77DGYkBK14/XtpCk8l5Wti2xOa+Xc8z26pGdjYJ/F3I3hUGv1z UIh5NSptna8mw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RFSLC1cmgz9s7Z; Tue, 1 Aug 2023 10:04:03 +0200 (CEST) From: Ihor Radchenko To: "Christopher M. Miles" Cc: Org mode Subject: Re: [PATCH v3] Re: [PATCH] add a function to only refresh inline images under current headline instead of global buffer In-Reply-To: <64c8a313.a70a0220.93ee0.14fb@mx.google.com> References: <6461a84b.a70a0220.b6d36.5d00@mx.google.com> <87sfbxhmxe.fsf@localhost> <64623c09.170a0220.52bf9.9437@mx.google.com> <87y1lo4ou1.fsf@localhost> <646379fc.620a0220.c0ae4.9fb2@mx.google.com> <87zg3l1rgb.fsf@localhost> <64c8a313.a70a0220.93ee0.14fb@mx.google.com> Date: Tue, 01 Aug 2023 08:04:18 +0000 Message-ID: <87il9zgpdp.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: -7.31 X-Spam-Score: -7.31 X-Migadu-Queue-Id: 940494F928 X-TUID: TzBzaX9+3CNf "Christopher M. Miles" writes: >> This is not a toggle. This is unconditional refresh. >> > Yes, indeed it's a unconditional refresh. It does not match the meaning of word "toggle". > > Seems need to detect whether has image overlays in region. I added this > detection in new patch. Like bellowing: > > #+begin_src emacs-lisp > ... > ((use-region-p) > (if (seq-contains-p > (mapcar > (lambda (ov) > (plist-get (overlay-properties ov) 'org-image-overlay)) > (overlays-in beg end)) > t) You can just use `org--inline-image-overlays'. >> And there is no clean way to allow INCLUDE-LINKED while keeping >> consistency with latex preview commands. > > About the INCLUDE-LINKED argument, I don't know how to process it. In > theory, it should be handled by function org-display-inline-images > instead of org-toggle-inline-images. If you have improvements on it, can > you add code on my patch? The problem here is backwards compatibility. `org-toggle-inline-images' is bound to C-c C-x C-v and people may be used to C-u C-c C-x C-v displaying linked images like [[https://orgmode.org/resources/img/org-mode-unicorn.svg][description]] I will need to think more how to approach this. >> What we might do here is making a new defcustom that will control >> whether linked images should be displayed. Then, something like C-1 >> org-toggle-inline-images could toggle that defcustom and refresh all the >> image previews in buffer (if any). >> >> WDYT? > > Refreshing all image previews in buffer is same as old behavior. Sure. But the idea of this specific C-1 prefix argument is to toggle the hypothetical defcustom `org-inline-images-include-linked'. If we flip it we may need to remove/add linked image previews or otherwise risk users being confused by the defcustom not taking effect. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at