unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Rankin <hello@paulwrankin.com>
Cc: 30432@debbugs.gnu.org
Subject: bug#30432: 26.0.91; freeze when text wrap-prefix exceeds window text width
Date: Mon, 12 Feb 2018 21:51:32 +0200	[thread overview]
Message-ID: <837eriyojf.fsf@gnu.org> (raw)
In-Reply-To: <94B0ABFC-0319-4CB5-944C-14E3B43310C6@paulwrankin.com> (message from Paul Rankin on Mon, 12 Feb 2018 16:49:39 +1000)

> From: Paul Rankin <hello@paulwrankin.com>
> Date: Mon, 12 Feb 2018 16:49:39 +1000
> 
> 1. emacs -Q
> 2. make sure window is 80 columns wide
> 3. insert a block of text that exceeds the window text width and causes wrapping
> 4. set region over this text
> 5. (put-text-property (region-beginning) (region-end) 'wrap-prefix '(space :align-to 81))
> 6. move point to or past this text
> 
> Expected result:
> 
> I'm not sure, but I guess window should scroll horizontally to display point.

It can't.  (And anyway, horizontal scrolling only happens when lines
are truncated.)

What the above wrap-prefix does is ask for 81 columns of whitespace
each time we need to continue a line on the next screen line, before
the text of that continuation line.  But 81 columns is more than the
window can show, so the wrap prefix itself causes another continuation
line to appear, which then needs another wrap prefix, etc. etc., ad
nauseam.

IOW, asking for a 81-column wrap-prefix in a 80-column wide window
makes no sense, and leaves redisplay no way of showing point -- or
even showing more than one screen line of text.

> Actual results:
> 
> Emacs freezes and needs to be killed.

I don't think I see a freeze here.  What I see is that the cursor
disappears, and Emacs repeatedly enters redisplay (because point is
not visible) -- which is why you might think Emacs freezes.  But if
you type C-b enough times, or even just type M-<, cursor will
eventually reappear, the "freezing" will stop, and Emacs will start
behaving normally again.  Although you sometimes need to wait for that
to happen for a few dozen seconds.

Is that what you see?  Or do you see something different?  (For the
record, I inserted a 90-character line into *scratch*, then marked it,
and typed the put-text-property form.)

> In Emacs versions prior to 26, this use to just wrap the transition text, but something has changed with 26 to cause the freezing.

What do you mean by "just wrap the transition text"?  Can you tell
what you see in previous versions with the recipe above?

What I see in previous versions of Emacs is something similar to Emacs
26, except that the cursor instead of disappearing jumps to the end of
the first screen line (which is a clearly bogus location), and stays
there until you type C-b enough times to get point into the visible
portion of the text line inserted at the beginning of the recipe.  Do
you see something different?

Thanks.





  reply	other threads:[~2018-02-12 19:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-12  6:49 bug#30432: 26.0.91; freeze when text wrap-prefix exceeds window text width Paul Rankin
2018-02-12 19:51 ` Eli Zaretskii [this message]
2018-02-13  2:15   ` Paul Rankin
2018-02-13  2:18     ` Paul Rankin
2018-02-13  2:30       ` Paul Rankin
2018-02-13  5:15     ` Eli Zaretskii
2018-02-13  5:57       ` Paul Rankin
2018-03-20 17:10         ` Eli Zaretskii
2018-03-29  5:00           ` Paul W. Rankin
2018-03-30 12:59             ` Eli Zaretskii
2018-05-07 18:38               ` Eli Zaretskii
     [not found]                 ` <0C03687D-D0D4-46CE-B409-6A2E55C8A5FA@paulwrankin.com>
     [not found]                   ` <2F164141-0F75-45C9-8211-ADAF2B005C16@paulwrankin.com>
2018-05-08 17:16                     ` Eli Zaretskii

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=837eriyojf.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=30432@debbugs.gnu.org \
    --cc=hello@paulwrankin.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 public inbox

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

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