unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stephen Berman <Stephen.Berman@gmx.net>
To: help-gnu-emacs@gnu.org
Subject: Display text property problem
Date: Thu, 14 Jun 2007 12:00:18 +0200	[thread overview]
Message-ID: <87vedqq2j1.fsf@escher.local.home> (raw)

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	other threads:[~2007-06-14 10:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-14 10:00 Stephen Berman [this message]
2007-06-14 10:24 ` Display text property problem 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

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=87vedqq2j1.fsf@escher.local.home \
    --to=stephen.berman@gmx.net \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).