From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id eO/hOA7ueGTHagAASxT56A (envelope-from ) for ; Thu, 01 Jun 2023 21:14:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0OOpOA7ueGSh3QAAauVa8A (envelope-from ) for ; Thu, 01 Jun 2023 21:14:22 +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 D9C4711BED for ; Thu, 1 Jun 2023 21:14:21 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4njX-0007JG-SD; Thu, 01 Jun 2023 15:13:16 -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 1q4njW-00075p-2x for emacs-orgmode@gnu.org; Thu, 01 Jun 2023 15:13:14 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4njS-0002W4-3S for emacs-orgmode@gnu.org; Thu, 01 Jun 2023 15:13:11 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 28F7132008FB for ; Thu, 1 Jun 2023 15:13:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 01 Jun 2023 15:13:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stebalien.com; h=cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm3; t=1685646785; x=1685733185; bh=wpKRI00CrV MXokUYDSae3ZZVm84IeTtWlqCx7AInHus=; b=WQXx9Pq4WRtVC7rZAP/gOsU42D SxNbqHTC1+LIHOH34xHRJMEceFHkVArJ/gk7b1n0PW5CWwgYFW6HaNNnTdkkbPrE UQSSyVtw1uTlrfbknbIpj7C5RHzHovz6zL0NrJXAB3kY88Cc6okrDgf+EXGKAucw e83Pl8girDPwrDwL6yJ8i9HjmJpJ6v/s/AwUiHCi99Pxg7HAyGgAKHl+vKWN7ld8 j7Myk6wIzyrRIrcI9xgTyQszonxE0XM9MuHtlAaiV7aC8+yVweTH2lJc910Vu9I+ xrTdXAxUXONF5yDqAmHMqrWTxYsTHvDjJVnxAK0/v0GXp+DojvlDBtiYEcQg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1685646785; x=1685733185; bh=wpKRI00CrVMXokUYDSae3ZZVm84I eTtWlqCx7AInHus=; b=yXltXrHw6bFGSldMedbpSIjEHpZRQbxz12caLdLOhult 7e6WXTLrqlcDYjq9ojbmkiOVBXJA4xNVo+wd9ZhusriW6jhBvhjAPw+XBrCMicbK dWx8+ugb1YG5V+oKWuKnDafVbS+ISl9eLEAxWfybjGCr8djnnxisM0MXjKrH8u6M r82EII2gIFUkGxwLamNBc+/rrNSaWfmixND+nGvLgsfVkGV8VkpfyBXl/j7cs768 XcDMJzbONGip/w8/62vL7BtwY/1DcBekwNt1XCenz7DUQq1bga3+v1wmoAaWJwR7 FHAIAuYzIgKrqdB70SvQTnqG5X9iS6JeylgGYzwDSQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeluddgudefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpefuthgvvhgvnhcutehllhgvnhcuoehsthgvvhgvnhesshhtvggs rghlihgvnhdrtghomheqnecuggftrfgrthhtvghrnheptdehleeghedtfeffteeujeefle ekgfeltdegfeefvdfhuddtuddvvefggeduudevnecuffhomhgrihhnpehorhhgmhhouggv rdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epshhtvghvvghnsehsthgvsggrlhhivghnrdgtohhm X-ME-Proxy: Feedback-ID: ie8a146a7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Thu, 1 Jun 2023 15:13:05 -0400 (EDT) From: Steven Allen To: emacs-orgmode@gnu.org Subject: [PATCH] org.el: inline display of attached images in link descriptions Date: Thu, 1 Jun 2023 12:13:03 -0700 Message-Id: <20230601191303.71002-1-steven@stebalien.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=64.147.123.21; envelope-from=steven@stebalien.com; helo=wout5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-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=1685646862; a=rsa-sha256; cv=none; b=Xft4CvNuGXwYmHCEwP3h0/z48s/0KdBur0r30NU/hXbHXL6W553eDRIGLo+yHH4LH5/keH e2HMIWFx5YJrr8kNMBooXHxvZL7SOJj+8EzRshgsxZgBXIKC6VyvLCi0qqNaJAvpVngrme IjVXt49DCDcRMNZ1zrSTBjteUqQ3awlRBoncvpix4D7eJIqXREfbd4RRzwMfniTWuLbWfR St4dF9EO2udaCDnAiV4eIBLcnEdNHDs0ZSPrN72hPWzV0DYXjAsL2lj3iJABiHdP2dVFxo L5b+AXmvAQOuE/ZeOWGyrhWMepIWchh/sgMcRCPnuCYohT2VZZPyrVcXslWG9g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=stebalien.com header.s=fm3 header.b=WQXx9Pq4; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=yXltXrHw; dmarc=none; 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=1685646862; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=wpKRI00CrVMXokUYDSae3ZZVm84IeTtWlqCx7AInHus=; b=ipu/wfLtsUrdj15K1V93YzFCa0hwdCszUB3CIP1HR2yfLyBORtM0vII+7BrfulYSGJkJIZ NL8pCsoxlfWzM4M4mvrHJrnxH26EMAO9uiYkZhr4MVPbtFy7e1FgDF59wWMJsbiExF0kRS MHQSxz48hW71SrQCLo87WSZe92w4Fx7hh+DnUsmHZcy3ADNhzh0gdX2IOInTmDs2xgkUc7 X9EmIg1/nSPIZsvzX2TGX3wc5r+XDaL7VXTxHdwZ4FqDPhSU+uIgQASPfv2wzRrSjCi6yX ngwoZqepwa/dvsPoTjiX2fNUz7JO4rZvO+UzdIVS0HclJYFiqHL+A1NKFn4D+A== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=stebalien.com header.s=fm3 header.b=WQXx9Pq4; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=yXltXrHw; dmarc=none; 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-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -1.66 X-Spam-Score: -1.66 X-Migadu-Queue-Id: D9C4711BED X-TUID: vClSr6+kZtsr * lisp/org.el (org-display-inline-images): inline display of attached images in link descriptions. Previously, `org-display-inline-images' only inlined images in link descriptions when they were explicit "file:" links. This change adds support for "attachment:" links. E.g.: [[https://orgmode.org][attachment:emacs-screenshot.png]] --- lisp/org.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 0e5740412..3e1b757c4 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16301,7 +16301,8 @@ defun org-create-formula-image 2. Its description consists in a single link of the previous type. In this case, that link must be a well-formed plain - or angle link, i.e., it must have an explicit \"file\" type. + or angle link, i.e., it must have an explicit \"file\" or + \"attachment\" type. Equip each image with the key-map `image-map'. @@ -16332,7 +16333,7 @@ defun org-create-formula-image ;; "file:" links. Also check link abbreviations since ;; some might expand to "file" links. (file-types-re - (format "\\[\\[\\(?:file%s:\\|attachment:\\|[./~]\\)\\|\\]\\[\\(