From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id yLstDbYMemSHhwAASxT56A (envelope-from ) for ; Fri, 02 Jun 2023 17:37:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cFkqDLYMemQw/AAAG6o9tA (envelope-from ) for ; Fri, 02 Jun 2023 17:37:26 +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 54C82B4CB for ; Fri, 2 Jun 2023 17:37:25 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q56pD-0006yL-5w; Fri, 02 Jun 2023 11:36:23 -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 1q56pC-0006y9-59 for emacs-orgmode@gnu.org; Fri, 02 Jun 2023 11:36:22 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q56pA-0003NL-2R for emacs-orgmode@gnu.org; Fri, 02 Jun 2023 11:36:21 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 1A1043200913 for ; Fri, 2 Jun 2023 11:36:17 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 02 Jun 2023 11:36:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stebalien.com; h=cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to :resent-date:resent-from:resent-message-id:resent-to:sender :subject:subject:to:to; s=fm3; t=1685720176; x=1685806576; bh=RP LEwm58/3A7Ye/xV4es36MD5ICWbIgT/AcJ0grL+WM=; b=uw6IF0fPTLi2MRZkQo Tti7UNcqn6Kyh+gEBuyLhQZDtZ8WKJU/DIbc7cywMmfCwlkPqRmH8OK/YeZ+DDfv NPL96Rk/+O/twC/5uFpPJoaaNz6+blLaJct/xM1wHO2R6xfFFCAEgYTkcwgoSoCj H9R5HK6x+uB/i6r5VeTMeiuZQJt3WvL8+mjEoLiZw9zCumSRbcW8FjGeNJ8uyLKM /a3jd3ikG69/oFNfcMwazclhiEisDS/H7dMrRd811HdLACqqMTSKk6+XwM9YYLr6 IFjeA0WZibbVh5G06HimB70creKXGyXmtgvKkUfH/+Dgaq4bbBltzzkajU/SKHIV U/7Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:resent-date :resent-from:resent-message-id:resent-to:sender:subject:subject :to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1685720176; x=1685806576; bh=RPLEwm58/3A7Ye/xV4es36MD5 ICWbIgT/AcJ0grL+WM=; b=FlzvsuiwcYkGNd0UW0yZAsblJJy1vHJk6NGlQkBE+ 9xWDWM1nKZgbNtnHYtjHWys7u271k4H/vpsEhpOPuyBDa8sg4NKO+H4CB6JTzmqO 6Cm8+wkQzPtvap5cQQlKKzZdIT+hvWCUYZ3rykrSePNnKqQbE8Io9VUN1n69LQ/5 UDdVUIh5fSWfltvgplZsYVAWoyBz4wh92ZL+JcbDlp72zStKkXgiJmioQJFWHHad Mv9rpFG9IVlI/eGUy0dK++NNAJKcg2zoB3GftwOp8FmDMAVwYsvA3Lx4scZtqGDK WmA12Pfy+ki57mqQzH5EwDnjM0Usrrc3yVz1kOElCqHPA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeelfedgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujghffffkgggtsehmtderre dttddtnecuhfhrohhmpefuthgvvhgvnhcutehllhgvnhcuoehsthgvvhgvnhesshhtvggs rghlihgvnhdrtghomheqnecuggftrfgrthhtvghrnhepudffgffhfeehgedtffeuudejke duleekieeufeegvefhueffhfehhfefvedvjefgnecuvehluhhsthgvrhfuihiivgepuden ucfrrghrrghmpehmrghilhhfrhhomhepshhtvghvvghnsehsthgvsggrlhhivghnrdgtoh hm X-ME-Proxy: Feedback-ID: ie8a146a7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 2 Jun 2023 11:36:15 -0400 (EDT) Resent-To: emacs-orgmode@gnu.org Resent-From: Steven Allen Resent-Date: Fri, 02 Jun 2023 08:36:14 -0700 Resent-Message-ID: <873539dggh.fsf@stebalien.com> From: Steven Allen To: Ihor Radchenko Subject: Re: [PATCH] org.el: inline display of attached images in link descriptions In-Reply-To: <87fs7a5mpx.fsf@localhost> References: <20230601191303.71002-1-steven@stebalien.com> <87fs7a5mpx.fsf@localhost> Date: Fri, 02 Jun 2023 08:33:21 -0700 Message-ID: <875y85dgla.fsf@stebalien.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=64.147.123.20; envelope-from=steven@stebalien.com; helo=wout4-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=1685720245; a=rsa-sha256; cv=none; b=NNMGSeAdXmZlsb6kYUjefIKvasFIeLU1xRFb4Dp6j4wUn3i3VwyQpgYyzQCWVMS5qavF4J cQlxQaSZyuVBi0pw12l2tV2bRfZBOhhWpPzoqk8ixV0Uphy0AEwp/+3/Fc6PfIM3adcNWH 0AX5iDZMi8wK8rklhE6l4hpq/IW+SlUX3dEDk+By+jT8cxg1T+J4/IRsBgkWoV2XdpU3MY +Pp0r/hHUrqu+rX9IeChko905D1eUEPokCUgDDMci3j2j9MdQzUteO/7xK1e6qJkEkS3DK 49dptZW0WxYghe6HT2eOlPFRoktxos2N/xh3ypnr53TvQgily2vtrlfh3v3itQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=stebalien.com header.s=fm3 header.b=uw6IF0fP; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=Flzvsuiw; 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=1685720245; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-to:resent-from:resent-message-id: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=RPLEwm58/3A7Ye/xV4es36MD5ICWbIgT/AcJ0grL+WM=; b=K2FdDZOUWNrzC3APYRzaYAK1InhNYNEieG4uIxlnsEXy7rt6Xi9uzkjB36Vr97vJB8nLRD VHnoKH1oD85K02xrPTjQ3KOxMmQ4md1FyKuVCF+uT4ijXfQf226uHt+n8Yj/QlXKE3zvc+ Iv54KlbXOfXeqxEDaLOdrUbdGjcZUfgFlVmUN5hFg7Ljyt0NU0Ba7shLABxQaakXYRhJxR ED9mKnPoyaQHYSC7O6I0jwREzy0Z9jAjX9hXsCiNmleCwUV7iifM5adXzmmInAMJDJpkKs 10jk2YdPC9dRjzR1oz2bqzKhdh2LSjXD2Mb6udH6AjiORHVDNw/De/v8yBD4pQ== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=stebalien.com header.s=fm3 header.b=uw6IF0fP; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=Flzvsuiw; 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: -3.07 X-Spam-Score: -3.07 X-Migadu-Queue-Id: 54C82B4CB X-TUID: KcSesupaM8pU --=-=-= Content-Type: text/plain You're right.... and now I have no idea what I was testing. I'm apologize for that. The attached patch should actually work this time. It's not great (setq in a let), but anything else would likely be a much larger change. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org.el-inline-display-of-attached-images-in-link-des.patch Content-Description: inline-image-attachement.patch >From 6ca24ca705fc3856c68957cfa50dfce77c9148c9 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 1 Jun 2023 11:49:19 -0700 Subject: [PATCH] org.el: inline display of attached images in link descriptions * 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 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 0e5740412..405cae9a5 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:\\|[./~]\\)\\|\\]\\[\\(