From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 yGqbMdts32awGgEAqHPOHw:P1 (envelope-from ) for ; Mon, 09 Sep 2024 21:47:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id yGqbMdts32awGgEAqHPOHw (envelope-from ) for ; Mon, 09 Sep 2024 23:47:07 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=I1FdNvLO; 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=1725918427; 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=FPsEWkjxN8VkG/0KK3VRRp0fPx1k4rDyh968NJEla3Q=; b=NM+YiusoQHcuxDAFB5T8XVjPd4UD+wUdP1QYG6TDOG4e4rviwU2xvwwY/J9b1JOePSJvAF RVpUoXuHvC3bY4I9/c04/RKwQaShaYZhU4k0NK5rksTNaool40PfVQ/3Hu35wdOdryQQDo 7WhFLdUe4gyV1/ZoJfd8eHUQJd0R6SrDS7w4tB6ydznTWBlhFdjDlbSiJdBhkCY0Xzmrbt /Nk3vbjE0+kIoBy/JeE8q2ITQzZOQRV88EGKz6s+mEDoTxwhBMfLdvEqbxf0UrUW1bqodg 7rsNCYTVJw0sTp1YNoColgY9qgS1YZtH6L7+ormhNdLF96UU+9t2wdr7Pycn/w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1725918427; a=rsa-sha256; cv=none; b=soIo1DXNKYaMoUggGWkoqaYc3894qkCVFs4CtjKVD1jVHz5cS/0Bph2TBJ+meQ0/883aXp ndU9Efyri6lwy/meTsLul28++4fpMTF8avF3gaJm6BQ2XJH1PKTPoi9Eh0QaGKOaSFqB1Y 5dp7oQwsCHPClWipqGUNWaPKPxTXs9E0I3viXT2M32LPnwB54iDzI36bLLzxHrhcOilKMV YfXIi5MgTPjumYnjOocha3sxXYMmkcj2t3+gu8jePH5fgQ9jRFsaC0h78rDGpKd+I9u+m7 jLXRby1nB6ncS4g5uM7lGuXQ1/AXoG2oJfVjsTDTZ3GANekugXq4YCAxbo6/ZA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=I1FdNvLO; 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 B372C81757 for ; Mon, 09 Sep 2024 23:47:07 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1snmD0-00085z-9m; Mon, 09 Sep 2024 17:46:06 -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 1snmCu-00084s-RD for emacs-orgmode@gnu.org; Mon, 09 Sep 2024 17:46:02 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1snmCs-0005z6-SU for emacs-orgmode@gnu.org; Mon, 09 Sep 2024 17:46:00 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-718d6ad6050so2669751b3a.0 for ; Mon, 09 Sep 2024 14:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725918357; x=1726523157; 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=FPsEWkjxN8VkG/0KK3VRRp0fPx1k4rDyh968NJEla3Q=; b=I1FdNvLOcTUBTFzPguwDtgcoYjbt0raZ+bAYr4120iNxW4HmBAj9WQPfe6Pb1Pn/wP mkgaB+GKDBErnO4g5kRXecWNNR021skGwNDNxhtHrz4562PHcwt1AoID08Ay8BJoupT9 I3gjGYSdVE6FNb0iSdVrpDqxBQzR+My4cAdl+Vb4ZgG1xjba1Vx0WhPWfcQkOfKSyc8+ vFuFRKkSc95cHN3vsPLIzXx/Tgauy3m4HvcDrZ37YMdqB+xy0I02V/INvTOR220Upcmr AUjx5r4TJoTZrMIVLfxPnPrI+21X+59pdujmtZhOpuW+Xcm/8bjuB5LREbO8kAklJFZD Deeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725918357; x=1726523157; 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=FPsEWkjxN8VkG/0KK3VRRp0fPx1k4rDyh968NJEla3Q=; b=cX+79LTDNfwQxvbsXpBAPADSTazDX6cAkkWAnL8zb+FVsQ/QBnOm1Jq2cnbd/ukS0Q oj7rXWh105+VRxzUQ//LuN1OQVnAHgROSnlKd0SHHrmquDEzAoHvR+yKWo7Qs+p1P+Yh RqW8Zc6xvvhtNV23TEBfmvqMWIfw+2m0FgB+bffS7LWqlVTVvKr5D9mPCxwoM0slT2Hc xuRG4sVONKp1YBn8nZ/TrFWIRAZHIW17z0PzvKjwUgExA1RQMdx3FOL3kN+E3DyJe4Ta J9e8y/kM/h3WL/G0COnPdBRirq5gUsaNW7G/HEsR0G/VEshte8Y766Y53EyAoEMS+JHG DcRA== X-Forwarded-Encrypted: i=1; AJvYcCWCD6bZh7tuLj7YrvicWiOm/ox3Ud6U3JfRIEw8sBk4sgE+psKLsNeopar1RLYbvj4/RfcWBrwThVAZXeEB@gnu.org X-Gm-Message-State: AOJu0YyGgdCNXqbgGlAGxIHvbUrCfKSgihkHbqRU/OpCYsENUjjx2h+A E5kRPStl+ZjEZzeh9bu9ugKQjJ7G5Qtb+Duw91V76l7fhJHygoP0V5dhMg== X-Google-Smtp-Source: AGHT+IGUIn7XheQz5pBfv3x83b4QpgzJmWcQtmLZAKBVHwmyQLUHDhBYwlReRo4Gxqxn+tfjo2zMfw== X-Received: by 2002:a05:6a00:21d2:b0:718:873:7ec3 with SMTP id d2e1a72fcca58-718d5e98b4fmr15329789b3a.15.1725918356746; Mon, 09 Sep 2024 14:45:56 -0700 (PDT) Received: from localhost ([2600:8802:5726:2500:ebb1:a35e:e5:986b]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-719090923adsm181354b3a.100.2024.09.09.14.45.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2024 14:45:56 -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: <87jzflqs2g.fsf@localhost> References: <6461a84b.a70a0220.b6d36.5d00@mx.google.com> <871q3logb9.fsf@localhost> <66a8b73b.170a0220.383476.996e@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> Date: Mon, 09 Sep 2024 14:45:55 -0700 Message-ID: <8734m8zejw.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=karthikchikmagalur@gmail.com; helo=mail-pf1-x430.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: B372C81757 X-Migadu-Scanner: mx11.migadu.com X-TUID: pRY++1VAgObi >> ... >> Do you mean something like this? >> >> (while (re-search-forward org-link-any-re end t) >> ;; Make overlay ov here >> ;; Find path, link and preview-func here >> >> (push (list ov preview-func path link) previews-remaining)) >> >> (dolist (preview-data-chunk (seq-partition previews-remaining 6)) >> (run-with-idle-timer >> ... >> Where the chunk size (6) and the idle time (0.10 seconds) will be >> customizable. > > Yes. Another problem: this top level chunk no longer works (when interactive? (let ((new (org-link-preview--get-overlays beg end))) (message (if new (format "[%s] %d images displayed inline %s" scope (length new) (if include-linked "(including images with description)" "")) (format "[%s] No images to display inline" scope))))) 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. Karthik