From: Ihor Radchenko <yantar92@gmail.com>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [DISCUSSION] Refactoring fontification system
Date: Wed, 08 Jun 2022 10:02:58 +0800 [thread overview]
Message-ID: <874k0vud2l.fsf@localhost> (raw)
In-Reply-To: <t7nvgg$1771$1@ciao.gmane.io>
Max Nikulin <manikulin@gmail.com> 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
next prev parent reply other threads:[~2022-06-08 2:03 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-19 14:12 [DISCUSSION] Refactoring fontification system Ihor Radchenko
2021-11-19 14:18 ` Bruce D'Arcus
2021-11-19 16:09 ` Tim Cross
2021-11-24 22:03 ` Nicolas Goaziou
2022-06-03 9:45 ` Ihor Radchenko
2022-06-03 20:37 ` Ted Reed via General discussions about Org-mode.
2022-06-04 13:45 ` Ihor Radchenko
2022-06-04 23:28 ` Ted Reed via General discussions about Org-mode.
2022-06-03 21:38 ` Tim Cross
2022-06-07 16:48 ` Max Nikulin
2022-06-08 2:02 ` Ihor Radchenko [this message]
2022-06-08 4:23 ` Tom Gillespie
2022-06-08 6:35 ` Tim Cross
2022-06-09 15:31 ` Max Nikulin
2022-06-10 2:06 ` [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system) Ihor Radchenko
2022-06-15 3:40 ` Max Nikulin
2022-06-16 12:31 ` Ihor Radchenko
2022-06-16 12:33 ` [BUG] Unescaped #+ lines in WORG example blocks (was: [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system)) Ihor Radchenko
2022-06-16 16:33 ` Tim Cross
2024-04-15 13:44 ` Ihor Radchenko
2022-06-16 15:08 ` [DISCUSSION] Refactoring fontification system Max Nikulin
2022-06-08 6:52 ` Phil Estival
2023-05-30 11:25 ` [RFC] Refactoring org-element API (was: [DISCUSSION] Refactoring fontification system) Ihor Radchenko
2023-05-30 11:32 ` Ihor Radchenko
2023-05-30 15:00 ` [RFC] Refactoring org-element API Stefan Nobis
2023-05-31 8:57 ` Ihor Radchenko
2023-06-23 12:20 ` Ihor Radchenko
2023-06-30 13:53 ` Ihor Radchenko
2023-07-01 11:44 ` [RFC] Refactoring org-element API (was: [DISCUSSION] Refactoring fontification system) Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874k0vud2l.fsf@localhost \
--to=yantar92@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=manikulin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.