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 mFQdMqP8qmPcKQEAbAwnHQ (envelope-from ) for ; Tue, 27 Dec 2022 15:09:39 +0100 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 mI5DMaP8qmM/RwAAG6o9tA (envelope-from ) for ; Tue, 27 Dec 2022 15:09:39 +0100 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 548AD1031F for ; Tue, 27 Dec 2022 15:09:39 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAAdN-0006Jg-I6; Tue, 27 Dec 2022 09:08:49 -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 1pAAdM-0006JV-5u for emacs-orgmode@gnu.org; Tue, 27 Dec 2022 09:08:48 -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 1pAAdK-0003G6-9r for emacs-orgmode@gnu.org; Tue, 27 Dec 2022 09:08:47 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id DE439240246 for ; Tue, 27 Dec 2022 15:08:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672150122; bh=LOBRKOi+NyajxHrXFtKL38cxm0zcHB/Uiz958+ckt1E=; h=From:To:Cc:Subject:Date:From; b=k3rqPl/QZG98orkLsmY5mmeeO0ZgfTyPncjOitsM6ylKEUXqdxVyWjNJR7gGpkZj1 af45RvrTVu7P/V/T/SousJLbgPVH+Lr9IDDzjTCihdy29Y5oUkjrbIKYzijRfMhaF6 QXfvdQIs8/mb7r3D43sFjiDIFbIo8IKaRO4M4KTBrP4C9j8KGZeR8Y0uO5O7WNsovd mu5CO6Dt1cODiYwAGWmHxtscZvYuFgXgz9irEH8lwj7puatQgBdzuDq/jy/fkR0tSt DkfVqCbD1MXlCgVyyplA4oOvDwRkLBAuHEuVhJb11d/LSpzChihyEryyBtI0sjfKGJ 46Z2FtSW6oCvw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NhGj45nyWz9rxD; Tue, 27 Dec 2022 15:08:40 +0100 (CET) From: Ihor Radchenko To: Johan =?utf-8?Q?Bolmsj=C3=B6?= Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] ox-html does not export captions of source blocks without language In-Reply-To: <116c3126-32cc-44d0-9e95-e802161e1e84@app.fastmail.com> References: <116c3126-32cc-44d0-9e95-e802161e1e84@app.fastmail.com> Date: Tue, 27 Dec 2022 14:08:32 +0000 Message-ID: <87zgb90win.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672150179; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=fpu6M4Iio3gyz4DQhaWPEH9qkk3GUEIVzzCPJOPHrDs=; b=YOvGvBvmCHG4vOK5AkL7xPxu12YQu608wpA/qxJTXobzg53HHHvwZMvri0bfkAYe045ynt 3bHCajZsIHXIsBvEzAgv+2IQDNkpkuKRnoPYc1/JdMx7O61DkR1WG5ELkhQUCU0UeaOyIB xEyfVaoNtLmExsUW04ap928TZiZd+fG+58HlAXarxABCeJuhx2dADiAxGTDWardCuVwskQ p28d5AuuacgJuAIUnjmer/4vVGaMrH2XukI6pvhfEYG5iq7V2JapdSi+qJZTxXoxvn8PJJ yEq89LmLhaYPqd0b71dndhXb+gzsuDS8us9MF2Avq++d9xzGWQmQhdiuazlD9w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="k3rqPl/Q"; 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=1672150179; a=rsa-sha256; cv=none; b=gqQUzHP2O6tIMCCeh/zcD7slgyQrebVvx9tpbKYn9v+8Cx0t3a/hVhGpiiGOfkGw4X5B9R ldTBWm093aTNpE0vgPaq9rNOFzW3cCdYvdMfxt5FgLMfv+R7XwOrX3rvkfBj0U2c5gGwZx NOp8s0gS8hWrCRfRm618V+WY7p3VntIG+u+eRwBZa2gutu54/WwOCpO5epPkATAbO3f5zP scclXbeZ9fOjLLfqK/iV1Z0SaRzSZGh5XXWz4kmhrTD5CaOS5rgE/xo62TzzxeqfbpxdqG KYqDeg5kXykgUAYr9Ql4uxjdnktdiaKbf0JhYDTB7jVgxMKeNx8oeD4mP3zp1g== X-Spam-Score: -4.47 X-Migadu-Queue-Id: 548AD1031F Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="k3rqPl/Q"; 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 X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.47 X-TUID: RbnLCziV/trC Johan Bolmsj=C3=B6 writes: > ** Description > > The caption "Caption 1" is not exported by ox-html in the following > source block. > > #+caption: Caption 1 > #+begin_src > foo bar baz > #+end_src > > The caption "Caption 2" is exported by ox-html in the following source > block. > > #+caption: Caption 2 > #+begin_src sh > echo foo bar baz > #+end_src > > ** Expectation > > The caption "Caption 1" is exported just as "Caption 2" is. The plain > text exporter ox-ascii exports both "Caption 1" and "Caption 2". Here is the plan to resolve this issue: 1. We update the manual allowing src blocks to have empty language spec 2. We update org-syntax document 3. We change org-html-src-block to add caption to src blocks without lang 4. We _do not_ treat such src blocks as example blocks. It is because at least ox-html, ox-latex, and ox-ascii never add captions to example blocks. Changing this default may possible, but require further discussion. The existing code already uses separate implementations for example blocks and src blocks with nil lang. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at