Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • Overview of markers says: " A marker has three attributes: the marker position, the marker buffer, and the insertion type. The marker position is an integer that is equivalent (at a given time) to the marker as a position in that buffer. But the marker's position value can change during the life of the marker, and often does." Commented Jul 14, 2024 at 19:36
  • In the same section, you will find later on: " Insertion and deletion in a buffer must check all the markers and relocate them if necessary. This slows processing in a buffer with a large number of markers. For this reason, it is a good idea to make a marker point nowhere if you are sure you don't need it any more." Commented Jul 14, 2024 at 19:37
  • 1
    AFAIK, that's the real algorithm: there is a linked list of markers for each buffer and any insertion/deletion traverses the list and resets positions (see e.g. insert in src/insdel:674, insert_1_both in src/insdel.c:884 and adjust_markers_for_insert in src/insdel.c:288, for one possible path - all line numbers are for upstream sources from May 16 (head commit 650ee9e071eea2ff8504e056131efa9f6ac894e9) - your copy might be slightly different). Commented Jul 15, 2024 at 4:43
  • 1
    @NickD: Was this not sufficiently a question "about the language itself" for the purposes of the "elisp" tag? (If the tag is not about the usage of the language, and it's not about the implementation of the language, then when is it relevant?) Commented Oct 4 at 4:38
  • 1
    You are right: this is one instance where the tag is appropriate. I restored it. Commented Oct 4 at 17:04