From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KKywDOAw62IQ7QAAbAwnHQ (envelope-from ) for ; Thu, 04 Aug 2022 04:37:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id KKraDOAw62JNqQAA9RJhRA (envelope-from ) for ; Thu, 04 Aug 2022 04:37:20 +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 AAC393411F for ; Thu, 4 Aug 2022 04:37:18 +0200 (CEST) Received: from localhost ([::1]:57088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJQjd-0002pa-0D for larch@yhetil.org; Wed, 03 Aug 2022 22:37:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJQjC-0002pS-Qf for emacs-orgmode@gnu.org; Wed, 03 Aug 2022 22:36:50 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:38589) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJQjB-0001Dz-1N for emacs-orgmode@gnu.org; Wed, 03 Aug 2022 22:36:50 -0400 Received: by mail-pj1-x102b.google.com with SMTP id w17-20020a17090a8a1100b001f326c73df6so3873339pjn.3 for ; Wed, 03 Aug 2022 19:36:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=t7xhRX1MwC9WvKYSIC4vwGXuRfo0WbpqCaoL3F076vM=; b=XS3udVUz2NlAmT6WR6JOCA/yBQ/KhvTJc5N20iHyZ1lqinf8tcNoEfjmVgKFJMuVd0 Xug2gAGdZAoRIuFV41WsiwogvKRn6WaU33F2L6RsDCaqf+MKz1C+Gkw1LMJiLZ4D+ZuI mxg7DWmMhGpWuA0elctt3N6FIxNGxK69joX3L3dmUmmw8rWFL0K/eZA8r5aklk5oC/jc Z2ovJix+f9v/RaByd3bFXZIk/Sw4q/tFQgeOPSMlXbyGtMO78wGqo3pH+xP2kx5WFhzx AUlx+FmWcedZWVGTw/1tgq+0XK4oN23szjnHRB6u9idlGCXv8dIFQUNflfx1SzfZayJi G5fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=t7xhRX1MwC9WvKYSIC4vwGXuRfo0WbpqCaoL3F076vM=; b=If8s87WPPnJXw4r8uhaxMqABj5bmM+QvbiBuaBFpdAWhH/XcqjgjjJ8rH4+J+2pTjI vhi5e4dA2LLQYIuoS1Fz+L+zWqkoTBuU6E/n4PXd8K6bzOsarfMMQJ2H9tBjxaoWSKBz cyanrW2P/6MxBXSWcMXppB+3n5rdibgEOx1nl2mdID7QrTTYwN2PkaaD7QWLXGQI4XFo GKPZt5tn132zTQLDsKpn+RNyqmO/Cs7dWL+/Ad5vEmq5aLnQQny/2jGll3pEIunfGTQ7 PSCO6B8C2sx2V+Mji2jHAA7uBYH4Kss7He43syowA0YsxZMrxywNsfHrHryk6QtJpBxm XG6w== X-Gm-Message-State: ACgBeo2rqQT35y8sMU/gZwxjFG0UXRJn7vqKtrh8qpIM8BD+EozJtthY +DF3y7kJCdNIyOq1QFDGf8oyGb9zOVLHpw== X-Google-Smtp-Source: AA6agR5ZOIV4SUOGLobVaDW2hDaptDwFofTV0tqcuxhwkrCKnH05GkKgvSyhBpuMIGDuiK8P02kANA== X-Received: by 2002:a17:90a:988:b0:1f2:3dff:f1dd with SMTP id 8-20020a17090a098800b001f23dfff1ddmr8231362pjo.150.1659580607418; Wed, 03 Aug 2022 19:36:47 -0700 (PDT) Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id u5-20020a17090a4bc500b001f239783e3dsm2312919pjl.34.2022.08.03.19.36.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Aug 2022 19:36:46 -0700 (PDT) From: Ihor Radchenko To: reza Cc: "emacs-orgmode@gnu.org" Subject: Re: Internal link to resulting image from source block In-Reply-To: <01020182658e20e8-67e349b2-0f8b-457a-89ac-8242af01ff94-000000@eu-west-1.amazonses.com> References: <56e1e299-b04d-0b01-7dec-564207d4484a@housseini.me> <01020182658e20e8-67e349b2-0f8b-457a-89ac-8242af01ff94-000000@eu-west-1.amazonses.com> Date: Thu, 04 Aug 2022 10:37:53 +0800 Message-ID: <87mtckhgxq.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659580638; 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=t7xhRX1MwC9WvKYSIC4vwGXuRfo0WbpqCaoL3F076vM=; b=Pm2OAACShidyZ4EkeVfAjySKU2X2Dk1jBSStlX7LqKt/pFFnzMTMRw567phDKvzRRNE2X8 qEbthn5GH5XjbS2/8Rneewf1k01AFNnXV/QauIueUXpjnYnmT7m/6xDKojW6fyHiGu5gJq yBwnaTzxPJwiHLWhNRrkswDwY59ZJX5yAM48Wgtzu82Uatw6mcmpzqW7ZiUbkaeUWtV85o 1HVxnInoQitPjkmEWl/nc5qpYzyrslYYxW2kYw2oAlsUqqsOQgBr1At1KnfmyDDjUaliO/ o/qv+kS9zL11sLe+v61K+rBuTKGSNDiZNJzAu/H7PNSyc25mHR32deOxWySLLA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659580638; a=rsa-sha256; cv=none; b=GKcZaF5kLkTCPQzwEvgsvh3VaYAn+fB/EgtoDtgASLjCjhiRA6th+C/gFLLseMia413uVS fxOpkDANcHsS+iFi1FBYUyMjUq36cSkZK0dbRrODQJ2AJG/2jQpLlfp8NJFWIblMz2R6F5 8vxsm11Fr0pTD1J9IpgXDTPrb/W6u4RDBqcqxA2aZO37J2XFC+EI0vuqBHySFZ5aIWzMU6 u7wMpkEvcJ8nxcIqWqu2ENIyldhhCNH8woXd5TXjN17VuH6mvGn9sJbo58rnvjRJ42Gi52 yP73ZydFgN8T1sBCcjrKdu2X1LbzYyLQeIRPf7q8iNSPBkoZdClqiD+vCuDH4A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XS3udVUz; dmarc=pass (policy=none) header.from=gmail.com; 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-Spam-Score: -1.91 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XS3udVUz; dmarc=pass (policy=none) header.from=gmail.com; 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-Queue-Id: AAC393411F X-Spam-Score: -1.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: otuvdivOoeFr reza writes: > Hi List > > I'm exporting a plantuml figure to HTML like > > #+name: html transformation > #+begin_src plantuml :file img/transformation-html.svg :exports results > file org > file html > org -> html : org-html-publish-to-html > #+end_src > > Now I want to include an internal link to this figure with ~[[html > transformation]]~ but when I export I always get "Unable to resolve > link". Any idea what I'm doing wrong? Nothing really wrong on your side. It is probably an omission on the Org side. Executing the above code produces #+RESULTS: html transformation [[file:img/transformation-html.svg]] However, it is currently impossible to link to such results paragraph by itself - only to the parent src block. Since you are using :exports results, the export code does not "see" the src block; only the results block which cannot be referenced. Hence, the error. They way to work around the problem is providing explicit name anchor to the results block: ------------ #+name: html transformation #+begin_src plantuml :file img/transformation-html.svg :exports results :mkdirp yes file org file html org -> html : org-html-publish-to-html #+end_src #+name: html transformation result #+RESULTS: html transformation [[file:img/transformation-html.svg]] Now I want to include an internal link to this figure with [[html transformation result]]. This works now. ------------ Though I do agree that the current behaviour is not intuitive in this specific scenario. When a user provides :exports results, it would make sense to inherit all the affiliated keywords, including #+name and possibly various #+attr_* to the results of evaluation. On the other hand, inheriting may be tricky. I can imagine situations when such inheritance is not desired and a user actually prefers to state the results keywords manually. I am not sure what would be the best way to handle the situation at hand while not breaking the other :exports variants. Best, Ihor