help-gnu-emacs
[Top][All Lists]
Advanced

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

Display text property problem


From: Stephen Berman
Subject: Display text property problem
Date: Thu, 14 Jun 2007 12:00:18 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

I would be very interested to know whether anybody here can reproduce
the following in Emacs 22.1 or CVS Emacs from the trunk. (I also see
something similar in Emacs 21.3, though there the behavior is somewhat
different, due I think to additional bugs that have been fixed in
Emacs 22.)  And I would be especially interested in, and grateful for,
suggestions about how to debug this.

Thanks,
Steve Berman

______________________________________________________________________
1. emacs -Q

2. Type "test " 17 times, i.e., enough to make the line of text longer
than fill-column.

3. Put the cursor on column 70 and type
   `M-: (put-text-property (1- (point)) (point) 'display " \n     ")'
(the display string here is one space + a newline + five spaces, but
it is only important that it contain a newline and a following
character).

Now the buffer displays the following, where `|' marks the left
fringe, and the cursor is still on column 70, indicated by `^':

|test test test test test test test test test test test test test test 
|     test test test 
      ^

4. Type M-: (scroll-up 1); now the buffer displays the following,
where again `|' marks the left fringe, and the cursor is still on
column 70, indicated by `^':

|test test test
 ^

A variant of this bug is seen by doing steps 1-3 and then reducing the
frame height (e.g. by dragging the mouse) one line at a time until the
window contains just one line (plus the mode line and the minibuffer),
at which point the text is displayed as in step 4.
 

Another example:
a. emacs -Q
b. Type " " (i.e., space)
c. Type M-: (put-text-property (1- (point)) (point) 'display "\n***"),
so that the buffer displays this:
|
|***
 ^
d. Now typing M-: (scroll-up 1) yields an "End of buffer" error, but
clicking the down arrow in the scroll bar (at least with the GTK+
toolkit) once makes the "***" disappear and the cursor get vertically
centered in the window.  (If you put the cursor after "***" and then
click the down arrow in the scroll bar, "***" still vanishes but the
cursor is now at the top of the window.)


The first example can also be reproduced with emacs -nw -Q, however,
the resulting display after step 4 is different:
|t test





reply via email to

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