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: Layered display API Date: Sat, 16 Aug 2014 10:41:50 +0300 Message-ID: <83r40gev9d.fsf@gnu.org> References: <86tx5r7l1j.fsf@yandex.ru> <53E097F7.5050407@gmx.at> <53E0ABF9.7070506@yandex.ru> <8338dbqcai.fsf@gnu.org> <53E14AF4.6050804@yandex.ru> <83k36mpbxg.fsf@gnu.org> <53E22245.4070307@yandex.ru> <8361i5pmch.fsf@gnu.org> <53E294BD.1000500@yandex.ru> <837g2knwb2.fsf@gnu.org> <53E818F0.2080104@yandex.ru> <8361hzjciv.fsf@gnu.org> <53EAD0B1.1010405@yandex.ru> <83iolwif2l.fsf@gnu.org> <53EC205F.7030801@yandex.ru> <8361hvixxz.fsf@gnu.org> <53ECB5C3.20309@yandex.ru> <834mxfhzd4.fsf@gnu.org> <53ED604C.8020705@yandex.ru> <83sikygssk.fsf@gnu.org> <53EE91C5.9060502@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1408174948 23821 80.91.229.3 (16 Aug 2014 07:42:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Aug 2014 07:42:28 +0000 (UTC) Cc: rudalics@gmx.at, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 16 09:42:21 2014 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 1XIYd0-0003su-Gz for ged-emacs-devel@m.gmane.org; Sat, 16 Aug 2014 09:42:18 +0200 Original-Received: from localhost ([::1]:34643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIYcz-0007UC-Ud for ged-emacs-devel@m.gmane.org; Sat, 16 Aug 2014 03:42:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIYcs-0007TE-GR for emacs-devel@gnu.org; Sat, 16 Aug 2014 03:42:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XIYcn-0001r1-Ku for emacs-devel@gnu.org; Sat, 16 Aug 2014 03:42:10 -0400 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:55726) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIYcn-0001qp-78 for emacs-devel@gnu.org; Sat, 16 Aug 2014 03:42:05 -0400 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NAE00N001XC4E00@mtaout29.012.net.il> for emacs-devel@gnu.org; Sat, 16 Aug 2014 10:42:01 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NAE00GAW2Q1Z480@mtaout29.012.net.il>; Sat, 16 Aug 2014 10:42:01 +0300 (IDT) In-reply-to: <53EE91C5.9060502@yandex.ru> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.185 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:173701 Archived-At: > Date: Sat, 16 Aug 2014 03:03:33 +0400 > From: Dmitry Gutov > CC: rudalics@gmx.at, emacs-devel@gnu.org > > > What I'm suggesting will allow you not to duplicate the displayed > > text, but just add an overlay with your own. > > Sorry, I'm getting strongly mixed signals here: just recently, when I > enumerated a list of requirements for displaying our popup, you replied: > > """ > Given these requirements, I think the only 2 alternatives to implement > them for GUI frames are: > > . tooltip frames, suitably beefed up to provide some features they > currently don't, like more control of colors and faces > > . some low-level graphics feature that would allow to overlay an > arbitrary pixmap on the window display (this is far from my area > of expertise, so I cannot say anything more about this > possibility) > > Nothing else seems possible, because if we rely on the current display > engine, we will be unable to fully control at least the vertical > position of the lines in your popup, and in some cases (e.g., > line-prefix) also the horizontal position. > """ > > So, which part of the job would the new text property perform, and which > part of it will be left to us to implement? None. The new property is yet another possibility, IMO inferior to the 2 I suggested above. > Let's imagine this sample case: > > (insert "e\naaaaaa\n") > (insert (propertize " " 'display "bbbbbb\ncccccc") > > (By the way, try this out in *scratch* and do some C-n, C-p. Do you see > the movement error? Here, the cursor always jumps over the "aaa..." > line when moving toward the beginning of the buffer.) Please file a bug report. > Let's say the point is at the end of the first line (after "e"), and > we'd like to display a popup under it, 4 columns wide and 2 lines tall. > If the popup is all filled with "x" characters, it should look like this: > > e. > axxxxa > bxxxxb > cccccc > > If the new property was already implemented, what would the code to do > this look like? Something like this: (put-text-property POS1 POS1+4 'eliz "xxxx") (put-text-property 1 5 STRING 'eliz "xxxx") (put-text-property 8 12 STRING 'eliz "xxxx") where POS1 is the buffer position of the second 'a', and STRING is the string that is the value of the 'display' property.