From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id XTcvJ2MDoGJPawEAbAwnHQ (envelope-from ) for ; Wed, 08 Jun 2022 04:03:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KG85JWMDoGKFOwAAG6o9tA (envelope-from ) for ; Wed, 08 Jun 2022 04:03:15 +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 2359525590 for ; Wed, 8 Jun 2022 04:03:14 +0200 (CEST) Received: from localhost ([::1]:50136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyl2O-0006mH-EW for larch@yhetil.org; Tue, 07 Jun 2022 22:03:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyl1c-0006lu-J0 for emacs-orgmode@gnu.org; Tue, 07 Jun 2022 22:02:24 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:41866) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyl1a-000638-Rs for emacs-orgmode@gnu.org; Tue, 07 Jun 2022 22:02:24 -0400 Received: by mail-pf1-x42c.google.com with SMTP id p8so17081922pfh.8 for ; Tue, 07 Jun 2022 19:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=v9EH55LcwqRWS9XXR/sR3vKZAooLZ251k//ThNgJCIs=; b=dDXW3EXxuqDzHaK2YFYwxFZmMj/GZNp9W1sMUOoL4x++Yb3R+HGlG9p4hLkMoOLTfx DeR5SYySf81T6h5xHDCGArIlWQUMm4guOTxotWp/piLbpvY2NUKvcbc3bu3XN238PNMy q8JX62/fpaRmAbwrJi366s5m/UfvZSTbUDWIfIvq4F2gBEMEpruDhhbnRTsSpjIi1Okz I2rWlcI3XAfjPk53yM8u/JzVRmCjJeeZJu80/pr9vxe/+F1Bfysv0HIajria4pSSyBfl 6PGKyq45eZ/c66i0lRFy4735qppQUlfrfQHsOJEYPALpAkl5d3TbAN6j6X3rAJdb4CqV grcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=v9EH55LcwqRWS9XXR/sR3vKZAooLZ251k//ThNgJCIs=; b=AlGjKs/SKTBcfOjSaKSKuZPLe2IZJPPAc3IfE0qF48T7AiwxBFlSZscRMQBK/Z7p3e MNqmXUadm05FQu7NCvGHH7PKD+JIiWqH/C5Hkrw5I8pHDmQ//3YV90kFXAaMdzictFsP dNEyj5lEpCaLQ5V/gPJF1hV37NatS4gmVy8JOznlrhYF1KG1ql8TGUwZ80vMI4FaVICJ v5cIQXsw+np2GtB9J3GUyg/H90muL9qwAJbW6YmFPWBpjvr3PW/gfejNxbShNoKZdlgL lcXcMQxdrynZ6tJD0CnsV6jfTX64y0aqrbT98bUIB+7pE0rWD+P16QMNh7mg760ATnGQ bxnA== X-Gm-Message-State: AOAM530qiKStCwjmJfomuc0+TRQH5iCN4a9ILHOR3nip07XKrO1TaK8/ s8V3NH0LD0SGE1GA7/aIQ0Z5Mxgc+RcKzg== X-Google-Smtp-Source: ABdhPJzQ81J8TZKr4vuaVaWhES+ZQQilh3b8Of30hxWqoggn4o/GJtsUHCXosAiApVUj/sGQzkqeuw== X-Received: by 2002:a05:6a00:170c:b0:51b:f057:85c2 with SMTP id h12-20020a056a00170c00b0051bf05785c2mr21528374pfc.18.1654653741290; Tue, 07 Jun 2022 19:02:21 -0700 (PDT) Received: from localhost ([64.32.23.62]) by smtp.gmail.com with ESMTPSA id h12-20020a63f90c000000b003c14af50617sm6595584pgi.47.2022.06.07.19.02.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 19:02:20 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [DISCUSSION] Refactoring fontification system In-Reply-To: References: <87ee7c9quk.fsf@localhost> <87k09ycc7n.fsf@localhost> Date: Wed, 08 Jun 2022 10:02:58 +0800 Message-ID: <874k0vud2l.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=yantar92@gmail.com; helo=mail-pf1-x42c.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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=1654653795; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=v9EH55LcwqRWS9XXR/sR3vKZAooLZ251k//ThNgJCIs=; b=ZVzS89hgdg4midtWvBiKIahY5+BT47fTpWoP2EcQR9nZpducDokREwggStRQWMu1vGQP8M SADzrgfPTXD2cqI9NgFyhc3qqq1CMLnIe10HRfweOe0cjqwHyeuCZlekflDtQEHOKCbCI3 MB0GfhroRKYtolgdO+bGJqLWCAf4yTOWIcsURa+wVdGf2NpNWYXDg8bIaqvyUejsS5DGXV 907fsem/370RQBGJxxp+Po2N8rip/Paoto2Ed554f58qENYilY739Qbu3Nh2/4zFVXet++ op0B4bc22P7A9T3/8hGlaoxAPls86kocHW0XA2Q1dUEH9rfB0yFMWBc6Li0yRA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654653795; a=rsa-sha256; cv=none; b=Kq1VJenlZnRCJZNwocOks7sySy274W/yOTqjEhcGN4aJfd2nkldjk+Lrh7oRQ2+o/zoNbd V7K/XlwzukL27mth+z2IYf+xp07pR9/dsog+UcrWIIcgRisZLH6nja6TeCm9qf3AXWwCcn EMXJfEI7WCklwuSZGPvdpmND29zrKaSznKDeq26QTe3sGSups9kkFE8+dM4VWQNSXxIKgY IughXsvQpccRgpOshE4QHN9Iw63u0vyHqjh0bZ/h8Q/HzpuuOI7We6Eq2BbyiG4+gnMxt3 uPaZMUKvlFALXpP+Gzdg5GkxQBv74DK0FSE4sxriw1RMPK0uaEwvZxV43zKvLg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=dDXW3EXx; dmarc=pass (policy=none) header.from=gmail.com; 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: -9.30 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=dDXW3EXx; dmarc=pass (policy=none) header.from=gmail.com; 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: 2359525590 X-Spam-Score: -9.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: /fpwO600ON+7 Max Nikulin writes: > On 03/06/2022 16:45, Ihor Radchenko wrote: >> >> 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? > > I have a lot of #+begin_example with language in my notes. In the > beginning I accidentally discovered that code is highlighted accordingly > to language syntax, so I continued to use this feature for snippets that > are not intended to be evaluated. Later it was a bad surprise that > export does not preserves highlights. So for me #+begin_example is a > shortcut for #+begin_src with :eval never (that can be specified as a > property). > > From my point of view exporters may reuse code block formatters for > examples. It would allow to pass options to e.g. LaTeX verbatim environment: > Pedro Andres Aranda Gutierrez. Re: A question/bug report(?) Wed, 30 Mar > 2022 07:14:54 +0200 > https://list.orgmode.org/orgmode/CAO48Bk_dJs1=5zgpcZwODaTsRqyRsKq1ALj6WpaXCc4bDjW3FQ@mail.gmail.com/ Among other goals, the new fontification is aiming to avoid such bad surprises. 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. >> 2. org-script-display is an internal auxiliary variable used to display >> sub/superscripts. Note that it's default value holds 4 possibilities. >> Two for each type of script. For example, for superscripts we have >> two options: >> ((raise 0.3) (height 0.7)) and ((raise 0.5)) >> The first one looks more compact (does not change the line height) > > Notice that subscript still increases inter-line space a bit. Can you (and other interested users) try the following value of org-script-display and let me know if it looks acceptable: (defconst org-script-display '(;; The values are tweaked to not change ;; the line height. ((raise -0.1) (height 0.7)) ((raise 0.25) (height 0.7)) ;; Alternative properties for tables. ;; FIXME: We cannot change the text ;; height because it will alter the ;; symbol width and thus break the ;; table alignment (at least, until ;; org table are aligned via pixel ;; width). ((raise -0.5)) ((raise 0.5))) "Display properties for showing superscripts and subscripts.") >> However, it currently uses x1.5 line height for tables creating empty >> space between vertical | separators. It looks like a typo for me. It >> would make more sense to make table lines compact, not vice versa. Am >> I missing something? > > git blame gives 0618aeafb39dbf78e753348eaeaddbb7f8104cd0 > It seems smaller font breaks horizontal alignment in tables. Thanks! Now it is crystal clear what was the reason behind the different fontification inside/outside the tables. I will add the explanation to comments. Best, Ihor