From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 8KifOsybzGTuEgAASxT56A (envelope-from ) for ; Fri, 04 Aug 2023 08:33:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id AMjQOcybzGRh5QAAG6o9tA (envelope-from ) for ; Fri, 04 Aug 2023 08:33:48 +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 A500C45A08 for ; Fri, 4 Aug 2023 08:33:48 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=NpbSfLsQ; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1691130828; a=rsa-sha256; cv=none; b=hds6bSxpb2f0jEMxe+0YolKIYMcVXar99/+zIdc/Mszj/t+GgiFrMhb4LhW7zbXf97VyjV WYSgTs+h91elIaEJGVdfcdK9lvfjC1ku2MBuIo1eJ/g79i67dzH+LMrxmhtNwKvDR2Y++B nKZmqzGwjeq+kFf4uU9LiZeYSQUMuFpyb7Iij+zVT7sIDcQ+61cCbeRsW6p606GiFJWWXG ER8VNiXfOLpbSP3703G13r+0VxWkO6RAcTxw5TjRzZFhMqhyAgvN3z4D0gOYBfBeLMRR0o zslc0yidSz464AwzXKTnX7f2baS0NggBsD9MA+HcGR2MeB90GvMBOWiCwEXhNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691130828; 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=1OsUvZYq7o/Uy8quZ2+7qbEkjoEUNpAJuaM/k0KpUsw=; b=GUyLKdzvZee9GQZJt0Zvxa9hMN0mYkeAwuNFW1UPbF5oJqc3XPluwu+2n9GME+DX5UEsOA 4EAMrdP+fEagrWb2lsk3NzZMuVQBfxq/BbHKQsevxP6Ch5kkrtG6KaXO9i7RJQz6oNiaVF bc8bURpn1AM0ccCXaPF2Q04trFvQ5KE4rY3P/vxzo74cTI0H/fVosILsGNZ0KazAP42sbR c//VV1W6V2M/Ch/DwjuLx4GmxhqL1hI/qC3JtkNolNX5nyeDjoL1iwGCXUK5phj9LfBC6F Q37K1XXyfWNyUHLt+RGjF0iBS97AOXnyriRhDj4+QpYsRmb8mVKlMH8PWJuHBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=NpbSfLsQ; 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=gmail.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qRoN1-0004Lm-2j; Fri, 04 Aug 2023 02:33:07 -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 1qRoMm-0004Kv-FG for emacs-orgmode@gnu.org; Fri, 04 Aug 2023 02:32:55 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qRoMj-0001Z2-Nh for emacs-orgmode@gnu.org; Fri, 04 Aug 2023 02:32:52 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1bc1c1c68e2so12263735ad.3 for ; Thu, 03 Aug 2023 23:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691130765; x=1691735565; 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=1OsUvZYq7o/Uy8quZ2+7qbEkjoEUNpAJuaM/k0KpUsw=; b=NpbSfLsQFLDnLp1p8VQmdwuBGn+PX6nj4wLhM6nWXbFCMqwKjmoAeYwFuFYojeUB5K L4u6Fu6AWPwNRu8M/BQq9ZjmYdkTfxbQt+IPXoQToJCDfiwPOGezHjMbwqlkNKIHTsEX bMxUWAVtPxfnjMveFpdxt6qUfsfriq9phNEAfEPd19mWTK7QV+iy7oYxxJfw8syVHbQS BhRmUJGbyd6TXFTURRz2W5qL5eEhg5f20NYhtlHSUM1A3XTn0o+Wkqhp3g33n2RiLju1 ED/ya2zKQT8tDjEa5/gAKud1kRXyIH7jMirjI35jDWWQh/gAIP2VNVAK8wuj0a2lX1Si szKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691130765; x=1691735565; 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=1OsUvZYq7o/Uy8quZ2+7qbEkjoEUNpAJuaM/k0KpUsw=; b=OMnuLuQ/ZM8nMtKWjnSSSCx+pj9s3jnR2CTgDzxC0KCDhPtHKBPm7KfxgVfpagx8fT Y6eMq301Q8jEuBHRd5+aGSFGpgtDUAsc57EV3T5ZHuYeJ5mc7bJnp/L/1WNa0HGb8y7a Ury46qWcUiAnu/XYR6zHraDR+FpVQFbav9mgn3zUIR4/Q1id/EfIOKf1vaAh32pbkd7m LrfUzeQlFtr2kVtySkxA/dtYfgmBqnmaBGq5a9eMieLCELrv1NO0iVggUdh8Z4gBEUcA tiPP5Lb9XFHhsM7l4KKLLb5RXWRgst9wJhECIg8+BhT+2a4wA2lqn5tTrslgTrNMweJp q5MQ== X-Gm-Message-State: AOJu0YwQ6z1x9lJxxfrXEgU1EvXjsq2Ugjxk/vZCAyJjks1tzqYbmhWU SColwGn2qbcWNfJKoS/vmA== X-Google-Smtp-Source: AGHT+IGBK2FZtUPw6+9N5VvPIjdKIkVBAixEbh6Ic6QW/+d+6OFc8/UtGSvy0F4r51dW6xkLjIzhKw== X-Received: by 2002:a17:902:c404:b0:1bb:a367:a77 with SMTP id k4-20020a170902c40400b001bba3670a77mr1051726plk.31.1691130764716; Thu, 03 Aug 2023 23:32:44 -0700 (PDT) Received: from Mac-mini.local ([39.171.199.49]) by smtp.gmail.com with ESMTPSA id q5-20020a170902bd8500b001bb0eebd90asm896522pls.245.2023.08.03.23.32.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Aug 2023 23:32:42 -0700 (PDT) Message-ID: <64cc9b8a.170a0220.dfa99.2e18@mx.google.com> X-Google-Original-Message-ID: Received: by Mac-mini.local (Postfix, from userid 501) id D63619CFCE35; Wed, 2 Aug 2023 23:57:50 +0800 (CST) 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> <87o7jpoqfl.fsf@localhost> User-agent: mu4e 1.11.6; emacs 30.0.50 From: "Christopher M. Miles" To: Ihor Radchenko Cc: "Christopher M. Miles" , Org mode Subject: Re: [PATCH v3.1] Re: [PATCH] add a function to only refresh inline images under current headline instead of global buffer Date: Wed, 02 Aug 2023 23:44:17 +0800 In-reply-to: <87o7jpoqfl.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::62a; envelope-from=numbchild@gmail.com; helo=mail-pl1-x62a.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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.61 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: A500C45A08 X-Spam-Score: -8.61 X-TUID: 3Gq7ek5IIYug --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Ihor Radchenko writes: > "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. > I don't think so, the patch main purpose is for improve image refreshing after babel result image displaying. Because the function is hooked by other ob-* packages. Another purpose is headline level images displaying. So modifying this function is the only way. > 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=3Dt > (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=3Dt > (display in the whole buffer, with linked) > Don't know, I have not use it this way. I think INCLUDE-LINKED is just a option argument for function org-display-inline-images. No need to be available for toggle in interactive command. An option like org-inline-images-include-linked is enough. >> +(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. Emmm, I forget the meaning of it. I read the docstring again, seems it can be deleted. I will delete it in my patch. =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----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAmTKfPsACgkQG13xyVro msMljgf/YNqsZ85yTIu6BL6Ndqcusla2aO2fS6KTDsJ81oJsXosMjATqAcpWmyxi tGfb+1SDUbOEPHyL0Y46pCoM4rFpBmAwkcj3voZIvCfYoCZ5PRpME32I7a2EOEB6 tpn+U6dsmHTu/iNqAnNxM6YW35QRHZ/VfiCmi2HGG5kyXBlcMF7sAaF2FLwoJ4ju CZeMDkAMk2UGQTf4w3eybO7vOwBgPUo09pkpTLE6DA7B9Z4hDdCiDozjlqSU/DrT 0P7P089mOGWyOlcP+SnexoGXvfx30cuv6iOkiVrR1ZXRO9UE/oeckuzfCSXeTcjK O/46SMTAJnj32dmTEnX6gx8yyeLl5A== =J2HZ -----END PGP SIGNATURE----- --=-=-=--