From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id KOxpHfG5xGYCxgAAe85BDQ:P1 (envelope-from ) for ; Tue, 20 Aug 2024 15:44:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id KOxpHfG5xGYCxgAAe85BDQ (envelope-from ) for ; Tue, 20 Aug 2024 17:44:49 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="ZKb741b/"; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1724168689; 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=rGiFhU3BSJ43nf+C/tpXPXUe9RBfsrEZIWnVvzP9Vx0=; b=WDUsCOSigLQbW4hWV0ams6wT5/hZ84t3RWik13xwtdYaUJ2+rucQsnUQeFwP7xuJdAE67r 4MbnRRpqsVwOVLAH34RIdLpuBygYrE8PK+rlbi6CGmL8VhC+IUTkU03ZvOyDynw24en9ec jWexAgKRB3/7N12po5t41Cf3iBCIZ6BinbGGObDXAsNH3yV1Vaghhub+SOc18qkvaTAMk8 wpg4eEybPNpmfW3A54DAOSS8ErF7z0rdXHm4dzS1GC4FB0CeZHsm6RMTg9/yNqqFMRniD1 p1SEqY3st21ihXU+l1ZIcnUODneKZL/Rx27somxyDG97VC/BdjQEYmFw+BDMEQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="ZKb741b/"; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1724168689; a=rsa-sha256; cv=none; b=Vh+kKD1Bd/oTmzBblSr0HV5LGnPAm7cyvff0b2/oMzOTkjVj4/9DQd0iSIq5Zk6D0999qk ucMkM6lQk2aFkdhrmcDd6k6ouDKWbDsCJd54aMajxNDPu3PcqHCSUtStehOTAArvm4U2Vx lYG8rFxqEvUJGL6TAToB+LeLUMJZiKRGKR1YmXw6cycGPVCj5zbgglDK2aSomFWy2x2x5E 6y7rwRPhziG5hIq9avOkcUC6VKzF+zBX21NC7/5qFxopGdPLMSe+STe0sw3UAN9G7xCu2v q7Hoeu619zNnk9ruSrwwgAq6BdQGWLrVq5wlF9wvA/pCoJOmcWE5X5mNixGhdw== 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 4DBCF72EF2 for ; Tue, 20 Aug 2024 17:44:49 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgR1O-0002OK-5Q; Tue, 20 Aug 2024 11:43:46 -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 1sgR1M-0002OB-OV for emacs-orgmode@gnu.org; Tue, 20 Aug 2024 11:43:44 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgR1K-0004wH-Vq for emacs-orgmode@gnu.org; Tue, 20 Aug 2024 11:43:44 -0400 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-7c3d8f260easo3433014a12.1 for ; Tue, 20 Aug 2024 08:43:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724168621; x=1724773421; darn=gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=rGiFhU3BSJ43nf+C/tpXPXUe9RBfsrEZIWnVvzP9Vx0=; b=ZKb741b/MSpDDBEFaYyimn/dfrwQYYP1GNWnjL/cRQw0Nk+AcwK/I02Zx6W7NQCZq0 VEMdjZsFKDD3AOIt8BFdai0f/wIAsXV2K4uirHLoTw37NBBKOaZEhbGbt4CoYjprztQf JP/yBjVHzMXpbvhMk1HTxmTk9GVZLSiRhGI+4pxH8p+0b3reEUOAtPgFUz1WXSqx9lo3 8S8ZuxaCGNEokzCE3rPVq5MMpSV1sjp9w3UoysL6w4MqWlX1+G3fJKcOJRPJ2JxkrW6o amp71r0bftmp1o8ONy4c9wQcx4p7Typ/7wCObpDvC44tRBdmIpRrvV84/aoacbzaSDtb 8cpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724168621; x=1724773421; 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=rGiFhU3BSJ43nf+C/tpXPXUe9RBfsrEZIWnVvzP9Vx0=; b=CwArKfbvFJbnSUCG/oSwatAlTHT1Maa2r2fY/MqEd4T3yRrozaKgH64a7RkJSaEFkf 6I4GRHi9DjYFh+c92B6Yg8XPAzyxCFvxEb8WZdz8CIelkXQInvziRJ0CmtDUJGaXBXBZ saO6c2KV1JzIALkwisogpHKgLxq92zkOyObF/hCSycJ80nJFPEeLmFJs8wngwRM7QwOq XlTnqC2PTPEs+tsERb7D2DwfksrxJUL+/dohOVDmQJwBlWNznDeF+KB2eVkEfpClUOWD 9ziPNjCFvs+nU/6PX+Hco/kG7/qNbtxzB/i4GpPIPGZ8ORicZNnTB7T76+HJR/SyxVlq azaA== X-Gm-Message-State: AOJu0YwfXldJk9BVUXHbCIDyIhcSYwhGnIY1vbSvShHjkhwSTqDKOkiX VowhztnpCe/fy8QlHgLVwM9fQiSyZ/8ja5lgvmp/HBZazb93LFwIZf47VA== X-Google-Smtp-Source: AGHT+IFGnunXdWfUjfEre0FPgl84SqBlsMQQnTV1JyvAjJBV8zNS6yIn0ipvlXb4OFVjqVhNZU7S/g== X-Received: by 2002:a17:90a:c918:b0:2c9:7cc8:8e33 with SMTP id 98e67ed59e1d1-2d3dffc0fe9mr14933412a91.13.1724168621024; Tue, 20 Aug 2024 08:43:41 -0700 (PDT) Received: from localhost ([2600:8802:5726:2500:b32e:a670:cf7b:98f]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d3e317527csm9583270a91.26.2024.08.20.08.43.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2024 08:43:40 -0700 (PDT) From: Karthik Chikmagalur To: Ihor Radchenko , stardiviner Cc: Org mode Subject: Re: [PATCH v4.0] Re: [PATCH] add a function to only refresh inline images under current headline instead of global buffer In-Reply-To: <87frr07xz8.fsf@gmail.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> <87il9zgpdp.fsf@localhost> <64c905d7.170a0220.f434a.fddb@mx.google.com> <87o7jpoqfl.fsf@localhost> <64cc9b8a.170a0220.dfa99.2e18@mx.google.com> <87msz7kym0.fsf@localhost> <669882e5.050a0220.8ff6d.33c6@mx.google.com> <871q3logb9.fsf@localhost> <66a8b73b.170a0220.383476.996e@mx.google.com> <87o75yhwnu.fsf@localhost> <87v7zyyvm3.fsf@localhost> <87frr07xz8.fsf@gmail.com> Date: Tue, 20 Aug 2024 08:43:39 -0700 Message-ID: <87cym38aj8.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=karthikchikmagalur@gmail.com; helo=mail-pg1-x530.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -9.79 X-Migadu-Queue-Id: 4DBCF72EF2 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.79 X-TUID: f+/qxHcXhhSc > | Calling convention | org-latex-preview | org-toggle-inline-images-command | > |--------------------+-------------------------------+-----------------------------------| > | C-c C-x C-[l,v] | toggle preview at point | toggle preview at point | > | | or preview current entry | or toggle in current entry | > | With C-u | Clear previews in section | Toggle previews in whole buffer | > | With C-u C-u | Preview whole buffer | Hide all previews in whole buffer | > | With C-u C-u C-u | Hide previews in whole buffer | - | > > I think this is confusing, and it will help to stick to a single > convention for previewing "things" in Org. Of the two, I prefer > org-latex-preview's behavior and have been using a custom library [1] to > toggle images this way, but so long as it is consistent I would be okay > with either set of behaviors. Ihor: Based on this, what do you think of the following behavior for org-toggle-inline-images-command? C-c C-x C-v : toggle link preview at point or unconditionally preview active region (not toggle) or unconditionally preview current entry/section (not toggle) With C-u : Clear preview in active region (not toggle) or clear preview in current entry/section (not toggle) With C-u C-u : Unconditionally preview whole buffer (not toggle) With C-u C-u C-u: Clear previews in whole buffer With C-u 1 : Same as C-c C-x C-v, but including images for links with descriptions With C-u 11 : Same as C-u C-u, but including images for links with descriptions This is much closer to the behavior of org-latex-preview. Since all these behaviors are new I think it makes sense to be as consistent as possible for "preview" behavior in Org. ---- Separately, are you interested in separating the link preview code into an org-image-preview library? This will include the feature of registering link preview handlers for different kinds of links, such as video thumbnails for local video links and youtube links, etc. I already have this working for a couple of years now in org-image-preview.el (linked in previous email), but hadn't submitted it yet since the previews are synchronous. I was waiting for org-async to be added along with the LaTeX preview patch so I could submit an async version. But there appears to be activity around image previews right now so I can submit it and work on making it async later. Karthik