From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Layered display API (was: bug#18195: 24.3.92; window-screen-lines is not accurate) Date: Wed, 06 Aug 2014 16:40:37 +0400 Message-ID: <53E22245.4070307@yandex.ru> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1407328908 30199 80.91.229.3 (6 Aug 2014 12:41:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Aug 2014 12:41:48 +0000 (UTC) Cc: rudalics@gmx.at, emacs-devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 06 14:41:43 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 1XF0XH-00071e-0B for ged-emacs-devel@m.gmane.org; Wed, 06 Aug 2014 14:41:43 +0200 Original-Received: from localhost ([::1]:38877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF0XG-0004HR-Em for ged-emacs-devel@m.gmane.org; Wed, 06 Aug 2014 08:41:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF0Wq-0004Ba-0h for emacs-devel@gnu.org; Wed, 06 Aug 2014 08:41:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XF0WM-0007y1-DY for emacs-devel@gnu.org; Wed, 06 Aug 2014 08:41:15 -0400 Original-Received: from mail-la0-x232.google.com ([2a00:1450:4010:c03::232]:64883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF0WM-0007xd-4t; Wed, 06 Aug 2014 08:40:46 -0400 Original-Received: by mail-la0-f50.google.com with SMTP id gf5so1876339lab.37 for ; Wed, 06 Aug 2014 05:40:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=AVhCXsQCEILKTPuL/qL/lCTUk/qXl3F7feL66OtVyak=; b=vsfv52EVxTIm1GRY+TmXh/VLLx6hfD3Pkil1O/MtBz1g9z4x+SIgA/93GQpNh9NIhp gO3iCFMRfdOKWsuC49WHlVZ0qX5OyYE1aS9SvK7zscRV1sQB142Kt3kWhs3NVJw7J319 NvrvZ/xWkIuZqJS8pwyJcRvDgM8Yqm9D5hnt25Tp2q0Y68QIQJAfMTq0NRdknVdPxqOj bt1LLCBdd7lCNiHeKyMKmw/nOKrfyGzPnRb+42AUAyeotSE5rv6OMUAjTDvHTxM3HcND oI8W2rYFsntVNgjQF+nzKvf+gvjlt9P/aQv/QbFovvXrAoiSsDvDF9AbbnpTGUXGRO0Y AMWw== X-Received: by 10.112.44.129 with SMTP id e1mr10558718lbm.78.1407328844810; Wed, 06 Aug 2014 05:40:44 -0700 (PDT) Original-Received: from [10.8.0.26] (v-2-eu19-d3962-07.webazilla.com. [78.140.151.7]) by mx.google.com with ESMTPSA id la6sm452168lac.12.2014.08.06.05.40.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Aug 2014 05:40:43 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: <83k36mpbxg.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::232 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:173449 Archived-At: On 08/06/2014 06:52 AM, Eli Zaretskii wrote: >> That sounds great, but I don't even know where to start. What we're >> trying to emulate, though, is multi-layered display. That sounds >> somewhat different from a "text layout API" to me. > > I don't mind how it is called and what is the correct abstraction. I > do know that we need some abstraction and APIs to support it. If you > already know what the correct abstraction is, then you are in a good > position to formulate the requirements. I don't know much of the other use cases (only in-buffer calltips come to mind). Basically, we'd like to be able to display a rectangle with propertized text inside, at an arbitrary position (I would say pixel coordinates, but that might not work well in terminal), so that it would be displayed above the buffer contents. This would solve two issues we currently have: 1. If the buffer ends (shortly) after the current line, we're forced to pad it with a newline, and then carefully undo that and restore the buffer modification status. 2. If the buffer is already heavily using the `display' text property, or other similar ones, our tooltip positioning also breaks or works unexpectedly. Example: the `report-emacs-bug' buffer (https://github.com/company-mode/company-mode/issues/136). Somewhat relatedely, I'd love to be able to sanely display smooth graphics spanning multiple lines in the fringe (or in the area that would replace it), to indicate the buffer lines that changed from the last VCS commit, without conflict with flymake-style warning/error indicators. Code folding packages might also use it to indicate the bounds of the function or block at point. Maybe even support buttons? Here's an illustration from a proprietary editor: http://wiki.jetbrains.net/i/images/6/68/Git_general_branches_updated_code.png