From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id ELNkI1gFymTM/QAASxT56A (envelope-from ) for ; Wed, 02 Aug 2023 09:27:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id eMqAI1gFymS0QQEA9RJhRA (envelope-from ) for ; Wed, 02 Aug 2023 09:27:20 +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 195F6486C1 for ; Wed, 2 Aug 2023 09:27:19 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ghPdsdeo; 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=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690961240; 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=rYN6n9HmDO1DORfSFXGOvNYDvDUD/SKRxyzOp3/4nwY=; b=bw0IvfyYkwcSkx/WnKUdYE82iZXZRnKkTwNZb0A+vyJrro/D4BFEx65AhJyiuXoH15xaPo +4cQFySaHt8agIVOSbKNR4cn7VBaATVsK1XWKwORSx+t/yM6PFoO+iV2dSgl+mffiAH67S y7tKQH5UBe3wJA5qHEjujiiOd+slOevtE29CHl1kxLbQ91Hx0G3HCGHf4LKmMJQRJaW4z9 azAUBB+7Kcxp82AMI4oHXcjTln/8AS5xf9L/64iM8YTtl2YhS17sCYBhdrN6SR6I23bXo3 +9m2GTQJsOehnow6r1l0HulvSiQSI1wCXaTlA7SNIIchBRRihmMcp55Txw3QZQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ghPdsdeo; 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=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1690961240; a=rsa-sha256; cv=none; b=mQuFIvFVncMGcraakw8pyaCHYzVTuAhvqFKCaiODUpFc0KcSHSLj99OvkLvxy8Ao//dCI9 x0bqDD8OgSZo3z21m6tEk9gYZGWSPZP1x/rp9hEAfi7us8H26K1H1ukJ9rMk4krHjrFgSQ +jndqyjRykq7GoXYTHK8Y3KGzYAodiwaNtTtkMh4D2U8U81EhkIYWMEYJOtw9q3xleQe6Y AU+9jjzp+GKWmF0GUq6CeASd8BwP+VBL8xauywUExthDDsFF8CrvhTzvWRDeBNImzRpHH8 o+udfJPGPgKiBb+If5ijlJ90HIUlU9gWNAezM69YB/mT/ypsZf06ry012hAw4A== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qR6Fc-0004et-Ll; Wed, 02 Aug 2023 03:26:32 -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 1qR6FY-0004aC-Lb for emacs-orgmode@gnu.org; Wed, 02 Aug 2023 03:26:29 -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 1qR6FV-0000kc-M4 for emacs-orgmode@gnu.org; Wed, 02 Aug 2023 03:26:28 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A63B6240101 for ; Wed, 2 Aug 2023 09:26:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1690961183; bh=sb0VLCHtRWIP7tHaA50addkESgOWn+DTo/fTDJhq4mY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=ghPdsdeoUOlMPZ/VezXvguDxSjEW+dYF8II+4c2vm9nfavEaovXdtH1B5REhKmhuD +SPobwY9Pvq5G5ls9zZTbK5PYxT8vm3ufcgWp1X+0UZEGyjrHb7E+iKiylsoBfLTqx H65L6sMadMJhX1QtXkPrQYrgBHvWF0Hx8yzJijSaEnI6g4J70jVmAa9xOsZuwGa0aB V/UlQuPuiq1p3K727OmvkVJF5/x4gblPwAuoaDUFVTl4skG2oDxhwGfgCCluBfMcPZ 0J5FQXQrRmS++h+QilzuE3bkZoQum83JKnKzxgTBhR72R1YdI1TMynXy4dERTyj5Pm QnMGMVfbBTNXw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RG3SG6ZsSz6txZ; Wed, 2 Aug 2023 09:26:22 +0200 (CEST) From: Ihor Radchenko To: "Christopher M. Miles" Cc: Org mode Subject: Re: [PATCH v3.1] Re: [PATCH] add a function to only refresh inline images under current headline instead of global buffer In-Reply-To: <64c905d7.170a0220.f434a.fddb@mx.google.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> Date: Wed, 02 Aug 2023 07:26:38 +0000 Message-ID: <87o7jpoqfl.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_H5=0.001, RCVD_IN_MSPIKE_WL=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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.86 X-Spam-Score: -4.86 X-Migadu-Queue-Id: 195F6486C1 X-Migadu-Scanner: mx1.migadu.com X-TUID: bKe2Q1Qti5gm "Christopher M. Miles" writes: >> The problem here is backwards compatibility. `org-toggle-inline-images' >> is bound to C-c C-x C-v and people may be used to C-u C-c C-x C-v >> displaying linked images like >> >> [[https://orgmode.org/resources/img/org-mode-unicorn.svg][description]] >> >> I will need to think more how to approach this. >> > > Indeed. Another problem with your change is that the order of arguments changed. If there is some Elisp doing something like (org-toggle-inline-images INCLUDE-LINKED), your patch will break the code. I think that instead of changing the existing function, we can convert your patch into a new function `org-toggle-inline-images-command' that will be free to alter the argument order. We can then re-bind that function in org-keys to make it used by default, but only interactively. As for displaying linked images, what about something like C-1 C-c C-x C-v being equivalent of C-c C-x C-v + INCLUDE-LINKED=t (display in current section/region, with linked) and C-11 C-c C-x C-v being equivalent of C-u C-u C-c C-x C-v + INCLUDE-LINKED=t (display in the whole buffer, with linked) > +(defun org-toggle-inline-images (&optional arg include-linked beg end) > + "Toggle the display of inline images at point. > +INCLUDE-LINKED is passed to `org-display-inline-images'. > + > +If cursor is on an inline image link, display the inline image. > +If there is none, remove it otherwise. I do not quite understand what the last line is trying to say. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at