From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 iMj0NyASYmQhWgEASxT56A (envelope-from ) for ; Mon, 15 May 2023 13:06:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id AOXyNiASYmQ9MgAAG6o9tA (envelope-from ) for ; Mon, 15 May 2023 13:06:08 +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 A2C56B4DB for ; Mon, 15 May 2023 13:06:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyW0w-0002Zc-VC; Mon, 15 May 2023 07:05:15 -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 1pyW0v-0002Z7-9d for emacs-orgmode@gnu.org; Mon, 15 May 2023 07:05:13 -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 1pyW0o-00074Z-6j for emacs-orgmode@gnu.org; Mon, 15 May 2023 07:05:12 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C00E0240109 for ; Mon, 15 May 2023 13:05:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1684148703; bh=iXo2QWje4GnOcKd8HEupN8xkd6QbUCSTnrcWGsJN8rA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=g8nNSytDV7DdcwNiiX+A20V48u/bqjF9vYfF/3YRkdGRf1Cl48SJ/7co5rmimOUIo S1Q4ZozhK8fvkVyUInDdxVD7nNKjl5Jcc3EafGF5vwKrs2VUqFs+1iiZoWJRXhS1Cq zM7F7gRqkpaejur7U3vBh1UmTU42CMQdxhv92CxAqZzY8NqVjlGCEgyAu0EalWa1d1 qGjbReCPld8NUDAfOkrDzTyFnwttA4hm45ZnD/GMr77EP6vHxr3ZQuuYBLxqYfMsW1 g/PaC4daBbx4we/Hpyjlmhlt8xS/+JwB/kYKHU1835SkobQF1tkuh1Y4FMQOCOSbBo 200KpmcX6rC7w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QKc331Cqyz9rxG; Mon, 15 May 2023 13:05:03 +0200 (CEST) From: Ihor Radchenko To: numbchild@gmail.com Cc: Org mode Subject: Re: [PATCH] add a function to only refresh inline images under current headline instead of global buffer In-Reply-To: <6461a84b.a70a0220.b6d36.5d00@mx.google.com> References: <6461a84b.a70a0220.b6d36.5d00@mx.google.com> Date: Mon, 15 May 2023 11:08:29 +0000 Message-ID: <87sfbxhmxe.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: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.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_H2=-0.001, 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1684148768; a=rsa-sha256; cv=none; b=qBQ9U4uqxo33Nmi0fmqyeE3NV2vjXmTpIXbngz1oYGgjGyquXsSoATcoL8Fs9UfDVMHCsl G6jpw/CcMAcZ51VyryEm7CaAQJsy+/oY5IS+GapmGdyjchm/N3dVZznBvP+expKCT9XY5D Rntnoy/kfGR9nPkf0fhJln3vTUFotRO+PIqFp3wX4Cv1NAw2XsyIJ+k2ttxxEjmFUKWTJx K+QBW21uDYT1q1eXM7Z0ba6rRJ2IViEEQXNm36/19b2vC84PyiFG84fFJw1jVXXZUyn1ci VfJxsHUoG1u84aK3e5IiKirxFzuqNxQp6zdeIWfOPC2MzUtpZBszqoVFOJmHvg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=g8nNSytD; dmarc=pass (policy=none) header.from=posteo.net; 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=1684148768; 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=5E6MtnEdcfIduY2rEa6PdsgetAVKzJrtPFAM66l6evk=; b=SxScS2HIuKcr956kL5B0sixO6njeSEBdHjtv+/QgXhe4s8qcXkdyCuK5m1sgY4hza4XR5D bp1brAGgKGKG8qyNtmTWkM/3eyeJFOsgixBffQFT4lTq1tVuN3sF1ls8f8QevmNRzgRRBk MmsAOBzKRtX4ZQiH8Idkg5NQ112RXTLrluaRlslVk6ohOI4CVQHLTA9zdT0j/ToIojnKJX wYOs1LKtQ82BujdJXFHJ6htNn6xWt0Gn3aquHouc+aBjWSMknmukCZu183/t+KESkUFfVx LZ5wOFoVEHf1tNC6mQzzsD27bKOHwywG0O+Vq3DBzjHw1fFk4UVd8oVhjHzkvw== X-Migadu-Spam-Score: -9.47 X-Spam-Score: -9.47 X-Migadu-Queue-Id: A2C56B4DB X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=g8nNSytD; dmarc=pass (policy=none) header.from=posteo.net; 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: gZYBj1DqfJiA "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. 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. With a C-u prefix argument ARG, clear images for all fragments in the current section. With a C-u C-u prefix argument ARG, display image for all fragments in the buffer. 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. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at