5

In Emacs the point belongs to a window: this allows a buffer to be displayed in two different windows at the same time.

The mark belongs however to the buffer.

Conceptually the mark and a point determines a region. Since the mark belongs to the buffer and not the window, it is not possible to have two independent regions.

What are the benefits of associating the mark with a buffer?

Is there any discussions of this design decision (an old mailing list perhaps)?

  • 3
    You can have a secondary selection. But yes, having regions beeing window specific would come handy some times. – theldoria Jul 24 '18 at 10:10
  • 1
    There are very few window-local variables in C (available to the user). It is possible to implement this if Eli / John / RMS are interested. The window-local variables would be defined in window.h, above where it has the comment: "No Lisp data may follow below this point without changing mark_object in alloc.c." [Otherwise, they would occasionally get garbage collected.] I've set up a few window-local variables during the implementation of my own proposed new features (drawing crosshairs and multiple fake cursors on only the selected window), which are still a work in process. – lawlist Jul 24 '18 at 17:43
  • 1
    The Elisp manual, node Window Point might be pertinent here. – Drew Jul 24 '18 at 18:21
  • 1
    Thanks for the comments. @Drew Thanks for the link. It shows that a buffer do have a point - it is set from the window point when the window gets focus. – soegaard Jul 27 '18 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.