unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel Mailinglist <emacs-devel@gnu.org>
Subject: Re: Feature proposal/request: Indentation driven by display engine
Date: Tue, 27 May 2008 10:24:17 +0200	[thread overview]
Message-ID: <84A68CB8-BF41-466D-A2FB-6A6AA6A20BD6@gmail.com> (raw)
In-Reply-To: <jwvej7ookgs.fsf-monnier+emacs@gnu.org>

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





  reply	other threads:[~2008-05-27  8:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-24 12:15 Feature proposal/request: Indentation driven by display engine Carsten Dominik
2008-05-24 18:48 ` Stefan Monnier
2008-05-24 20:22   ` Carsten Dominik
2008-05-26 21:02     ` Stefan Monnier
2008-05-27  8:24       ` Carsten Dominik [this message]
2008-05-24 23:02 ` Stephen Berman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84A68CB8-BF41-466D-A2FB-6A6AA6A20BD6@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).