From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 SJWaD+y0zGT4qgAASxT56A (envelope-from ) for ; Fri, 04 Aug 2023 10:21:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6FJ+D+y0zGR5HQEAauVa8A (envelope-from ) for ; Fri, 04 Aug 2023 10:21:00 +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 F02E34899D for ; Fri, 4 Aug 2023 10:20:59 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=gfr3gaDy; 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=1691137260; a=rsa-sha256; cv=none; b=OckinGpOBQnyg3gqwVaWpopHhJGSFT4zdD1zC0DjOp3Iokn2H3jXhg4RaTiiUYR+5uDd0K O+CjeFXgDOEWp2IoBE3iDmGCEGVLTrOpK9Hqrpj+czQhTycTucd45ImmQE0LMS8sagKEeq /1/tY9d1WGROK5Fu8GkHv70uLxROB3cd8a+gPWlzvsN5JVklVFO1oMBDPxljqPXWxkvWzI hANu9HCDptRELHhowLnG1eNlRdZNlbDR/rqTl/y2vsqac9Ug5fOAkdz7FhQQ0XDHPyNijO P9a2ASv/f3VF4mY3Ni4A9/U9u9WsujJUfnJuLlS2pLdgiSz7nzrZCqfBHUyDxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691137260; 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=ZTk05xwC8Lx2XkE00NEGoYnXI9KC2y7MYD/mnGIGXNE=; b=jlaeY326RtH2vB3wTttnIDKykOTxwSBSGXm0VdjOIffPljTaRz3odm87a9VWIuzocv0v1+ Q88BcurtbqDlRMbtdFaKDt6SH/PTmROuzdBO8QCCvR1F9QyxaPUSvnHdVIcFNCDUlD5Rp6 P/PIt0klmr3n92N/1SR9xsqUHu0IxkYb/VxnkxclBUxHTeDWt/qYhDWVCXzKgm8Vjr5ni7 wFMrmkP7SECOiSpXxo4Jt26U36FtsW4hZAnWnGOjwid//JGIJL1L+bx2JxWAo+Wt3AJ/LX MbzSabllImyOFBpv9fXDYH7OsG/fG3zvEIhTCY3cGSMPA8YE46PFe8hJXyVZlw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=gfr3gaDy; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qRq2Y-0007lw-GF; Fri, 04 Aug 2023 04:20:06 -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 1qRq2V-0007lH-Lj for emacs-orgmode@gnu.org; Fri, 04 Aug 2023 04:20:03 -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 1qRq2T-0005Jf-Am for emacs-orgmode@gnu.org; Fri, 04 Aug 2023 04:20:03 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 55404240103 for ; Fri, 4 Aug 2023 10:19:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1691137199; bh=FFxeyoUIA8JVMlES/nFppBG5hQtWIEMKkBE0nNe7MC8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=gfr3gaDywWJ/TR9bCCq7LDCMKn5j02YwAt6XB43IlwLa4rmJ678jN/2ScZxZqPXXA OXjdMi2tMCMRgAsFdjU5IYGJEUhRIoGYsGDocL/PK7yyFps4esFTj6d9Cm5CQlwaLx 9hZxx7yn56riTWo7YlwXpkINkxtO4BY7kLQjwWJ50TbVjbzxc1AbXTkNsGgZELZt5V Jdked6WlkxMWRr3fKLDdaS5jSSGoKNnNC5RfoBqy5gdcehDR49Y2/ZLFwYx7dqDHvc FkFPi5ntotvYemK2vYA3u4kMr9ET2bjrqYJSLOz2mrB/+/RuUx0naOJ21Tc0HD6w/n A/QnpmUTkgeWw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RHJYB55CZz6twy; Fri, 4 Aug 2023 10:19:58 +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: <64cc9b8a.170a0220.dfa99.2e18@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> Date: Fri, 04 Aug 2023 08:20:23 +0000 Message-ID: <87msz7kym0.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: -7.81 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: F02E34899D X-Spam-Score: -7.81 X-TUID: 6a1c++r75cEh "Christopher M. Miles" writes: >> 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. Fair point. 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. Also, the signature should be (defun org-toggle-inline-images (&optional arg beg end include-linked) So that the meaning of the second and third argument is unchanged. >> 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) >> > 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. Sorry, but ignoring backwards compatibility is not an option. If you personally haven't used some feature, it does not mean that others also didn't. We can make limited compromises, but should try our best not to break things that were working before. See https://bzg.fr/en/the-software-maintainers-pledge/ >>> +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. > After yesterday night studying source code, I still can't figure out > solution. So I pass this patch to you. Wait you to finish the unfinished > part of path. I hope that now you have enough information to update the patch. Let me know if not. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at