From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Window splitting issues with margins Date: Thu, 26 Nov 2015 17:46:54 +0200 Message-ID: <83poywvk41.fsf@gnu.org> References: <874mgrwerb.fsf@fastmail.fm> <5644A2AC.3080703@gmx.at> <871tbux3vb.fsf@fastmail.fm> <564599A6.6060306@gmx.at> <838u62guhm.fsf@gnu.org> <87mvugs4la.fsf@fastmail.fm> <836112c554.fsf@gnu.org> <87mvudlw6g.fsf@fastmail.fm> <564A26ED.6000208@gmx.at> <564AE6ED.5080002@gmx.at> <87si4214q5.fsf@fastmail.fm> <87610rlfj8.fsf@fastmail.fm> <5654B9C9.6010503@gmx.at> <877fl5lutk.fsf@fastmail.fm> <5656C18E.8040508@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1448552998 16602 80.91.229.3 (26 Nov 2015 15:49:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Nov 2015 15:49:58 +0000 (UTC) Cc: joostkremers@fastmail.fm, emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 26 16:49:46 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a1yno-0002mv-6v for ged-emacs-devel@m.gmane.org; Thu, 26 Nov 2015 16:49:44 +0100 Original-Received: from localhost ([::1]:51858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1ynq-0004Lb-5T for ged-emacs-devel@m.gmane.org; Thu, 26 Nov 2015 10:49:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1ynd-0004LW-I1 for emacs-devel@gnu.org; Thu, 26 Nov 2015 10:49:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1yna-0000qL-BK for emacs-devel@gnu.org; Thu, 26 Nov 2015 10:49:33 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:63127) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1yna-0000qF-38 for emacs-devel@gnu.org; Thu, 26 Nov 2015 10:49:30 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NYF00E00IFB5500@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Thu, 26 Nov 2015 17:47:10 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYF00EJ7IIM4I10@a-mtaout23.012.net.il>; Thu, 26 Nov 2015 17:47:10 +0200 (IST) In-reply-to: <5656C18E.8040508@gmx.at> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195291 Archived-At: > Date: Thu, 26 Nov 2015 09:23:42 +0100 > From: martin rudalics > CC: Eli Zaretskii , emacs-devel@gnu.org > > > 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.