From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id YNX4NUk4nmYbXQAAe85BDQ:P1 (envelope-from ) for ; Mon, 22 Jul 2024 10:45:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id YNX4NUk4nmYbXQAAe85BDQ (envelope-from ) for ; Mon, 22 Jul 2024 12:45:29 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hg1f6rEF; 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=1721645129; 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=pm1LgmxjMPcb/4NdOXRmXkpYoGYCzQl3BlaWxpWi4es=; b=iaQdUgp36AI+yKtC1+tKSCpXarmzPdQFtZFLnSgZZo6klc2SFMvljwPNHESnWGI6NuGgqd Qn/R96fqD7xZ57DpdF90bSqqJjzFgXkobJa2br/eD8mvosMa9gb87rxZoGbq2CT/Yvy+97 C1SRLeDcWHvRCoFj2dKi7f0WuUgXqusjiP98HFXRWQbP36c5yuL7W204SKskppgqJKIPhV waUBa+4x9iILV5+wVc6DfIWC1ABzxL4wmSM/5Hq3bGSkd/XzDO3mALFbDjdwi9BMmwU2nI ccEizm6wOnHHz0JH4LjjKcGdGpNLrHPxr0HMKP86X283nIVJkjd2JDKCRtdfyA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1721645129; a=rsa-sha256; cv=none; b=UPUfVStHkBgdC8Wqi2dM4CRVzQxRmkr6uN2LPbjgTN/sk9r2Wmdh+qe8N5PeUBF/IGoXPC Dbc+E604ajJf9g/xBksQZe1Dc4zkvCQA9ZU7XXC99oj+NWUNsEtr+GOef3jArzmfUPUsr9 yo5rgGb7ItL7/3owJaQp/fa7wr8knuF+Bn0tglB6w007DzsHJDhawKqhrmxbraXAUhu+lE BP9ISwcYjlTXM+L/pcTu2T9J9XxwlWOm+ulj3qp8qVSSV8JzwJBuYdMIqQpgb/NhMj+/FP F99owPmjaYm5Iy/7KuAj6K1M/b/b29MDR5fbjX7MA6bxympM/xXqvwnOu7x1Pw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hg1f6rEF; 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" 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 673093410A for ; Mon, 22 Jul 2024 12:45:29 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqX5-0001DV-VL; Mon, 22 Jul 2024 06:44:43 -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 1sVqX4-0001C1-3Q for emacs-orgmode@gnu.org; Mon, 22 Jul 2024 06:44:42 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sVqX1-0006fy-4F for emacs-orgmode@gnu.org; Mon, 22 Jul 2024 06:44:41 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 20C9D240029 for ; Mon, 22 Jul 2024 12:44:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1721645075; bh=ozKKSURXLqg0ONpGKnsSSV887B13YdHQXSGtDUZs18Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=hg1f6rEFROtKjwR0N7Dwt7xrvdE9472NzwM+E/Fg1TLHIGku4ZR1esEp3SAYvTPRM tE4AwS5VnT6rekALkpZNX5qv4Wy8lkGyZH3A86l4/mdnMrk7YiNjsx4YXrI6m5WJLL T2/40V29xLwcoaK1W2R1dNGTt2LdWCwjt3CfS9Za9ca5wuypYEtyuSwuvU50rDc287 +IJF7G8Lq6XyLFVf8j3DciDDaDSGXtBtv40Rjn3xZ6uaIH9xPVHqxqYJFU458LAIug j0sQBBjAtHzzSsgBGXf8IlN5L8/8jkoYajzHRqWcnn7Zwv7mLbY/IZNSzt8Z/D4jo4 x1gggkWMBgLFQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WSH3552Lkz6tmv; Mon, 22 Jul 2024 12:44:33 +0200 (CEST) From: Ihor Radchenko To: "Christopher M. Miles" Cc: Org mode Subject: Re: [PATCH v3.2] Re: [PATCH] add a function to only refresh inline images under current headline instead of global buffer In-Reply-To: <669882e5.050a0220.8ff6d.33c6@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> <87o7jpoqfl.fsf@localhost> <64cc9b8a.170a0220.dfa99.2e18@mx.google.com> <87msz7kym0.fsf@localhost> <669882e5.050a0220.8ff6d.33c6@mx.google.com> Date: Mon, 22 Jul 2024 10:46:02 +0000 Message-ID: <871q3logb9.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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-Queue-Id: 673093410A X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.64 X-Spam-Score: -9.64 X-TUID: 6c06b4ULnRHt "Christopher M. Miles" writes: >> Then, for backward compatibility, we may treat any non-nil, non-list >> (like '(4), '(16), '(64)), non-number (like 1, 11) value as >> INCLUDE-LINKED. This way, the existing calls like >> (org-toggle-inline-images t) will not be broken. > ... > I prefer this compromise result. > I updated the patch, Please review it whether it's correct. I think that C-u C-u unconditionally including linked images is confusing. What about using my idea with M-1/M-11 to be interpreted as INCLUDE-LINKED=t? Also, you did not document in the docstring what happens if ARG is something like t. > I did a source code statistics researching of using the function org-toggle-inline-images at two places: > > - GitHub: https://github.com/search?q=org-toggle-inline-images&ref=opensearch&type=code&p=3 > (Only package scimax incoke this function with INCLUDE-LINKED argument t) > - My installed Emacs packages, NO package invoke this function with argument INCLUDE-LINKED. > > So lucky this change will not affect lot. I have found user configs using the argument: https://github.com/search?q=%22%28org-toggle-inline-images+t%29%22&type=code https://github.com/search?q=%22%28org-toggle-inline-images+%27%22&type=code So, please do as I advised - treat non-special ARG values as INCLUDE-LINKED. Also, looking at the proposed prefix arguments, I feel that it might not necessarily be the best idea to copy over what org-latex-preview does exactly. org-latex-preview is not a "toggle", unlike org-toggle-inline-images What about the following treatment of ARG: 1. No argument, no region selected :: toggle (display or hide dwim) images in current section 2. No argument, region selected: toggle images in region 3. C-u argument :: toggle images in the whole buffer 4. C-u C-u argument, no region selected :: unconditionally hide images in the buffer 5. M-1 argument, no region selected :: display images in current section with INCLUDE-LINKED 6. M-1 argument, region selected :: ... in region ... 7. M-11 argument :: ... in the whole buffer ... 8. Any other argument :: treat as INCLUDE-LINKED = t And please document all the new arguments in the manual and etc/ORG-NEWS file. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at