unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Display text property problem
@ 2007-06-14 10:00 Stephen Berman
  2007-06-14 10:24 ` Peter Dyballa
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen Berman @ 2007-06-14 10:00 UTC (permalink / raw)
  To: help-gnu-emacs

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-06-14 14:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-14 10:00 Display text property problem Stephen Berman
2007-06-14 10:24 ` Peter Dyballa
2007-06-14 11:10   ` Stephen Berman
2007-06-14 11:48     ` Peter Dyballa
2007-06-14 12:06       ` Stephen Berman
2007-06-14 12:50         ` Peter Dyballa
2007-06-14 13:38           ` Stephen Berman
2007-06-14 14:55             ` Peter Dyballa
2007-06-14 14:58             ` Peter Dyballa

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).