From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Carsten Dominik Newsgroups: gmane.emacs.devel Subject: Feature proposal/request: Indentation driven by display engine Date: Sat, 24 May 2008 14:15:59 +0200 Message-ID: <608B9795-0975-4472-89B0-CA78575496E4@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v919.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1211631387 15227 80.91.229.12 (24 May 2008 12:16:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 May 2008 12:16:27 +0000 (UTC) To: emacs-devel Mailinglist Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 24 14:17:07 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JzsgI-0007sV-KA for ged-emacs-devel@m.gmane.org; Sat, 24 May 2008 14:17:02 +0200 Original-Received: from localhost ([127.0.0.1]:43409 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JzsfX-0003Wq-Oo for ged-emacs-devel@m.gmane.org; Sat, 24 May 2008 08:16:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JzsfT-0003Uh-Jv for emacs-devel@gnu.org; Sat, 24 May 2008 08:16:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JzsfS-0003SG-3h for emacs-devel@gnu.org; Sat, 24 May 2008 08:16:11 -0400 Original-Received: from [199.232.76.173] (port=50964 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JzsfR-0003Rx-U6 for emacs-devel@gnu.org; Sat, 24 May 2008 08:16:09 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.159]:47254) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JzsfR-0000ky-Kl for emacs-devel@gnu.org; Sat, 24 May 2008 08:16:09 -0400 Original-Received: by fg-out-1718.google.com with SMTP id l26so811013fgb.30 for ; Sat, 24 May 2008 05:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to:content-type:content-transfer-encoding:mime-version:subject:date:x-mailer; bh=jIMVzE4x1WXA8nlZhUmjkAkRad4jsyJFmalDOZvePCo=; b=svM9KDU66y08Dqs9az3Wx+YP9k1ijv9vWYQ6APtbLwl6nUNsssLgU7D5MXpWjd2ysyRydKppXj1ACRKT5lIyVv3DgISw70xV34WXoz2wKmyVE8CEZCuE5fF78PV5AlIi8EizCjG9cBuqxiuYri3kniEgSq7CBP5E+f41n4UpoQM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding:mime-version:subject:date:x-mailer; b=r4CPv5Sk6px0BqNXPtuH9GdcEIPY3GtEpW4FNR6gL1UfPe6fT0XqQuLk528HntVGZQVxoFeBkKFp78q+mQ1T3+QNCusCt76jV9gdGpDB09wWso71i4QsNq2ZjZDOjZcWzwzgA435JcDzcqDyJl6w6zmBvZ9LL4elMZvK+PxSAS0= Original-Received: by 10.86.59.18 with SMTP id h18mr291933fga.30.1211631363415; Sat, 24 May 2008 05:16:03 -0700 (PDT) Original-Received: from ?192.168.2.2? ( [81.71.250.252]) by mx.google.com with ESMTPS id 4sm7499511fge.5.2008.05.24.05.16.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 24 May 2008 05:16:02 -0700 (PDT) X-Mailer: Apple Mail (2.919.2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:97642 Archived-At: Hi, I have a proposal to make: Recently, I have experimented with an idea, to create indentation on the Emacs display. For example, in an outline structure * level 1 text under level 1 ** Level 2 text under level 1 I would like to display this as: * level 1 text under level 1 ** Level 2 text under level 1 without actually inserting white space at the beginning of each line. So effectively I would like to shift the location of the left margin on a per-line basis. I have been trying to implement this using display properties on each newline characters, displaying "\n " instead of just "\n". This basically works, but it interacts badly with outlining: If I fold the text below a headline, the first indentation is still displayed. The next thing I tried was using overlays over each "\n", with an after-string property carrying the indentations. This works correctly with outline, but when I add thousands of overlays to a buffer this becomes slow and redisplay and editing become sluggish, probably because to the huge amount of markers in the buffer. It then occurred to me that it might be useful to support such a feature directly in the display engine. For example, if the line contains text with an `indentation' property, the display engine would add this amount of white space to before the beginning of the line, maybe also a vertical line indicating the location of the margin. Would that be something useful to add? Anyone who would volunteer to implement this, because I frankly have no idea how the display engine works internally. Or are there other comments, for example how this dynamic indentation could be implemented in a different way? Thanks for listening. - Carsten