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 AH/QAPBHoGIxcwEAbAwnHQ (envelope-from ) for ; Wed, 08 Jun 2022 08:55:44 +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 iEeeAPBHoGJT9QAAauVa8A (envelope-from ) for ; Wed, 08 Jun 2022 08:55:44 +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 8D82812D88 for ; Wed, 8 Jun 2022 08:55:43 +0200 (CEST) Received: from localhost ([::1]:38324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nypbS-0004IJ-MA for larch@yhetil.org; Wed, 08 Jun 2022 02:55:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nypYY-0004G2-E6 for emacs-orgmode@gnu.org; Wed, 08 Jun 2022 02:52:42 -0400 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]:34005) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nypYW-0007Kw-4v for emacs-orgmode@gnu.org; Wed, 08 Jun 2022 02:52:42 -0400 Received: (Authenticated sender: pe@7d.nz) by mail.gandi.net (Postfix) with ESMTPSA id 7A02A240002; Wed, 8 Jun 2022 06:52:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=7d.nz; s=gm1; t=1654671156; h=from:from: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; bh=k64lDD9HHn+OIJawJ6SgfwJcuP+Opob+DqdIxWmfWpE=; b=pG8q8VNLLrXdy4cBh949hRk17AyyYiGkz4m9ROpT1wrXK1cfABAYF8XA+wraObUK7FO36f znLTcTs2nrhjeeYFFvyFb5IA6CqIf/FHKXWa8I7veGuLqmXeP8j0x6/NAfDsIMAT3fd+7V HmzuvSNmRQMbOMK0LAQEj1aDdFjh7p4hnnbl0ZD1Vod7A5RTHMJtKOIr4mqi2A/dp0LfPz XU6ZfShD64njNg1f/k8IjokwbGfjXS54wQWvWx27p/j53i71J1zrTAJ7U3eMjYlk4gWscD QtwT5aMGF+b+uJfDvgm7OEDvL2psZ5ZbOU1XL4bDka5fFF7Oz13YORCSr/OKXg== Message-ID: Date: Wed, 8 Jun 2022 08:52:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 From: Phil Estival Subject: Re: [DISCUSSION] Refactoring fontification system To: yantar92@gmail.com References: <87ee7c9quk.fsf@localhost> <87k09ycc7n.fsf@localhost> Content-Language: en-US Cc: emacs-orgmode@gnu.org In-Reply-To: <87k09ycc7n.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2001:4b98:dc4:8::221; envelope-from=pe@7d.nz; helo=relay1-d.mail.gandi.net 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, NICE_REPLY_A=-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" 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=1654671343; 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=k64lDD9HHn+OIJawJ6SgfwJcuP+Opob+DqdIxWmfWpE=; b=ilhFYafOMXiQR+Bxhik8H+ENHCcBQc3ZnlzjNyN4FXTtyMR4BYwm3H8Laj727aeYqxS/DA sD/fzU4KmdhiTKLKY3RaygtpGZivYm0FrmDFkFTqUoMCyhmtVPe8i6wudVsHBxIATwjIPY pR0tkdpfcsiB5wQxALWujc6CTK4tLpkz03mQ5HYK3Qr6as6lQg1JFllv4xE131ECPs3KW4 dHGx0NjOreegegmvb/0oK3zKBM3J1G2OHa9zdv1PeZVT9godDJ6AXoaURXQf6IYWxXBm2D KEqWav9N0cfyq6ZRy2CLToW8dpnKpix3r42mT7yCsqoqpu5e/oJkZdhA5vld7w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654671343; a=rsa-sha256; cv=none; b=QuRyxHPUpjM+X7Tovdwb1RgsFGwd6lUcGTFbxPkebK+DozacR13+tmnYL/+fby3GszW+lZ jaVBbpjHncfdqb40KV+enxJOQHOUfqxn/1TBmxOEZtiLCiaPmzspwv9u9oUBbskG3FQXE5 kYnXdd6w19dsDR3uDGPUvOzx0xHwiy4bj5W65bFYOl+syk7Q8DBwz5u0LZ80/S4Z53497K aLbnw9cCk4gYvTgDWABwTRZIvuPpPvYmgIGboYhcxuuDjSXMuCCiZqCZ/H6uRpbjr9EZ95 GQ2Ze+7HD2Orfit9rH6/VTPQpFNEnO7Qkg/phaagnOXiE/OWHX3Z2YEpAnsRFQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=7d.nz header.s=gm1 header.b=pG8q8VNL; dmarc=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: -3.51 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=7d.nz header.s=gm1 header.b=pG8q8VNL; dmarc=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: 8D82812D88 X-Spam-Score: -3.51 X-Migadu-Scanner: scn0.migadu.com X-TUID: x3uwGqu/avd8 [2022-06-03 Wed 11:45] Ihor Radchenko : > > I'd like to hear if anyone has any idea on how to interpret the > following: > > 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?  - org-fontify-meta-lines-and-blocks-1    is looking for begin_    what comes after (src) is optional and can be anything    Next it looks for "language" (match-string 5 to 7    — it could be helpful to have comments indicating    the number matching of the groups next to them).    What gets fontified like a source block turns out to be:    ,#+begin_{\w} [
]    So this is fontified:    #+begin_quote python    def sss(): pass    #+end_quote    and this too:    #+begin_fly awk    BEGIN { woosh }    #+end_fly    Which is nice, but not interpreted like so    by any export backend. > > 3. org-fontify-meta-lines-and-blocks-1 creates a special face for >    ("+title:" "+subtitle:" "+author:" "+email:" "+date:") >    The face name is org-document-info. >    But what about, say, +description: or +language:? >    Would it make more sense to fontify all the keywords from >    org-options-keywords instead? > Makes more sense, yes. I would have named them "directives" rather than "keywords", but it's too late now. Regards, Phil