all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Miles Bader <miles@gnu.org>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Combining face and map stuff
Date: Wed, 06 Oct 2010 01:43:03 +0200	[thread overview]
Message-ID: <jwvzkusqkn7.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8739slfqg6.fsf@catnip.gol.com> (Miles Bader's message of "Tue, 05 Oct 2010 09:12:09 +0900")

>>> It sounds like he's saying it would use their union, with a
>>> property-specific function used to compute that union.
>>> [and that the union computation could be done at "property setting time"
>>> rather than at display time, to avoid speed problems.]
>> I'm probably missing something here: if the union is computed at
>> put-text-property time, then how is this different from what we have
>> now?  That union will have all the properties of the character lumped
>> together, just like what we have now, right?  What am I missing?

You're missing that in order o properly update the merge when some
property is added/removed in a plane, all users of text properties will
have to follow some new conventions.

Of course, those conventions could be enforced via defadvices, I guess.

But there's probably going to be some slightly subtle issues: when
setting the `face' property, we can assume it's in the default nil
plane, but reading the `face' property might mean "the `face' property
in the nil plane" or "the merged `face' property".

> Who knows, maybe it _could_ be implemented completely in lisp given
> todays primitives ... but in order to make the layering thing work,
> all the users would need to cooperate, presumably by means of
> a wrapper layer.

Right.
Actually, that's why I like this idea: most of the work is done at
a time when Elisp can be used, so you get a lot of flexibility, and you
don't have to worry about interaction with tricky C code.
E.g. maybe the merge function could be used to enforce priorities
between planes, or to enable/disable planes (kind of like
add-to-invisibility-spec).


        Stefan





  reply	other threads:[~2010-10-05 23:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-02 14:21 Combining face and map stuff Lars Magne Ingebrigtsen
2010-10-02 16:21 ` Chong Yidong
2010-10-02 16:41   ` Lars Magne Ingebrigtsen
2010-10-03  2:04     ` Miles Bader
2010-10-03  4:16     ` Chong Yidong
2010-10-03 13:08       ` Lars Magne Ingebrigtsen
2010-10-03 23:37 ` Stefan Monnier
2010-10-04  7:56   ` Eli Zaretskii
2010-10-04  9:03     ` Miles Bader
2010-10-04  9:42       ` Eli Zaretskii
2010-10-05  0:12         ` Miles Bader
2010-10-05 23:43           ` Stefan Monnier [this message]
2010-10-06  3:57             ` Eli Zaretskii
2010-10-07  7:40               ` Stefan Monnier
2010-10-07 13:56                 ` Eli Zaretskii
2010-10-07 18:08                   ` Stefan Monnier
2010-10-12 19:09                     ` Eli Zaretskii
2010-10-12 20:23                       ` Stefan Monnier
2010-10-13 11:41                         ` Eli Zaretskii
2010-10-13 12:42                           ` Stefan Monnier

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