From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qOG5Kg/LmGLj/QAAbAwnHQ (envelope-from ) for ; Thu, 02 Jun 2022 16:37:03 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qMftKQ/LmGKgTAEAG6o9tA (envelope-from ) for ; Thu, 02 Jun 2022 16:37:03 +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 5D62A2EE8D for ; Thu, 2 Jun 2022 16:37:03 +0200 (CEST) Received: from localhost ([::1]:41006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwlwc-0002kt-2C for larch@yhetil.org; Thu, 02 Jun 2022 10:37:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwls0-0007bJ-Tt for emacs-orgmode@gnu.org; Thu, 02 Jun 2022 10:32:16 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:36695) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwlrz-0005p9-9U for emacs-orgmode@gnu.org; Thu, 02 Jun 2022 10:32:16 -0400 Received: by mail-pg1-x52e.google.com with SMTP id y187so4916420pgd.3 for ; Thu, 02 Jun 2022 07:32:14 -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=oj7anHBXvDnuWjylWZoVwmAk1uM0k4//XQ6eLZsIdaw=; b=WfqB6W925rWObA/qGmmXz7rTWOeauDDygj1RDf7al03Zg2N2zCrE7Xo47UDykL9SwA lEFvu/knhPe4tUYATbjQVQMWqEb71csEyCU7o4b+Qq1ewHeanijpY6HlS7bsm+HxSMwZ 5jscbutXNPjvcyd9UKbNY7uvkyejZmH5KlVZrpMR8hhzYpiGTNVa4iRclt/sd8RVp1pv r72YnHnLHaXdApIDnRLFyL+CaWP88bPIG2eKewcpQP2mNn6T54Hnq+y71wTUGPtQar/Z p6ocKFTbA7opL/ng+Ty86eamoVGFeHGAhMGD3Y6wTQfAS2+aHxdXgXkGk01Djp1GkRQd pvdg== 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=oj7anHBXvDnuWjylWZoVwmAk1uM0k4//XQ6eLZsIdaw=; b=kO2wPVFrcrbXnSonFh/5xQaV/0q9OcfgHMhozCE3JEqJZxcEaj69ZvQ3jHYReFWzct xz6Palgq46791vT5rI4ZRY0hGsuroeS8nojQVAm9pR0wA4Fcohwk36ZQsEwMR8nWZ/tG SU7u99EHynLwAQl16u5Wz/dpjHUSybatcKBRF/Ewf/Sk3ISPwHrHn8Y8t+t7SeHIVZqK sAVRU2GsHkqllMo8gNhPkexab4pyNPMK9r8E+qIr8xf+9JG2hXTacO103DOcpTAm+cu/ yjg61Vk4qjCa8b0Ns5GEfRSMCemKoT7XLehOXGZXFRWIudRlXvhH/ZC93DuDx1pg6oNi tiig== X-Gm-Message-State: AOAM533aYUMJ+3wM3QfnBLO08AWgEWGNsJzLegVb4uFqFyEEaiIXEaK6 xKSw0m8uerHgeHzHKe7TR49TieMebhcauw== X-Google-Smtp-Source: ABdhPJzLXF2uzQZDRRm37U8y2gqaeSEpeP0Z5e8qjNRg1L3Q9x4R9IJ68Wtce/2wYQil17ruhvEUlw== X-Received: by 2002:a05:6a00:cd3:b0:51b:bca5:f1e5 with SMTP id b19-20020a056a000cd300b0051bbca5f1e5mr5466801pfv.19.1654180334022; Thu, 02 Jun 2022 07:32:14 -0700 (PDT) Received: from localhost ([23.27.206.157]) by smtp.gmail.com with ESMTPSA id a2-20020a170902710200b0016141e6c5acsm3655030pll.296.2022.06.02.07.32.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jun 2022 07:32:13 -0700 (PDT) From: Ihor Radchenko To: Lin Sun Cc: "emacs-orgmode@gnu.org" Subject: Re: *doc/org-manual.org: Fix the description for "Internal Link" in the org-mode manual In-Reply-To: <87mtev9mng.fsf@localhost> References: <87mtev9mng.fsf@localhost> Date: Thu, 02 Jun 2022 22:32:50 +0800 Message-ID: <87ilpj9lv1.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=yantar92@gmail.com; helo=mail-pg1-x52e.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=1654180623; 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=oj7anHBXvDnuWjylWZoVwmAk1uM0k4//XQ6eLZsIdaw=; b=OKGRLrOO9BuF6S2jAr4IT0ag7ZaChyI3fE0zmA9fMchRNf4emyG8jpLWLF+Vkg1L2xS2Af RVWVIndwzFouKZLjPB4RCPwNdNsiUc4OZ+G9VPVkWWHGeInj8tdpOYnUTGEUKUiSqBECQi 2YeaKKEkwB/Q2VUar7FR/pMkyNYJ+vUcMchE5PlziErR0gSXjsvE1sZzI0UAC6gsbr1zf+ W6X4PR89QatBWYLIbfqT0A5t6mEl0JJfidEH135supkB2Wururspro33DzxdVX48XBXHwo KkTE+69sa0EpxQ33i9xp5i/I4q53JGm7fkG9zedlADV7n1p8GEDhxhgn/xXHLg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654180623; a=rsa-sha256; cv=none; b=Hj9Ru6ZDrT9Ek+mpfdAQnSGc/uvZum7XkFkv081dd8xbM5HtRIc+gcXsr3z/2Kjnd1Ysi5 uB8XQkdGw3OTJunm5V94BJZ2v/prKNyszEoxFEwfXsRYyQf+C9+Xdd1LalFEr9axbq2Uee BGVErS3ojA7/pOuplzMnIPXYtDcv694Akv/I4EL5Tgb9cyHyktsrJvXiz4hTM4lyBKakx9 D1Gsk3hMTY7LfTsBMzU46FWDzj1T/DPMAJ3fNaoJrTmwVC4soGn3CVg1RiX3boItI2jqvB Mfjxf1Kq3blhkp9+7Hiv0yneNFdqmt3h8jNz2c2UIyZJWMPS7esiBqUWOHOHzw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WfqB6W92; 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: -5.03 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WfqB6W92; 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: 5D62A2EE8D X-Spam-Score: -5.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: 37dVgWMJwjxR Ihor Radchenko writes: > This should not happen, AFAIU. Instead of suggesting unintuitive > workarounds in the manual, we need to fix the original problem. I looked into this further. Org actually behaves correctly in your example. Please refer to 16.7 Exporting Code Blocks. Basically, the default Org behavior when exporting blocks is :export code. Org removes all the results of evaluation. If you have ------------- #+begin_src python :results table return 1 #+end_src #+NAME: Test #+RESULTS: |1| [[Test]] ------------- then Org removes the result on export and you end up with: ------------- #+begin_src python :results table return 1 #+end_src #+NAME: Test [[Test]] ------------- The link becomes invalid because the result block disappears and there will be nothing to refer to. So, you need to keep in mind that naming source block results is not a good idea to start with. They are meant to change as you execute the source block and the fact the your #+name: attribute was not removed when you execute the code block manually is just a coincidence. The right way to reference code blocks would be ------------- #+NAME: Test #+begin_src python :results table return 1 #+end_src #+RESULTS: Test | 1 | [[Test]] ------------- Note that Org automatically assigns the correct name to results. It has different syntax. In summary, there is no _bug_ on Org side here. However, the behavior is indeed not very intuitive. This kind of scenario should probably be added to org-lint, so that users can be warned about assigning attributes to src block results. Best, Ihor