emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnu.emacs.help] display margins


From: Oliver Scholz
Subject: [gnu.emacs.help] display margins
Date: Thu, 13 Dec 2001 10:37:28 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu)

Hello.

I posted this on gnu.emacs.help originally, where Eli Zaretskii
suggested to ask my question here.

You can count this as a request for enhancement of the
documentation. :-)

    Oliver

PS: Please CC to my address if you find this is worth an answer,
because I'm not on this list.

--- Begin Message --- Subject: display margins Date: Tue, 11 Dec 2001 20:00:23 +0100
What are the display margins intended for?

I mean: this seems to be a really nifty feature, but I do not quite
understand what it's supposed purpose is. In other words: what usage
had the developers in their minds when they implemented this?

I can display text on the margin by putting a text property on a text in
the buffer like this:

(put-text-property (point-min) 30 
                   'display '((margin left-margin) "test"))

Then this text becomes invisible and the word "test" appears on the
left margin.

Now if I want to ...

1. ... display additional information in the margin, I have to put
   some dummy text to the buffer and add my informational text to it
   as a text property, like above.
   I would prefer a function that let's me add some text directly to
   the margin.

2. ... display some buffer-text in the margin instead of in the
   buffer, then I have to read this text to a string first, then put
   this string as a display-text property on that text. Like this:

   (put-text-property 
    1 30 'display `((margin left-margin) 
                              ,(buffer-substring 1 30)))

   I also tried this -- but with no avail:
   (put-text-property 1 10 'display `(margin left-margin))
   [This is what I would have thought after reading the Info doc would
   be the right thing. Is this a doc-bug or is it my fault?]

I guess I did not get the intention for implementing the
margin. Therefore my question.

Also: from the Elisp-Reference I got the impression that the margin is
something local to a window. But obviously it is a buffer related
thing.

    'oliver

PS: Did I already mention in this NG what a great and wonderful thing
Emacs 21 is? Whenever I read the Reference I feel like a child that
can not decide which present under the christmas tree to open first.
-- 
21 Frimaire an 210 de la Révolution

--- End Message ---


    'oliver

-- 
Oliver Scholz               23 Frimaire an 210 de la Révolution
Taunusstr. 25
60329 Frankfurt a. M.
Tel. (069) 97 40 99 42

reply via email to

[Prev in Thread] Current Thread [Next in Thread]