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 AN9wN6UzomJ7agEAbAwnHQ (envelope-from ) for ; Thu, 09 Jun 2022 19:53:42 +0200 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 aFyCNqUzomL0vgAAG6o9tA (envelope-from ) for ; Thu, 09 Jun 2022 19:53:41 +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 84EC0BD07 for ; Thu, 9 Jun 2022 19:53:41 +0200 (CEST) Received: from localhost ([::1]:51562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzLYh-00066i-1z for larch@yhetil.org; Thu, 09 Jun 2022 13:02:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzK87-0005Pr-DF for emacs-orgmode@gnu.org; Thu, 09 Jun 2022 11:31:27 -0400 Received: from ciao.gmane.io ([116.202.254.214]:53870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzK85-0001s7-Me for emacs-orgmode@gnu.org; Thu, 09 Jun 2022 11:31:27 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nzK82-0005Cu-MI for emacs-orgmode@gnu.org; Thu, 09 Jun 2022 17:31:22 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: [DISCUSSION] Refactoring fontification system Date: Thu, 9 Jun 2022 22:31:09 +0700 Message-ID: References: <87ee7c9quk.fsf@localhost> <87k09ycc7n.fsf@localhost> <874k0vud2l.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:91.0) Gecko/20100101 Thunderbird/91.9.1 Content-Language: en-US In-Reply-To: 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: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" 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=1654797221; 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=gsyCmMDsU5gTzYB2O8l6Qyio99ESNzJHrIrQspDqiT0=; b=G1mh/qpReXsblktXwZG72AybahNi+rWKUDNLv8q3PmQ2nxGEGQItCzOg47aDnVXvGbBvIy l6WlYno+14Fzliwby13lqiE/Zgb2qpYfdpcGFTROeTuYW7gqm9GI6w+WyZ+mYjehKfuI/1 fESGNKnYMQX0eaIpfDEZmhvSuiHOshbuXxVx0ns1JwHHB5tqPkq2X/Ww4qPcFzCmIuE+P8 M2RUE+yuDrxy1dUds6I5CHcwItgg1cZ6Lz3luQxeWhB/+GOthVEeKt5YaKHiEKdKetVuev pVz9EH+382jBffMbfTcYpv01woAcaOaCgpUuuvgYnNPD6aNWHhsTcqIgb0dZxA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654797221; a=rsa-sha256; cv=none; b=sojMPY9tNmyWWgYwgQwizpwqxDutWVMjtwQmENua96Zug8XFUWrrVJlSwAjV8rXY6xP+nY 1Igm3cMjTgw76dg6BGgkAwRFexWghOYGBraNMCMtjfJ1cKGVOC4vfGBlHGe2dY4wlJRKon Jwfr6YcRTEsthOEnczqo1jU9sjbwqY7y6ALpMqMA0U6Aeexns8XV8D0Tja1kJ9uX97k5RN gTy+/D3XwCbHh/tGkwHtFeejJKURZ3zemsGnq3Au6nrwC9fNPQrWZP1UpEafcewPPkiAwI 1ifAp58RSYAax2iES5IPYhtFJp1pexrJXkMqtemgihrZ48O31XEDRhIgTFYaqw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=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" X-Migadu-Spam-Score: 4.20 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=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" X-Migadu-Queue-Id: 84EC0BD07 X-Spam-Score: 4.20 X-Migadu-Scanner: scn1.migadu.com X-TUID: RYKISVY+jXcu On 08/06/2022 11:23, Tom Gillespie wrote: >> As for lang parameter support in example blocks, would you mind creating >> a separate feature request thread? Extending export blocks export will >> require changing in parser syntax and thus should be discussed carefully >> in a separate thread. > > I would strongly caution against allowing an optional #+begin_example lang > syntax. It will lead to extreme confusion, even when users know to use org-lint. > The reason for this is that example blocks do not have (and frankly should not > have) full org-babel support. Babel is already complex enough as is without > having to explain to a user that yes they can noweb an example block into > a src block, but that they cannot noweb a source block into an example block. My expectation is that treating #+begin_example almost as #+begin_src will simplify code. E.g. `org-latex-src-block' has a fallback to plain \begin{verbatim} if language is unknown or is not specified, so it may handle examples as well. The difference is that for #+begin_example evaluation and noweb are disabled, either it is hardcoded (my preference) or default values for :noweb and :eval header argument are adjusted. On 09/06/2022 12:37, Pedro Andres Aranda Gutierrez wrote: > OK, just to add to the discussion. The original intent of my message was > to give _me_ control over what I want to colour, not delegating that to > the fontifying engine in Emacs. > > I need limited and controlled colouring for text-books and lab manuals > where colouring elements of a listing goes against the publishing > standards. I only need custom colouring to "emulate" terminal output, > not for the code as such. And I could do that with the #+ATTR: if supported. Fontification and an attribute to specify an option for environment are independent features. My point is that if example and src blocks reused the same code than it would be enough to implement :options attribute (similar to #+begin_quote) once and both types of blocks would be more flexible. If #+begin_example becomes more dumb, unsure if it is reasonable to allow to generate "\begin{verbatim}[commandchars=\\\{\}]" for example block but not for source blocks. Side note: I can not say that #+begin_example with language is widely used, but one case may be found in org-manual.org and a dozen in worg.