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: Re: Feature proposal/request: Indentation driven by display engine Date: Tue, 27 May 2008 10:24:17 +0200 Message-ID: <84A68CB8-BF41-466D-A2FB-6A6AA6A20BD6@gmail.com> References: <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; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1211876685 32086 80.91.229.12 (27 May 2008 08:24:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 May 2008 08:24:45 +0000 (UTC) Cc: emacs-devel Mailinglist To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 27 10:25:26 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 1K0uUj-0007Mg-3X for ged-emacs-devel@m.gmane.org; Tue, 27 May 2008 10:25:21 +0200 Original-Received: from localhost ([127.0.0.1]:54077 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K0uTx-00083K-Ow for ged-emacs-devel@m.gmane.org; Tue, 27 May 2008 04:24:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K0uTs-00080w-Gk for emacs-devel@gnu.org; Tue, 27 May 2008 04:24:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K0uTp-0007x3-V6 for emacs-devel@gnu.org; Tue, 27 May 2008 04:24:27 -0400 Original-Received: from [199.232.76.173] (port=50889 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K0uTp-0007wy-RP for emacs-devel@gnu.org; Tue, 27 May 2008 04:24:25 -0400 Original-Received: from nf-out-0910.google.com ([64.233.182.189]:24206) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K0uTp-0003DM-F9 for emacs-devel@gnu.org; Tue, 27 May 2008 04:24:25 -0400 Original-Received: by nf-out-0910.google.com with SMTP id c7so1202476nfi.26 for ; Tue, 27 May 2008 01:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=MRHCVtg/kiYTjvaRvOA4YUQAecakLKM7Bb/erDZPsbE=; b=VNbIRSU1wPdyCjUipoXbYM/maPZBjFqSd0RmvMIQR+03Xkm7wyLlUtMo0RqmI4PStXa9hpbqTATp2ewXHeG0tumhQgiciFT6RBDDRppD7imMGRPTtLJI4dzYzi+ufg6Pxv9a/oFdPV2fdLX0OeifGhEXf0sL6huOdxleMtAf/p0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=FykPm91HWFpdV2VGqPIFSa/r997Ey2+7GGC3ThwkSuzZLypg+wQOqvfpIQDeHUyHHtyfoDAKKD7+fNssd3JpSfpnvUnIf/iuhezQofaTQBA/5gyCCC5Ka1Ii3CRJTVD+hJkYob4s27Wr7DQvVU1b4wz4qmPmmNbOPpYOx9qDrk4= Original-Received: by 10.210.116.10 with SMTP id o10mr672728ebc.165.1211876660424; Tue, 27 May 2008 01:24:20 -0700 (PDT) Original-Received: from nb-dominik2.science.uva.nl ( [146.50.22.167]) by mx.google.com with ESMTPS id 7sm46936887nfv.32.2008.05.27.01.24.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 27 May 2008 01:24:19 -0700 (PDT) In-Reply-To: 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:97788 Archived-At: Hi Stafan, On May 26, 2008, at 11:02 PM, Stefan Monnier wrote: >>> Can't you remove the display property when you fold to avoid the >>> problem? >> I could, but then I would have to add and remove text properties >> during >> each fold/unfold, quite some unnecessary overhead. > > Not sure how much of an overhead that would be. Doesn't seem major. > It might be inconvenient to code, tho. Is that what you meant? Yes, mainly this. There are many show/hide commands, some in outline mode, some in Org, I would need to make sure that each time the right thing happens. > > >>>> 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. >>> >>> This property would still need to be added to every line. So >>> basically >>> all you're asking is a "before-string" text-property, maybe? > >> Hmm, nice translation of my request. Yes, basically what I am >> asking for is a working before-string text property. I know >> that adding the property sounds like a lot of effort, but I could >> use the font-lock/jit-lock setup to get this done efficiently, >> only for the pieces that actually get displayed. > > The same has been requested for display properties (e.g. to put > something in the margin without hiding any of the current text, you > need an overlay). > > A `before-string' text-property might be doable, but I couldn't tell > you > how easy it'd be to add. If someone wants to implement that, I might > accept it (e.g., as a form of `display' property), but if I were you > I wouldn't hold my breath (we have enough bugs to fix and are getting > close to feature freeze). Sure, I appreciate that. > > > The best I can offer for now, is to use overlays which you add via > jit-lock and which you eagerly remove in the background (so they don't > accumulate). Yes, one possible path. > > Well... patches welcome, In this case, not from me, not clue where to even start. Thanks. - Carsten