From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aAntI6qE4GbP2QAA62LTzQ:P1 (envelope-from ) for ; Tue, 10 Sep 2024 17:40:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id aAntI6qE4GbP2QAA62LTzQ (envelope-from ) for ; Tue, 10 Sep 2024 19:40:58 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=LMKrUy78; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1725990058; 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=ZCNYuks50tr2uzUZzfeQEVe/RCDVoRfjHeUDSChUtH4=; b=f6Ssuc0KJXieMa4eIoBaN7Jc0Tmlu6MKzqDq71Zd8vTiSasIRcpBiaBsbjTu5agjKhShHh Fc2+RGLPhgs5u02+fwgTpfu5r9rFSqtxUSHXqaMIjwWrx8+Cmetwi2/UIOCMWNnTcN6p9a XpxmYpjoKDUnS4ZpcSgKpNNFf/LhpshnhofqqvyhIKlohlEk6zZjFLezuCM9xlEtVcWB8c 9kAC1OTtWAHOruiCqv0ffgkMg2wC/4U1/LpsPm61pkxFO1FGX6u2wS7fexiWbqDPBAfF2z EVLQ0tgVG2eUqOsBmHwk7MXuAaXE0df51/9Az/3tdDf9eDID9GL8peRpasKxfg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1725990058; a=rsa-sha256; cv=none; b=Qp76lHYeRjssEe5Y+xiEEC9DkXSTBHkGI68Yg0lqtJKnut30oWnMFyG72PWlaCjeat5ACG mXq4rwmJqci2H7W1b70n4bQabj3BQ4wiw+fsA3DNTYInbAq+Gch6F4B2bkhBHDk873ekzO V8uMJAUv8yC2OmJH6TNs1EG6aTELNlWpkVpnNCGLL5JY8Fr8BKpVnDNB1AXOoM2uML9bb0 WX7wHc8Nx8OBiIdlIskSv51RG8zpXnAhlpgaWlg0n3lixCtgOxAbb4SD3cO6jRRohnTYBx P30znl85X4EM/oLXfzPwHl5AgxjhVX8sN8ww+AihTwMyk/aqwpiimD2dGanX4A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=LMKrUy78; 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" 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 56B0926A9 for ; Tue, 10 Sep 2024 19:40:58 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so4pM-0004XF-UT; Tue, 10 Sep 2024 13:38:56 -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 1so4pK-0004Sj-DN for emacs-orgmode@gnu.org; Tue, 10 Sep 2024 13:38:54 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so4pI-0004Xo-FT for emacs-orgmode@gnu.org; Tue, 10 Sep 2024 13:38:54 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-71911585911so624197b3a.3 for ; Tue, 10 Sep 2024 10:38:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725989930; x=1726594730; 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=ZCNYuks50tr2uzUZzfeQEVe/RCDVoRfjHeUDSChUtH4=; b=LMKrUy78CsqL7LifduyDjtDyUoOD9Lc25JEGQl9h2kqK+MItliWvQVIiFHhvbzQEVY duxcfREkytWW8MgJzD6LvZnMJ48BCRr4Xc3ny5ymSLoxv2bo+OGHthD7De1YfHkD9m2m VSwBNsIDA8+9cM1SZM/xj2qCPqdKsKJn6cJAzc4brJ7eEXUzcRyqR7+vsyKwStrDqKMc BR3Ux0pgwyp720+NfxDCdD9/0RhShTqxWn6ajgDzVifT4xKf3o5Rd3IrvbWXAJYUbejL WAo7ERk/BR08T4OMuLKmaFNTyyaSkq62EX8pjOb0Z4C19xrLHKs0HJDXYiINHjvTyXAQ DzfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725989930; x=1726594730; 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=ZCNYuks50tr2uzUZzfeQEVe/RCDVoRfjHeUDSChUtH4=; b=m7P8qQu2DYe6ZmfsliBwsTqSFe3i53CfKpt0DbsHKy2eg1igMk5PITqZLmfbGZ8Hnc g4VA6qLI6P4ti/0/xeNVNpSrILxzhQInhCP2pXHsy/UuW4m2HDAdKR2N2vtpZIU9wivJ M7vsBuYaM7WvAV1avnEdf+e41HWZGK5HKdb08blDhLKr5yIGUd7Goz6+lG3TjWXQqAt2 tAwurfdCiGxp6fxypcV35dbjyxgC3nX6+d0A9ZAYN7dAF5ZgQ5PyyXOfE8jfFGUSxOWX H6Yc6h3x4QHtsJsnq9rFfOqueW6yWKo4qi5OLJJh+Cjql6VkLFNd+mpi7VBkn/9DHTg0 hacw== X-Forwarded-Encrypted: i=1; AJvYcCU/B1EdCZhUv/Wh1ozHAwcyJh71VRiyLwncBpVZGZIC8sho83ZiqbOZjLCyB2tcu4rZyhwrr/fkHtu9I55L@gnu.org X-Gm-Message-State: AOJu0YzDJnPmBRXnxovfxr8605GMe3WnOob+9kkkXS8LmUPKd2RCl63R 23HQF3M5DTi/ddC4o0lcJsgBjiRzf404KzCYGePcvQx3VLFj7hbz X-Google-Smtp-Source: AGHT+IHlIqpzSc5ENVI4PeH/aYa9s+8cACEkaB4zL6g3AdDFE8KSvhlUa6dSTAYilHAbmCsmwHusXw== X-Received: by 2002:a05:6a20:e687:b0:1cf:4f07:10d8 with SMTP id adf61e73a8af0-1cf62c843d9mr694457637.4.1725989929889; Tue, 10 Sep 2024 10:38:49 -0700 (PDT) Received: from localhost (169-231-129-93.wireless.ucsb.edu. [169.231.129.93]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-719090d0b14sm1616413b3a.215.2024.09.10.10.38.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 10:38:49 -0700 (PDT) From: Karthik Chikmagalur To: Ihor Radchenko Cc: stardiviner , Org mode Subject: Re: [PATCH v3] Inline image display as part of a new org-link-preview system In-Reply-To: <87ldzzo37o.fsf@localhost> References: <6461a84b.a70a0220.b6d36.5d00@mx.google.com> <87o75yhwnu.fsf@localhost> <87v7zyyvm3.fsf@localhost> <87frr07xz8.fsf@gmail.com> <87cym38aj8.fsf@gmail.com> <87r0ajawgj.fsf@localhost> <87a5h77zb1.fsf@gmail.com> <87msl4wv8d.fsf@localhost> <875xrqg6cb.fsf@gmail.com> <874j70n559.fsf@localhost> <87msksabld.fsf@gmail.com> <87jzfwljkq.fsf@localhost> <87h6b09v4o.fsf@gmail.com> <878qwb8qw1.fsf@localhost> <878qw9ak6a.fsf@gmail.com> <87o74ypp3b.fsf@localhost> <87cyldzf3p.fsf@gmail.com> <87jzflqs2g.fsf@localhost> <8734m8zejw.fsf@gmail.com> <87ldzzo37o.fsf@localhost> Date: Tue, 10 Sep 2024 10:38:48 -0700 Message-ID: <87ttenxvbr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=karthikchikmagalur@gmail.com; helo=mail-pf1-x42e.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 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-Spam-Score: -6.81 X-Spam-Score: -6.81 X-Migadu-Queue-Id: 56B0926A9 X-Migadu-Scanner: mx11.migadu.com X-TUID: F+Xs5zFSw2nU >> Another problem: this top level chunk no longer works >> >> [...] >> >> since the previews are place asynchronously. It always reports "no >> images to display inline". Should I remove this messaging, or find a >> way to run this from the final async chunk? The code gets a little >> convoluted when I do the latter. > > I am a bit confused. Isn't `org-link-preview--get-overlays' counting > overlays? And the overlays should be created before async preview is > complete, right? Or do I miss something? Currently I only add the overlay to `org-link-preview-overlays' if/when the preview is successful. `org-link-preview--get-overlays' counts overlays in this buffer-local list. If I add overlays to `org-link-preview-overlays' when they are created, 1. All previews that (eventually, asynchronously) fail will be reported as successful by the message. 2. `org-link-preview-overlays' will be populated with overlays for failed previews, leading to inconsistent behavior when doing other things, like toggling a link preview at point. These inconsistencies might still be worth it since the code will be much more confusing and harder to maintain if everything (including user messaging) is done via callbacks. Karthik