all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: indentation via text or overlay property?
Date: Fri, 06 Jun 2003 10:23:46 -0600	[thread overview]
Message-ID: <3EE0C012.60705@yahoo.com> (raw)
In-Reply-To: 5lof1dh7bc.fsf@rum.cs.yale.edu

Stefan Monnier wrote:

>>>>>>"Kevin" == Kevin Rodgers <ihs_4664@yahoo.com> writes:
>>>>>>
>>Is there a way to implement indentation via a text property like left-margin
>>or an overlay property like before-string?
> 
> (put-text-property start end 'display '(space :align-to N))
> 
> will make the text between `start' and `end' appear like a space
> that ends at column N.


Cool!  But since those spaces are displayed instead of the original text (not
in addition to it), I don't see how to use that to implement indentation.

For example, let's say I have a <foo> tag at the beginning of a line that I
want displayed at column 6.  If I specify '(space :align-to 5) for the
display property at the position of "<" in the buffer, it gets indented like
I want except that the "<" is no longer visible.  And apparently I can't use
a value like

	(list '(space :align-to N) (buffer-substring start end))

to get both the spaces and the original text displayed.

> This is at least documented in the NEWS file of Emacs-21.1, and
> I'd expect there to be something about it as well in the elisp manual.

Thanks for the pointers.  Is the correct way to test for this feature:

	(>= emacs-major-version 21)

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

  reply	other threads:[~2003-06-06 16:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-04 19:13 indentation via text or overlay property? Kevin Rodgers
2003-06-04 21:16 ` Stefan Monnier
2003-06-06 16:23   ` Kevin Rodgers [this message]
2003-06-06 16:59     ` Stefan Monnier
2003-06-06 18:09       ` Kevin Rodgers
2003-06-06 19:29         ` Stefan Monnier
2003-06-09 21:56           ` Kevin Rodgers
2003-06-09 22:57             ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=3EE0C012.60705@yahoo.com \
    --to=ihs_4664@yahoo.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.