all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How is text properties stored?
@ 2019-05-08 21:08 Yuan Fu
  2019-05-09  0:58 ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Yuan Fu @ 2019-05-08 21:08 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 834 bytes --]

Hi,

I’m interested in how is text properties stored in a string/buffer. From what I see (printing propertzied string and try reading textprop.c), it seems that they are stored in ranges. Is that true?

If that’s the case, I have two more questions:

1. How is it implemented? I.e., is it like (very roughly):

struct string {
  char* string;
  property* properties;
};

struct property {
  int beg;
  int end;
  Lisp_Object* plist;
}

?

2. In my naive minds, if the text properties are implemented like this, every time when the user insert something in to a buffer/string, all the properties after the point of insert has to adjust their position (like overlays). That’s probably not the case since text property is supposed to be more efficient than overlays. So how does it work?

Sincerely, Yuan


[-- Attachment #2: Type: text/html, Size: 2053 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-05-10  5:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-08 21:08 How is text properties stored? Yuan Fu
2019-05-09  0:58 ` Stefan Monnier
2019-05-09  1:41   ` Yuan Fu
2019-05-09  5:41     ` Eli Zaretskii
2019-05-09 20:26       ` Yuan Fu
2019-05-09 20:40         ` Stefan Monnier
2019-05-10  1:50           ` Yuan Fu
2019-05-10  5:43             ` Eli Zaretskii

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.