From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 OGjzKqhymmIMigAAbAwnHQ (envelope-from ) for ; Fri, 03 Jun 2022 22:44:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EMuzKqhymmKPeAEAauVa8A (envelope-from ) for ; Fri, 03 Jun 2022 22:44:24 +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 62E3F10272 for ; Fri, 3 Jun 2022 22:44:24 +0200 (CEST) Received: from localhost ([::1]:52758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nxE9f-0007qx-0U for larch@yhetil.org; Fri, 03 Jun 2022 16:44:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxE8P-0007qa-Of for emacs-orgmode@gnu.org; Fri, 03 Jun 2022 16:43:05 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:59334) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxE8N-0001CK-Ox for emacs-orgmode@gnu.org; Fri, 03 Jun 2022 16:43:05 -0400 DKIM-Signature: a=rsa-sha256; b=qyF9wf1ITAvAlPkg2MKI+GuIk8opDEly+fq+KINH0Wy25e3exd/r6KMub2M7EJ5TkOyJC1KlLnoKr2UWpC3+FIe2A5Ro73Y3PPpJufeCqX/JP02vj8qI2hJFQkbB/Jr2+GMRFpIX8K28lHgXmD7gfZvU3mC6EcGwAJ2Kp4jBC3463wDp2NAc3vt5C5rig9+6TOkYVn7s1+nFD/aazDD6BkmDL4+YKD5xqjKlengy5NjPjeNQ0x4ZvbL7OGsRnnRrmJ5P6hIRZ5Et8iMaXQWsi0aEZ6gezodKkkv941FpfH0dYXRincrZSaC7MdjZdOTvxjdpeEzuno3kTg5DOPIjLQ==; s=purelymail1; d=zenithia.net; v=1; bh=np2xg4s2k6sb1vyg4ewNSfDn5rzKGXTdQ2VaAysJCMo=; h=Received:From:To; DKIM-Signature: a=rsa-sha256; b=NmM5E2yemC1aMGuk8XBF/vKeQx035g5+2cS/FiyyZvuHp7w2Yc07JRcy+vZqes6pZwOCn25jnF9cMOXX+M1Wbl0+mjjesCEWyR4a+mhTEGMdF9CnD3e3v/dneIEPzUdlS96URV5qSw40tIoRjR68bHw8nk441AqA9mhIFtm58cx1vUw8whFk1SHA+glfei2E/2jjHPWjm6IZovoexhzKYmWFp0WglfnExEQh/+BdSOZ8gU5q/Aq73dNBzFrv7Yb2MR5HNYgxER9Xq0nWkskzduOUHaqSZ6WgEj6LCPR1o+bLTO5fv5V7aIpHbqA3zzH3QoIERTLVgdk87pE1uKodAg==; s=purelymail1; d=purelymail.com; v=1; bh=np2xg4s2k6sb1vyg4ewNSfDn5rzKGXTdQ2VaAysJCMo=; h=Feedback-ID:Received:From:To; Feedback-ID: 3221:913:null:purelymail X-Pm-Original-To: emacs-orgmode@gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1893895741; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 03 Jun 2022 20:42:47 +0000 (UTC) References: <87ee7c9quk.fsf@localhost> <87k09ycc7n.fsf@localhost> User-agent: mu4e 1.6.10; emacs 28.1 To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [DISCUSSION] Refactoring fontification system Date: Fri, 03 Jun 2022 13:37:41 -0700 In-reply-to: <87k09ycc7n.fsf@localhost> Message-ID: <875ylh5vi1.fsf@zenithia.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=34.202.193.197; envelope-from=treed@zenithia.net; helo=sendmail.purelymail.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-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" Reply-to: Ted Reed From: Ted Reed via "General discussions about Org-mode." 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=1654289064; h=from:from:sender:sender:reply-to: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=aFTJN6B89mt/E8oP4NhqLGd2/6+ukJCmJoGzPX6ah4Q=; b=NPAaipBDqVm8WxFuDLUc9MCOjYQkPVWsJvYXxQkQGKxOYsUVLRz2V4FmzQoUsypC+7Hv/E Oslf9PjLbAI+0a4Zwp+WwnxzabEVQqzPoU5KuujMg9YmPHa7/dCuc9i2KzE/+fSb+cM0e4 jnsFGcPayH4Dbn+LTb9zVm8HWtKDCIQhBTx87y2BvWV31A7Tm1AdA4it2s9vNPqUBQcdzN EZ9+hDi9iz9mUCRXLjHBJIeR+C/IYwJXhmEBXC5qn79+dTdcHcb1LSfM19VjkjKfn/30my BGHty3xYZC3stf+i077y0t1Juw+tumW5uNVhFYDyWoW4FKy+HQ+XO6gUm1lIRQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654289064; a=rsa-sha256; cv=none; b=Nq7lMvqY3xsz3VMIy9oMinNYUNE7p4GS+QPCLO1VkV0naGPVjlOzsK4c1xuHM+ogAtF/UJ OBkHZP/a/F5ubGu2C1Qq/2qbXYv7RVPoVVxK4TL4Ch7w+bXvgwx+fO1nG+Wc7gPWQTM0nw JC+ixSmFuZ9I2o2ZBWdz0tD1pEcVnwXXvvgRi4pcD+EX0VK3Ipuyldz3tgNThG7J8zo3RX k1e6wPFCY6LOjUE/9BLEArF9LHb1quo4kEm6OQEDvIxHzaiFw/Nq59GMwlYCTd80XsOuEh jwVHySrTyt7eNLTsSyH8nSoosEWAgEVixQYJr2rhImVW9PF01UmB4of4CJAsqw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=zenithia.net header.s=purelymail1 header.b=qyF9wf1I; dkim=fail ("headers rsa verify failed") header.d=purelymail.com header.s=purelymail1 header.b=NmM5E2ye; dmarc=pass (policy=none) header.from=gnu.org; 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: -1.82 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=zenithia.net header.s=purelymail1 header.b=qyF9wf1I; dkim=fail ("headers rsa verify failed") header.d=purelymail.com header.s=purelymail1 header.b=NmM5E2ye; dmarc=pass (policy=none) header.from=gnu.org; 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: 62E3F10272 X-Spam-Score: -1.82 X-Migadu-Scanner: scn0.migadu.com X-TUID: APplpEoB6rfo Ihor Radchenko writes: > 1. org-protecting-blocks is an internal auxiliary variable used to > determine which blocks should be fontified using different major > mode. > It's value is ("src" "example" "export") > So, #+begin_src lang and #+begin_export lang are fontified according > to LANG. Makes sense. > However, what about #+begin_example? > org-element-example-block-parser does not appear to expect language > specification in the example blocks. Only switches seems to be > allowed. Am I missing something and Org actually allows example > blocks to specify language? Or was it the case in the distant past > versions of Org? > Speaking as a user, I've used fontified example blocks for json responses when using ob-http: #+begin_src http :pretty :wrap example json GET http://es-master.service.consul:9200/_cluster/settings?pretty #+end_src #+RESULTS: #+begin_example json { "persistent": { "cluster": { "routing": { "allocation": { "node_concurrent_incoming_recoveries": "20", "enable": "all", "node_concurrent_outgoing_recoveries": "20" } } }, "xpack": { "monitoring": { "collection": { "enabled": "true" } } } }, "transient": {} } #+end_example In this case, ob-http seems to default to generating example blocks. I realized I could add a bit there to get it to fontify as JSON. I'm unsure if this is correct usage or merely a side effect, or if there's a better block to be using for this purpose, but I figured I could at least contribute a user report about this feature. I'm on org-mode 9.5.3 if that matters. -- Ted Reed