From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id mDKcAqVAYmTxFgEASxT56A (envelope-from ) for ; Mon, 15 May 2023 16:24:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OHyWAqVAYmRcmAAA9RJhRA (envelope-from ) for ; Mon, 15 May 2023 16:24:37 +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 9EC0B12F4C for ; Mon, 15 May 2023 16:24:36 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyZ6p-0002iC-8V; Mon, 15 May 2023 10:23:31 -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 1pyZ6m-0002dG-5Z for emacs-orgmode@gnu.org; Mon, 15 May 2023 10:23:28 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pyZ6k-00039R-El for emacs-orgmode@gnu.org; Mon, 15 May 2023 10:23:27 -0400 Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-24e5c1f6461so8617463a91.0 for ; Mon, 15 May 2023 07:23:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684160605; x=1686752605; h=mime-version:in-reply-to:reply-to:date:subject:cc:to:from :user-agent:references:message-id:from:to:cc:subject:date:message-id :reply-to; bh=KodAo+JoD+QyZILYpBFmujxoJNbpMFTU0Tatts4TzR8=; b=Yk5LnewRIKGtQWTp9VUUq0zPcCjRvcEjLi/Jt80eYrTbuCI+ctvJbfJlCB5OAz91pU xJ+x89QWKIHvHyyz6xFCJpyzvLVEqOuaNC6gM9PpOfwou4Zkuz2Rnf/9rnzes7KT/L44 6bwX0hyLgVUyCY01K9P+PWVfL8IlNuic3BiD4RdRLdW0xl1jQBfCeczHBz7++BueRAnY R6/3C+Gov9XE4mE3pG8agicOgnpJJJ2ew3F4tTRwfu/MZzxVa+AO1KLV541z0650O3qN OdiJOlVjSGEAwLff4j3bb2cWFDjbIQsS9RQdmtHr5ZRUTieuLgQUdQAWCx7TnlJrzyPq nkOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684160605; x=1686752605; h=mime-version:in-reply-to:reply-to:date:subject:cc:to:from :user-agent:references:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KodAo+JoD+QyZILYpBFmujxoJNbpMFTU0Tatts4TzR8=; b=CIG4bEOhDHQCZINndpyhi/GmTrfMT8gpvIHM+zoWhBlffUZM5PeSHOfb1AcuxngH0H MO7O0XwdDa6hSiETWLCmPEaHRD2X47TdCwNeQo12ueCm0XD+EnuwMFZD+8Bd4BMBJSuX CB4JnTHzbtvohAEImXZdqW2oYnBK1Z3rxHYy1ylqDqI+9En9oG0+Z9XltGfe/ACMMxk6 8+uVnS3ynkbY0+6FlR+fb3C1aD/SJTQKRarSKtKPUwwbBISpP1Ca023fbW9ErTZf/cjl z9rHf+eqNKU065KUc8DWcQP6Ticmd8q7shKSkfP6FPtWUV/mn53FaILJ040ZnpwFvO/C Cs2g== X-Gm-Message-State: AC+VfDwWMV++vFtAJIXIJALn6HPH/5jCDXkMAb2Y/+iAl7TPvAh0PT9M R6pG96mtHhz5CtnWbLnXRZO99JSUlvKI X-Google-Smtp-Source: ACHHUZ5Jjkhj1A4KMRKWewMNXMvkfvmFX8cScprCmWyT56NABnKH3SZECUOirRnG5IFGSW/djar+ig== X-Received: by 2002:a17:90a:8c17:b0:24d:f3cc:7d34 with SMTP id a23-20020a17090a8c1700b0024df3cc7d34mr34792407pjo.32.1684160604863; Mon, 15 May 2023 07:23:24 -0700 (PDT) Received: from Mac-mini.local ([39.171.215.147]) by smtp.gmail.com with ESMTPSA id kx6-20020a17090b228600b002477dda66d2sm21874786pjb.37.2023.05.15.07.23.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 15 May 2023 07:23:23 -0700 (PDT) Message-ID: <6462405b.170a0220.6762d.8f52@mx.google.com> X-Google-Original-Message-ID: Received: by Mac-mini.local (Postfix, from userid 501) id 566C28DAF6D4; Mon, 15 May 2023 21:04:27 +0800 (CST) References: <6461a84b.a70a0220.b6d36.5d00@mx.google.com> <87sfbxhmxe.fsf@localhost> User-agent: mu4e 1.10.3; emacs 30.0.50 From: "Christopher M. Miles" To: Ihor Radchenko Cc: numbchild@gmail.com, Org mode Subject: Re: [PATCH] add a function to only refresh inline images under current headline instead of global buffer Date: Mon, 15 May 2023 21:01:44 +0800 In-reply-to: <87sfbxhmxe.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=numbchild@gmail.com; helo=mail-pj1-x102f.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, MSGID_FROM_MTA_HEADER=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: , Reply-To: numbchild@gmail.com 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1684160676; a=rsa-sha256; cv=none; b=mos2NeauTCL6jaE86hmFgoLMkyyGHq33h/fZvu1uLuwgUDc2VHeWa/ar3sh6zcKiJA95FA ZixzUHe/TR+1tJnJ/IYc+Z92FYA25FrgSUoHZ5X0vBj17mZmgEq8wkIjsY7S3wI8JSIKEW 5f55zwL/fwM8S46ELXqVST+zJujOA+PBT1RVGV8embC3JD0hPruNf3pIxZmez+9Gv4v63d U7W4/uvfjJ9irEdjTV6kFc9VhQRSFhbc/2sF8vLBiFjN3gu655mmhD83VHXllOE/EntQI0 4QFg7tLP+qhfScFRiGAwIBNSvCx6GIxXK5QTbqc8h4vYhtS5CnZIlLJPD9mJGw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=Yk5LnewR; 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=1684160676; h=from:from:sender:sender:reply-to: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=KodAo+JoD+QyZILYpBFmujxoJNbpMFTU0Tatts4TzR8=; b=AI9WYzEji698O7fvz8+JdKFWjrc1e63QnBOg6g/JdZwotZ9PxvBYd1hINj7IjFX2AwXE1p XZ/aG0ZXVfcrVKpmez2Ypf9T0294D3OnX9pcxKjKYnfl4Vp7zO5UsSxyX81Ou5pqPnEQ5n gz7/qz0My9hQtFvmsnFxMOCS+KKYq85yjDnF1hAaiZ5CUjVNRruPVHK+Jjy+pA60hieUJr /nNLFzz9B4fA2PK3DNBFcTnCsdlpg1OHkDdCi8K3FYYs4/z7Zl9he/OKnmW898TJ6VHoAH CkksTl0+xp9v/azdK7FHB8HGWZKNGE/LnKUxwYmWI8pU0KN8lHrJOOa8zngrMA== X-Migadu-Spam-Score: -4.89 X-Spam-Score: -4.89 X-Migadu-Queue-Id: 9EC0B12F4C X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=Yk5LnewR; 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-TUID: SOUbKWNfcvuY --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> The `org-redisplay-inline-images' will refresh whole buffer inline >> images. When the buffer is a big Org file, and not all inline images are >> display already by default (still image file links under fold status). >> Invoking `org-redisplay-inline-images' will cause Emacs suspend a long >> time. >> >> So I suggest to add an variant local function of >> `org-redisplay-inline-images' which named >> `org-redisplay-inline-images-under-headline' that only redisplay inline >> images under current headline to solve the issue. >> >> Here is the diff code prototype, Ihor, can you review it? If it's ok, I >> will send patch update then. > > I'd prefer something more closely resembling `org-latex-preview' > approach with prefix arguments: > > Toggle preview of the LaTeX fragment at point. >=20=20=20=20=20 > If the cursor is on a LaTeX fragment, create the image and > overlay it over the source code, if there is none. Remove it > otherwise. If there is no fragment at point, display images for > all fragments in the current section. With an active region, > display images for all fragments in the region. >=20=20=20=20=20 > With a C-u prefix argument ARG, clear images for all fragments > in the current section. >=20=20=20=20=20 > With a C-u C-u prefix argument ARG, display image for all > fragments in the buffer. >=20=20=20=20=20 > With a C-u C-u C-u prefix argument ARG, clear image for all > fragments in the buffer. > > `org-toggle-inline-images' should also be changed. I agree this solution. I will check out latex fragment preview source code whether I can implement this. =2D-=20 [ stardiviner ] I try to make every word tell the meaning that I want to express without mi= sunderstanding. Blog: https://stardiviner.github.io/ IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAmRiLdsACgkQG13xyVro msNZEQgAjasIO8Vw0AVmMjigxdsuD7Qxd2nXdCAi9i2NDBeD96DB8SjtfXmr1lq3 uF1R/kjzg3NkBVJxV2nd63G6hYPLgc17R34/GwQ0dwuhjxjM41ZHF6556ZjFD2FK NLocIC4xoceu6BWtmQbrY8tLMPRNDregNM85wsHY56WhlWQOSOfRKamWnj8IqEaW f5eFqtJLGYa9uLtEw1ka0aCuj5TT1wGY+nrqeq82g76hTM7cb2RT+LHZLytuHxF2 KYZDQUVmqwWMiZcYQeM+0Ibk9k2pSGYdzPVsPSWO+zHdtMClWnsCX3NIoF7AI6OD V37BlFKowWGro1+8JQiOc+fz4nydsA== =8olv -----END PGP SIGNATURE----- --=-=-=--