emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Window splitting issues with margins


From: Eli Zaretskii
Subject: Re: Window splitting issues with margins
Date: Thu, 26 Nov 2015 17:46:54 +0200

> Date: Thu, 26 Nov 2015 09:23:42 +0100
> From: martin rudalics <address@hidden>
> CC: Eli Zaretskii <address@hidden>, address@hidden
> 
> > One question that came up while reading this is whether it is possible
> > for two modes to display something in the (same) margin.
>
> Can we do that?

Sure, why not?  Here, try this in "emacs -Q":

  (set-window-margins nil 10 10)
  (put-text-property 141 142 'display ((margin left-margin) "Hi, "))
  (put-text-property 151 152 'display ((margin left-margin) "there!"))

When a window's got non-zero width display margin, that margin gets a
portion of the window's glyph matrix allocated for it.  So each glyph
row has a portion that belongs to the margin.  Then any display spec
that writes into the margin produces glyphs which are added to the
margin portion of the glyph row, until all the available width there
is exhausted, at which point any additional text (or images) written
into the margin simply gets discarded (there's no "continuation" or
line-wrapping for display margins).  But until then, you get
effectively the concatenation of everything written into the margins,
in the order the display engine examines the buffer and its associated
display strings/images and overlays.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]