all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, emacs-devel@gnu.org
Subject: Re: font-lock-fontify-block
Date: Thu, 11 Mar 2021 17:14:02 -0500	[thread overview]
Message-ID: <jwvv99xjqep.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <831rclmoy0.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 11 Mar 2021 22:10:31 +0200")

>> Do you have some general idea of what are the most common reasons for
>> the temporary mis-fontification?
>> AFAIK usually misfontifications aren't temporary unless they're linked
>> to some multiline element, most commonly an unclosed string or comment
>> and those should get fixed automatically after a short delay.
> Probably.  But also when fontification is highly context-dependent, I
> think.

Hmm... I winder what those situations are like.
If/when you can think of examples, that would be very helpful, thanks.

>> So is it the case that the cases where you needed `M-o M-o` would
>> fix themselves after a short delay anyway (I'm OK with keeping such
>> a command for the case you don't want to wait, I'm just trying to
>> understand what it is that `M-o M-o` corrects).
> No, in most cases where I used it, the delay isn't short.  More like
> infinite.

So they really correspond to what I would consider as bugs (some of
which might be known and we don't really know how to fix).

>> Would you be OK with the idea of deprecating the use of
>> `font-lock-fontify-block' for the specific case where font-lock is
>> not enabled?
> I only ever use it in that case to _remove_ the faces from text yanked
> from a fontified buffer.  So that's another important use case for
> M-o M-o.

Oh, that never occurred to me.  I generally just "live with it".

>> Also, I suspect that for your use case, we could have a general
>> "refresh" command, which just calls `font-lock-flush`, which would not
>> depend on the ill-defined notion of "block" (and wouldn't mess with the
>> mark).
>
> I'd have to use it for a while to have an opinion.

For the "yank into text-mode" case, I guess we'd still need to limit the
effect, either via the use of the notion of "block" or by requiring to
select a region.


        Stefan




  parent reply	other threads:[~2021-03-11 22:14 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 18:40 'M-o' ('facemap-keymap') has now been removed until March 10th 2021 Lars Ingebrigtsen
2021-02-10 19:14 ` Alan Mackenzie
2021-02-10 19:19   ` Lars Ingebrigtsen
2021-02-10 19:38     ` Lars Ingebrigtsen
2021-02-10 19:47       ` Alan Mackenzie
2021-02-11 13:34 ` Richard Stallman
2021-03-11 16:27 ` Lars Ingebrigtsen
2021-03-11 16:53   ` Eli Zaretskii
2021-03-11 17:02     ` Gregory Heytings
2021-03-11 17:29       ` Eli Zaretskii
2021-03-12 12:09       ` Filipp Gunbin
2021-03-12 12:46         ` Gregory Heytings
2021-03-11 17:12     ` font-lock-fontify-block (was: 'M-o' ('facemap-keymap') has now been removed until March 10th 2021) Stefan Monnier
2021-03-11 17:34       ` Eli Zaretskii
2021-03-11 17:52         ` font-lock-fontify-block Stefan Monnier
2021-03-11 18:17           ` font-lock-fontify-block Gregory Heytings
2021-03-11 18:31             ` font-lock-fontify-block Stefan Monnier
2021-03-11 19:25               ` font-lock-fontify-block Gregory Heytings
2021-03-11 19:45                 ` font-lock-fontify-block Stefan Monnier
2021-03-11 20:19                   ` font-lock-fontify-block Gregory Heytings
2021-03-12  7:54                   ` font-lock-fontify-block Gregory Heytings
2021-03-12 14:01                     ` font-lock-fontify-block Stefan Monnier
2021-03-12 14:23                       ` font-lock-fontify-block Gregory Heytings
2021-03-12 14:58                         ` font-lock-fontify-block Stefan Monnier
2021-03-12 15:20                           ` font-lock-fontify-block Gregory Heytings
2021-03-12 16:01                             ` font-lock-fontify-block Stefan Monnier
2021-03-12 16:09                               ` font-lock-fontify-block Gregory Heytings
2021-03-12 16:39                                 ` font-lock-fontify-block Stefan Monnier
2021-03-12 16:53                                   ` font-lock-fontify-block Gregory Heytings
2021-03-12 17:23                                     ` font-lock-fontify-block Stefan Monnier
2021-03-12 17:50                                       ` font-lock-fontify-block Gregory Heytings
2021-03-12 17:59                                         ` font-lock-fontify-block Stefan Monnier
2021-03-12 18:19                                           ` font-lock-fontify-block Gregory Heytings
2021-03-12 21:59                                             ` font-lock-fontify-block Stefan Monnier
2021-03-12 22:09                                               ` font-lock-fontify-block Gregory Heytings
2021-03-13  0:08                                                 ` font-lock-fontify-block Stefan Monnier
2021-03-13  8:15                                                   ` font-lock-fontify-block Gregory Heytings
2021-03-11 20:10           ` font-lock-fontify-block Eli Zaretskii
2021-03-11 20:19             ` font-lock-fontify-block Eli Zaretskii
2021-03-11 20:25               ` font-lock-fontify-block Lars Ingebrigtsen
2021-03-11 21:57               ` font-lock-fontify-block Gregory Heytings
2021-03-12  7:20                 ` font-lock-fontify-block Eli Zaretskii
2021-03-12  8:28                   ` font-lock-fontify-block Gregory Heytings
2021-03-12 12:34                     ` font-lock-fontify-block Eli Zaretskii
2021-03-12 12:43                       ` font-lock-fontify-block Gregory Heytings
2021-03-12 12:56                         ` font-lock-fontify-block Eli Zaretskii
2021-03-12 13:07                           ` font-lock-fontify-block tomas
2021-03-12 13:11                             ` font-lock-fontify-block Eli Zaretskii
2021-03-12 13:20                               ` font-lock-fontify-block tomas
2021-03-12 14:40                           ` font-lock-fontify-block Gregory Heytings
2021-03-12 14:51                             ` font-lock-fontify-block Eli Zaretskii
2021-03-12 13:06                         ` font-lock-fontify-block tomas
2021-03-12 13:54                           ` font-lock-fontify-block Stefan Monnier
2021-03-12 15:19                             ` font-lock-fontify-block tomas
2021-03-11 22:14             ` Stefan Monnier [this message]
2021-03-12  7:22               ` font-lock-fontify-block Eli Zaretskii
2021-03-12  7:49           ` font-lock-fontify-block Stefan Reichör
2021-03-11 17:37   ` 'M-o' ('facemap-keymap') has now been removed until March 10th 2021 Stefan Kangas
2021-03-11 18:25   ` Alfred M. Szmidt
2021-03-17 16:32   ` Sean Whitton
2021-03-18  3:43     ` Lars Ingebrigtsen
2021-03-18  4:35       ` Sean Whitton
2021-03-18  4:40         ` Lars Ingebrigtsen
2021-03-18  4:16   ` Lars Ingebrigtsen
2021-03-18  9:00     ` Eli Zaretskii
2021-03-18 10:27       ` Eli Zaretskii
2021-03-19  7:46         ` Lars Ingebrigtsen
2021-03-19  8:06           ` Eli Zaretskii
2021-03-19  9:35             ` Gregory Heytings
2021-03-19 12:01               ` Eli Zaretskii
2021-03-20  7:58             ` Lars Ingebrigtsen
2021-03-20  8:39               ` Andreas Schwab
2021-03-20  8:45                 ` Lars Ingebrigtsen
2021-03-20  8:58                   ` Gregory Heytings
2021-03-20  9:10               ` Eli Zaretskii
2021-03-18 13:28       ` Jean Louis
2021-03-18 14:45         ` Eli Zaretskii
2021-03-18  9:45     ` Alfred M. Szmidt
2021-03-18 13:25     ` Jean Louis
2021-03-18 23:03     ` Sean Whitton
2021-03-19 13:14     ` Gregory Heytings
2021-03-20  7:54       ` Lars Ingebrigtsen

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=jwvv99xjqep.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /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.