From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id +AKZNHzFr2XgEgAAqHPOHw:P1 (envelope-from ) for ; Tue, 23 Jan 2024 14:56:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id +AKZNHzFr2XgEgAAqHPOHw (envelope-from ) for ; Tue, 23 Jan 2024 14:56:12 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=qDBlBPR3; 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1706018172; 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=W0R0Qp241cmXHTTMgJC9wN8KyVzxXhBb5Rs3DOt/3lw=; b=W1bo4OXKQmAKRmsKk3lnHIgPOCJXHlXVdJDZwstYRN3bHuK3zfmfx6PZzmxBtrJvU7a1dl nrBta/4G4CrAfc3IjFZ2+BFiGQfF48+2Qm43rIAGD/s1PH+yWTEwvLeY/58yUaNLZoml0k sYXJZNGBDKpdutOBeYL/fEUX2kVenu9kY7+x5CtY4VB/UL7tCo926lDCxaO8nAhfjkAAyN sRQB/X22LrFsESlzp8d8WMrIMGIYjgaElRLCPgjCrZc+U10fIJ0Og2vG8Worsw9iJGQRQl 5z88pBogs+qPn7SBfkgWbJD+r5uJc8Dq65nAHHOACjEW5gSlSBk6TtbXfyRP+A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=qDBlBPR3; 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=1706018172; a=rsa-sha256; cv=none; b=unHgA5hR+ExnRCirjOlfAvPcxgebpi+cNWEUoWgFzmAHOVWahVjmna/W9kTjWYXV+mCkW/ PrdhZxmEb50jK1sMhRfit+8x3+x7Cmx2ubRWgIBwr8Sfhb18S54nd9tktpcLCr5h8FEHBZ +O9HwjRhbIVHigO0VkjjNgM3Fe+S1CdUz5tTqTeYXb+z/KQpqDkJG/8mKDP2FtH5t7rMQw CerrYJ6GgB88ENAiZ+qG2Gqbq076M+HKZHBDlX4WqwcW6dnvVtw9sCkTY+529GJL8EDKiq 0XiRuasClQ2vUcVjlqO33j+rMxXvh0Xi2HSefyVAFyT049YpFPPMM8nfmTY8Pw== 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 7367C16BB4 for ; Tue, 23 Jan 2024 14:56:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSHFF-0001KV-8R; Tue, 23 Jan 2024 08:55:17 -0500 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 1rSHFD-0001K7-BE for emacs-orgmode@gnu.org; Tue, 23 Jan 2024 08:55:15 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSHFA-0003b6-Ff for emacs-orgmode@gnu.org; Tue, 23 Jan 2024 08:55:15 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D5AFA240027 for ; Tue, 23 Jan 2024 14:55:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1706018109; bh=Q/Ct+cDxJyT9tx/Pk7h2I2TXp97c/h0ynatb3yMCcck=; h=MIME-Version:Content-Type:Date:From:To:Cc:Subject:Message-ID: From; b=qDBlBPR3ucxMiCDPU7phwiQ2T5ra8w23g+MQ8X+GJCF78xNLYY7u0WsnJlAvyrigE JZlaQCQvxw+UP7ly5ToBnN7/YpbO5evUf8rDrSbihi09tDRyn4DamIasMCV04W9hVY bLlODYagcEnaHRLI5vrw9oFW/5W5J+eCRKkUDIPwBriW+TGRzu8ce2dfXpdzRv4MSv 6W45+m4V4DQe95NBW2zFhPrw1kwisFZ8DJMyH1f6eGqTkL0SN0g4lfO6LwOxwM7q2a NGKuLe/rS534kIyWIn9ieFVMVJG27fo2lD8BTZ+z4Q4spKI8kF8TwCWnKWpHwyfuAh vcJUyCGem/JBQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TK7rY2YLjz9rxP; Tue, 23 Jan 2024 14:55:09 +0100 (CET) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_3e1983662d616e5ef068ea486af171fc" Date: Tue, 23 Jan 2024 13:55:09 +0000 From: gerard.vermeulen@posteo.net To: Ihor Radchenko Cc: Emacs orgmode Subject: Re: [BUG] org-lint tells to move #+name to wrong place in results block In-Reply-To: <8734upry70.fsf@localhost> References: <60f395fcacacdc6a7d9de3cd7a00032b@posteo.net> <875xzls08s.fsf@localhost> <429d681f72b1b13d81f24836017929d7@posteo.net> <8734upry70.fsf@localhost> Message-ID: <7bf1f79071a714750634e76130fe5963@posteo.net> Received-SPF: pass client-ip=185.67.36.65; envelope-from=gerard.vermeulen@posteo.net; helo=mout01.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.39 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -7.39 X-Migadu-Queue-Id: 7367C16BB4 X-TUID: W2yqZzieeRDs --=_3e1983662d616e5ef068ea486af171fc Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On 22.01.2024 19:59, Ihor Radchenko wrote: > gerard.vermeulen@posteo.net writes: > >>>> FR: would it be possible to resolve such links? >>> >>> What is the purpose? Why not simply leaving the result name same as >>> the >>> source block? >> >> I have Python "IN" blocks generating Python "OUT" blocks that may end >> up >> on different pages after exporting to LaTeX and PDF. >> The FR would allow to link always to the correct page. > > Patches welcome. This patch completes my "Make an org-lint warning more helpful" patch. I have found that CAPTION keywords in the "name-result-example" in the manual are essential to produce correct links. In case the relevant blocks have e.g. ":exports both", Org handles this, but: 1. HTML export requires captions to produce links with unequivocal "link texts" which are numbers in the HTML output. 2. LaTeX export requires captions to produce captions with labels like =\caption{\label{path}desc}=. Tested on example below: Produced by listing [[IN]]. #+caption: Results block #+name: OUT #+RESULTS: IN #+begin_src emacs-lisp :exports code 6 #+end_src #+caption: Source block #+header: :wrap "src emacs-lisp :exports code" #+name: IN #+begin_src emacs-lisp :exports both 6 #+end_src Listing [[IN]] produces listing [[OUT]]. From inspecting HTML or LaTeX output using this example for the difference between with and without captions it is easy to see that only with captions the output is correct. The patch tries to add this information to the manual. Regards -- Gerard --=_3e1983662d616e5ef068ea486af171fc Content-Transfer-Encoding: base64 Content-Type: application/octet-stream; name=0001-doc-org-manual-Add-CAPTION-keywords-to-named-results.patch Content-Disposition: attachment; filename=0001-doc-org-manual-Add-CAPTION-keywords-to-named-results.patch; size=1803 RnJvbSBlODgzZmQ5YjY3YzFiNmU3NDJmYzI3ZTg2YjY2Y2U3MGQ1MGYwMGIwIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBHZXJhcmQgVmVybWV1bGVuIDxnZXJhcmQudmVybWV1bGVuQHBv c3Rlby5uZXQ+CkRhdGU6IFR1ZSwgMjMgSmFuIDIwMjQgMTQ6MzI6MzggKzAxMDAKU3ViamVjdDog W1BBVENIXSBkb2Mvb3JnLW1hbnVhbDogQWRkIENBUFRJT04ga2V5d29yZHMgdG8gbmFtZWQgcmVz dWx0cyBleGFtcGxlCgoqIGRvYy9vcmctbWFudWFsIChFeHBvcnRpbmcgQ29kZSBCbG9ja3MpOiBB ZGQgQ0FQVElPTiBrZXl3b3JkcyB0bwpuYW1lZCByZXN1bHRzIGV4YW1wbGUuICBFeHBvcnRpbmcg bGlua3Mgd2l0aG91dCBDQVBUSU9OIGtleXdvcmRzIG1heQpzaWxlbnRseSBmYWlsIChIVE1MKSBv ciBkdXJpbmcgTGFUZVggY29tcGlsYXRpb24uCi0tLQogZG9jL29yZy1tYW51YWwub3JnIHwgN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