unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Garreau\, Alexandre" <galex-713@galex-713.eu>
Cc: emacs-devel@gnu.org
Subject: Re: Questions about text properties
Date: Sun, 21 Oct 2018 15:17:50 +0300	[thread overview]
Message-ID: <83r2gjtrwx.fsf@gnu.org> (raw)
In-Reply-To: <87pnw46l2z.fsf@portable.galex-713.eu>

> From: "Garreau\, Alexandre" <galex-713@galex-713.eu>
> Date: Sun, 21 Oct 2018 05:21:40 +0200
> 
> – how about adding stuff to a *value* of property, be it a list, or
>   anything that could inherit, such as an alist, a keymap, etc.? it
>   seems there are no functions for that;

Not sure I understand why you need something special: modifying a Lisp
value, whether to add something or otherwise, is rather trivial, no?

> – why are properties rear-sticky by default rather than the opposite?

Because the other alternative is rarely needed.  E.g., if you modify a
string that has a face, you want the appended characters to inherit
the same face.  By contrast, inserting before the string rarely needs
such inheritance.

> – why is there only a mouse-face property, rather than a hover, click,
>   pressed, active, focus, etc.

The usual reason: low demand and/or low motivation to develop features
that are in low demand.  Another possible reason is that at least some
of those (click and press -- what's the difference, btw?) you can have
already, by using the 'keymap' property, and perhaps a few others.

> – why can it only affects face rather than other properties so that to
>   extend its behavior?

By "it" you mean, mouse-face?  Because it's a face.

> – sometimes most text properties can take a hook (that will be called
>   lazily to compute a valid value), sometimes not (like for a display
>   prop space);

Not sure what this is about.  In general, only functions have hooks,
not properties.  How about a couple of examples?

> — is the recenter thing about overlays related to the fact buffers are
>   implemented with a buffer gap, or is it just something similar to
>   fasten stuff?

It makes overlay access faster.



  parent reply	other threads:[~2018-10-21 12:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-21  3:21 Questions about text properties Garreau, Alexandre
2018-10-21  3:55 ` Daniele Nicolodi
2018-10-21 14:39   ` Stefan Monnier
2018-10-21 12:17 ` Eli Zaretskii [this message]
2018-10-21 13:35   ` Garreau, Alexandre
2018-10-21 15:27     ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r2gjtrwx.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=galex-713@galex-713.eu \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).