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 +KR/H3JWsmWiBwEAqHPOHw:P1 (envelope-from ) for ; Thu, 25 Jan 2024 13:39:14 +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 +KR/H3JWsmWiBwEAqHPOHw (envelope-from ) for ; Thu, 25 Jan 2024 13:39:14 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=RocVtkFn; 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=1706186354; 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=sl6nfy0nRypsFK9joMFo/mkJAx+ICdSJuJVfwd9Gdx0=; b=Vrv9mU2D9gtnswarMyT5XsgjkzKt0xH68FiAm2qiXmp6s3UWT7clZV/VifpUuwFOeZPvbQ QYDIzjTGchRn+4VnqbjqwGNUL9BAi4K7A7FTv+XtTc6oQBQARMdrankXWPoDVjGyWw5t3P A7cLA/5QHZF4BFcKeG+0xYnQpoLKfw8X7pViuMKJLTFyLtaNHJW/RWH9bi8MBaVmtX/yvt f/T2hYCzJOyX60eB3bLkg+n8RHKE95KMAvb6EHEFYDC62EyQ5KYngoGKsgcMNdA0czjNSs fHUGdlngtWqYF5+F6XeYErxvB6UAHJdOY8+/Rc2VaSWIbWJmySzY/RZiWKTiOw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=RocVtkFn; 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=1706186354; a=rsa-sha256; cv=none; b=U7syQUHNkjdSbkd5gzc0VzGiM0B2F5yYkCSI7SaSX2y5ZXImENY+w2mjvTrN12Y5gxtyDq jpeetkYAJcy66pq87HsdV80b5NkDsNGZhLRHfIJ9DCN/hgIbYepza1zhaWkCswBPQ1/C8A Dxn21SJLT8/BtbIhGtKKZQy8LAYVSQKhcmnbVA6B4eohTeATDAKeGFq+RJFSBzex8lKR38 LPNxvhy+226E6vSml9MKAi0YoF3NMetpvBiKj7TL/7u9UJfrBwKF7WdkIidmqa1bbxs4ic d3JWEAuxcts+W5yPQSlwG2kXvlOrpmElyetxnIR6a22TEFmCHmS1B5dgF3fg+A== 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 F09D813A64 for ; Thu, 25 Jan 2024 13:39:13 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSyzv-0002Yj-Lr; Thu, 25 Jan 2024 07:38:23 -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 1rSyzs-0002YQ-MX for emacs-orgmode@gnu.org; Thu, 25 Jan 2024 07:38:21 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSyzq-000749-FN for emacs-orgmode@gnu.org; Thu, 25 Jan 2024 07:38:20 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 4AF2C240106 for ; Thu, 25 Jan 2024 13:38:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1706186292; bh=MR+2fdIPAT6whQk2DycA1hi6RD/USYXpcPhUnZgdj4w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=RocVtkFnnd1IG2m2L1NfNe5QqXgCmP2Z7Hp60s37m4LfjqeL21Tkh0pd8sFAOeaeN vrj36kSV24AHzg/YUYwqKgUltDurvT/NiumjuQYkTl41QFoD6bZ5RhjhGw3xlBfffK D6/H/RjcLDqZiahQTiyaFzNqrSZykMoKTFvJWv0F5+EWaDYoKG+gquQvz9BA1VkSVD FzOWdxyfpsNo+JdVPHncaZU/CtTq9DQ3OF5DoueUYL1yfG/zcGVuxwIKQQtZt2VElF eFPkYUObNiPAHlCncrtvmFiw1Y3Js7f2hF+7E5EgVvX5pvPN/vRgTYzIz4JQDc0xla 4W+34KokQapPQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TLL2q2RJzz6tvk; Thu, 25 Jan 2024 13:38:11 +0100 (CET) From: Ihor Radchenko To: gerard.vermeulen@posteo.net, Juan Manuel =?utf-8?Q?Mac=C3=ADas?= , Pedro Andres Aranda Gutierrez , Timothy Cc: Emacs orgmode Subject: [BUG] ox-latex produces broken references to src code listings without caption (was: [BUG] org-lint tells to move #+name to wrong place in results block) In-Reply-To: <7bf1f79071a714750634e76130fe5963@posteo.net> References: <60f395fcacacdc6a7d9de3cd7a00032b@posteo.net> <875xzls08s.fsf@localhost> <429d681f72b1b13d81f24836017929d7@posteo.net> <8734upry70.fsf@localhost> <7bf1f79071a714750634e76130fe5963@posteo.net> Date: Thu, 25 Jan 2024 12:41:40 +0000 Message-ID: <87r0i5lh4r.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.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: -6.88 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -6.88 X-Migadu-Queue-Id: F09D813A64 X-TUID: 3jT7qAC6aucU gerard.vermeulen@posteo.net writes: > I have found that CAPTION keywords in the "name-result-example" in the > manual are essential to produce correct links. It should not be essential. What you demonstrated is two bugs in Org mode. > 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. Fixed, on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=ea529007d > 2. LaTeX export requires captions to produce captions with labels like > =\caption{\label{path}desc}=. `org-latex-link' assumes that it is safe to use \ref{} in order to refer to an existing src block. However, it is not true. `org-latex-src-block--engraved', `org-latex-src-block--minted', and `org-latex-src-block--listings' only produce a label when src block has a caption. We should generally not need to put a caption in order to refer to a source block listing. At least, it does not look like we need it from https://tex.stackexchange.com/questions/438260/referencing-without-captions-appearing-but-keeping-numbering Thoughts? Ideas? > Tested on example below: > Produced by listing [[IN]]. > > #+name: OUT > #+RESULTS: IN > #+begin_src emacs-lisp :exports code > 6 > #+end_src > > #+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. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at