From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 yEIbArbWnWNrUQAAbAwnHQ (envelope-from ) for ; Sat, 17 Dec 2022 15:48:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id oAEmAbbWnWNbMAAAG6o9tA (envelope-from ) for ; Sat, 17 Dec 2022 15:48:22 +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 A7C44BBF5 for ; Sat, 17 Dec 2022 15:48:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6YTP-0005K9-6f; Sat, 17 Dec 2022 09:47:35 -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 1p6YTN-0005Ji-H5 for emacs-orgmode@gnu.org; Sat, 17 Dec 2022 09:47:33 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6YTL-0006nE-TK for emacs-orgmode@gnu.org; Sat, 17 Dec 2022 09:47:33 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1p6YTH-0009AO-Qf for emacs-orgmode@gnu.org; Sat, 17 Dec 2022 15:47:27 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? Date: Sat, 17 Dec 2022 21:47:18 +0700 Message-ID: References: <116c3126-32cc-44d0-9e95-e802161e1e84@app.fastmail.com> <87fsdhui6z.fsf@localhost> <86pmckvisp.fsf@gmail.com> <878rj8u2na.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US In-Reply-To: <878rj8u2na.fsf@localhost> Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 26 X-Spam_score: 2.6 X-Spam_bar: ++ X-Spam_report: (2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671288501; a=rsa-sha256; cv=none; b=CzsuNe3JGptdQY3BnGFu+Hn9odlGpLZ+d/p2V4sze58gxzcFa/NOgThg3pt/BfkIV1sUHk Qf51xcvgmBx3uJxrWBIztqWH7y9PFIaFLzUzjjuPEF7mSyuJMzUEQi9b1HeZ39tu6vK32j rK7CzZNtTirQnkLVGef99Vd7rTy50xUV6w2dhTqNVZpOjQRYIBdeZNGye9mcpqyv7zN3pO JkbrdxKD7+50pAZNwbjbpdIuCtMYQlT5Dd4u8fpxtg5LKlDPHdBPPZaxfc89im6Yzz0cjN MQUge8gTm95KriNORjwUNCzYviT+EVxbSMFc/mp9rb/TZByWQp81z5v5/43wTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671288501; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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; bh=Ruu6435P5tUc+Fk/NeYmCz8qFRCFojNlWSMKgxLJh0k=; b=QGqAkXLNYNahdVVWpYYf+Ai6zymyxerrdLEfIriMBUqnHBKyF742HRQs8BT8ZZ95dFLFxq 04fw0CcbpXZIOwt9Gz1cNYJIpzcC+lAQUBUMB1hCPaMEiuA+gtVszfIOplgyJyXgZ6fb9B PcW7jwZgkB6tInf/cWnhjTWBsTwxNbX6lyfdu5XueytxL5LM9VIbdITcufzjujT0PZ5XWq vD70/dddnYW6npP+rgyc6Q0jGpv6bY7LkeEl57vE/uSrLdRqmWU+kT+28OxEBbFgcj/fb3 MtvG/EdEwGxHXr2jehQKR6OdqPK7thnfNH+gi1d8qUsFI3dC02gQaMFKCLhPeg== Authentication-Results: aspmx1.migadu.com; dkim=none; 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=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none) X-Migadu-Spam-Score: 0.32 X-Spam-Score: 0.32 X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: A7C44BBF5 X-TUID: hadAmxCNGtWk On 15/12/2022 22:07, Ihor Radchenko wrote: > Tim Cross writes: >> I don't see any reason not to allow captions for examples either. > > In LaTeX, example blocks are exported as verbatim. I am not sure if we > can even put captions into verbatim. The default backend for source blocks is verbatim as well: ---- >8 ---- org ---- #+caption: Minimal C program #+begin_src c void main() { return 0; } #+end_src ---- 8< ---- org ---- ---- >8 ---- latex ---- \begin{verbatim} void main() { return 0; } \end{verbatim} \captionof{figure}{Minimal C program} ---- 8< ---- latex ---- So I do not see a problem to support captions for example blocks. Perhaps page break may happen before the caption, but it is another issue. You might remember my vote for the symmetry "#+begin_example lang" as "#+begin_src lang :eval never :noweb no" and Tom's one against it in the following thread: https://list.orgmode.org/874k0vud2l.fsf@localhost/ Re: [DISCUSSION] Refactoring fontification system. Wed, 08 Jun 2022 10:02:58 +0800 > Max Nikulin writes: >> Source blocks without language may be treated as #+begin_example blocks. >> I believe, a warning should be issued in such case. > > M-x org-lint already does it. From time to time I write about warnings during export, tangle, etc. I would not mind if you just ignore it. From my point of view, the following should be convenient, however I am unsure if it may be implemented in non-disturbing way. Exporter may issue warnings, they are collected and presented to user in a temporary window with buffer names and line numbers as in compilation-minor-mode. The user may see that something goes wrong, but if their does not switch to the warnings window then it disappears. It would be great if exporters and lint share code generating warnings. Another issue that mature development tools usually allows to suppress particular warning for a specific line. It may be a problem taking into account specific of Org syntax. As to `org-lint', I believe, it is hard to discover for new users and there should be a reason to run it. It easy to forget about it even when some problem is faced. It is mentioned in the manual, but - https://orgmode.org/manual/Feedback.html does not request to run org-lint before reporting a bug - `org-submit-bug-report' neither suggest `org-lint' nor runs it as a check. Likely it should be suppressed (with appropriate report) for large buffers. P.S. I have accidentally noticed a suspicious line. I have not tried if it is real bug, but in `org-latex-make-preamble' I expect a property obtained from the INFO argument, not global variable: lisp/ox-latex.el:2014: (when (and (eq org-latex-src-block-backend 'engraved)