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: Thu, 14 Aug 2014 05:49:18 +0300 Message-ID: <837g2biy4x.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> <87egwj9659.fsf@dreamsphere.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1407984586 8008 80.91.229.3 (14 Aug 2014 02:49:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2014 02:49:46 +0000 (UTC) Cc: rudalics@gmx.at, emacs-devel@gnu.org, dgutov@yandex.ru To: Bo Lin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 14 04:49:39 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 1XHl6Z-0003vf-SZ for ged-emacs-devel@m.gmane.org; Thu, 14 Aug 2014 04:49:32 +0200 Original-Received: from localhost ([::1]:51630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHl6Z-0008Ez-H2 for ged-emacs-devel@m.gmane.org; Wed, 13 Aug 2014 22:49:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHl6T-0008Eq-1p for emacs-devel@gnu.org; Wed, 13 Aug 2014 22:49:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHl6O-0000Y5-3l for emacs-devel@gnu.org; Wed, 13 Aug 2014 22:49:24 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:55553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHl6N-0000Xa-Rf for emacs-devel@gnu.org; Wed, 13 Aug 2014 22:49:20 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NA900700ZIXP300@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Thu, 14 Aug 2014 05:49:18 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NA9007JPZU59O60@a-mtaout20.012.net.il>; Thu, 14 Aug 2014 05:49:18 +0300 (IDT) In-reply-to: <87egwj9659.fsf@dreamsphere.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 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:173650 Archived-At: > From: Bo Lin > Cc: Dmitry Gutov , rudalics@gmx.at, emacs-devel@gnu.org > Date: Wed, 13 Aug 2014 22:06:26 -0400 > > Hi, > > Eli Zaretskii writes: > > >> > What I meant is this: if you need to display below the last line of > >> > the buffer text, put the overlay at EOB, and include newlines in the > >> > overlay string when you need to move to the next screen line. To > >> > align text horizontally you could use spaces or align-to display > >> > properties in the string. > >> > >> Yes, I might try this, as soon as there's some suggestion how to handle > >> the problem of `line-prefix' in this multi-overlay approach. > > > > Find the longest prefix and align everything so that the left edge > > keeps clear of that? > > Zero length overlays don't get displayed so this won't work when the > buffer is empty. When a buffer is empty, there are no line prefixes, right? Or did I misunderstand what you eman? > >> >> This is indeed a missing feature. It should be easy enough to provide > >> >> some special kind of display property that would overlay any other > >> >> displayed content > >> >> > >> >> > >> >> That would leave a question where will it have to be set on. > >> >> Would that new kind of overlay be able to be displayed far > >> >> from the position it's set on? > >> > > >> > No, I meant conceal the text produced by other display properties, and > >> > display your overlay string instead. > >> > >> It doesn't seem to be solving much: if I want to display something in > >> the middle of, say, large `display' text, there's no specific span of > >> text to set that new property on. > > > > You'd put it on the overlay string. > > Ideally, for a popup tooltip, it should cover only the small > rectangular area that is the tooltip, while leaving everything else > intact to minimize visual disturbances. This is, AFAICT, currently > impossible to achieve if you have to conceal anything with a > 'display property, because: 1) in the simplest case the 'display is > a string, but you don't know the proper display width of each > character; and 2) the 'display can be not-strings. I wasn't talking about the currently existing display properties, I was talking about a new property with the capabilities I described.