GNU bug report logs - #19201
24.4.51; Faulty interaction between overlays with display-related properties in TTY

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Thu, 27 Nov 2014 03:06:02 UTC

Severity: normal

Found in version 24.4.51

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19201 in the body.
You can then email your comments to 19201 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#19201; Package emacs. (Thu, 27 Nov 2014 03:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Gutov <dgutov <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 27 Nov 2014 03:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.51;
 Faulty interaction between overlays with display-related properties
 in TTY
Date: Thu, 27 Nov 2014 05:05:16 +0200
Calling the command defined below results in different behaviors between
a graphical frame and a text terminal.

(defun display-test ()
  (interactive)
  (pop-to-buffer (get-buffer-create "display-test"))
  (insert "aaa\nbbb\nccc\nddd\neee")
  (goto-char 14)
  (let ((ias (make-overlay 4 16))
        (bsf (make-overlay 1 4)))
    (overlay-put ias 'invisible t)
    (overlay-put ias 'after-string "\nxxx\nyyy\nzzz")
    (overlay-put bsf 'before-string
                 (propertize "!"
                             'display
                             (list 'left-fringe
                                   'question-mark
                                   'warning)))))

Evaluate this, then type `M-x display-test'.

In graphical mode, I see what I'd expect:

aaa
xxx
yyy
zzz
eee

(with a fringe indicator on the first line),

whereas when trying this in terminal, I see:

aaa
eee

Originally reported in https://github.com/flycheck/flycheck/issues/526.

In GNU Emacs 24.4.51.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2014-11-16 on axl
Repository revision: c613f4d6c12ad7a8ebbc88dcef48949c6a775996
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:	Ubuntu 14.04.1 LTS




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19201; Package emacs. (Thu, 27 Nov 2014 16:42:01 GMT) Full text and rfc822 format available.

Message #8 received at 19201 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 19201 <at> debbugs.gnu.org
Subject: Re: bug#19201: 24.4.51;
 Faulty interaction between overlays with display-related
 properties	in TTY
Date: Thu, 27 Nov 2014 18:41:51 +0200
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Thu, 27 Nov 2014 05:05:16 +0200
> 
> Calling the command defined below results in different behaviors between
> a graphical frame and a text terminal.
> 
> (defun display-test ()
>   (interactive)
>   (pop-to-buffer (get-buffer-create "display-test"))
>   (insert "aaa\nbbb\nccc\nddd\neee")
>   (goto-char 14)
>   (let ((ias (make-overlay 4 16))
>         (bsf (make-overlay 1 4)))
>     (overlay-put ias 'invisible t)
>     (overlay-put ias 'after-string "\nxxx\nyyy\nzzz")
>     (overlay-put bsf 'before-string
>                  (propertize "!"
>                              'display
>                              (list 'left-fringe
>                                    'question-mark
>                                    'warning)))))
> 
> Evaluate this, then type `M-x display-test'.
> 
> In graphical mode, I see what I'd expect:
> 
> aaa
> xxx
> yyy
> zzz
> eee
> 
> (with a fringe indicator on the first line),
> 
> whereas when trying this in terminal, I see:
> 
> aaa
> eee

For the record, this has nothing to do with TTY vs GUI frames.  You
can have the same problem on a GUI frame if you use a bogus symbol for
the fringe bitmap, like 'foobar instead of 'question-mark.

Evidently, the Founding Fathers never meant for us to use display
properties on after-strings that specify display on the fringe.  Emacs
22 and 23 infloop if you try your recipe on a TTY there.  Emacs 24.1
is the first release that doesn't, and it already has this bug.

Fixed in 6b765b8 on the emacs-24 branch.




Reply sent to Dmitry Gutov <dgutov <at> yandex.ru>:
You have taken responsibility. (Fri, 28 Nov 2014 00:03:02 GMT) Full text and rfc822 format available.

Notification sent to Dmitry Gutov <dgutov <at> yandex.ru>:
bug acknowledged by developer. (Fri, 28 Nov 2014 00:03:03 GMT) Full text and rfc822 format available.

Message #13 received at 19201-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 19201-done <at> debbugs.gnu.org
Subject: Re: bug#19201: 24.4.51;	Faulty interaction between overlays with
 display-related properties	in TTY
Date: Fri, 28 Nov 2014 02:02:54 +0200
On 11/27/2014 06:41 PM, Eli Zaretskii wrote:

> For the record, this has nothing to do with TTY vs GUI frames.  You
> can have the same problem on a GUI frame if you use a bogus symbol for
> the fringe bitmap, like 'foobar instead of 'question-mark.

Makes sense.

> Evidently, the Founding Fathers never meant for us to use display
> properties on after-strings that specify display on the fringe.  Emacs
> 22 and 23 infloop if you try your recipe on a TTY there.  Emacs 24.1
> is the first release that doesn't, and it already has this bug.

The given example uses before-string, but I guess you mean both.

That's odd, though, because when used with overlays, before- and 
after-strings are the most flexible for this and similar use cases.

> Fixed in 6b765b8 on the emacs-24 branch.

Works fine. Thanks!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19201; Package emacs. (Fri, 28 Nov 2014 08:20:02 GMT) Full text and rfc822 format available.

Message #16 received at 19201 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 19201 <at> debbugs.gnu.org
Subject: Re: bug#19201: 24.4.51;
 Faulty interaction between overlays with display-related
 properties	in TTY
Date: Fri, 28 Nov 2014 10:18:20 +0200
> Date: Fri, 28 Nov 2014 02:02:54 +0200
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> CC: 19201-done <at> debbugs.gnu.org
> 
> On 11/27/2014 06:41 PM, Eli Zaretskii wrote:
> 
> > Evidently, the Founding Fathers never meant for us to use display
> > properties on after-strings that specify display on the fringe.  Emacs
> > 22 and 23 infloop if you try your recipe on a TTY there.  Emacs 24.1
> > is the first release that doesn't, and it already has this bug.
> 
> The given example uses before-string, but I guess you mean both.
> 
> That's odd, though, because when used with overlays, before- and 
> after-strings are the most flexible for this and similar use cases.

When looked upon from a user POV, I agree.  But from the
implementation POV, I'm telling you: it's a nightmare.  The state
machine in handle_stop alone is bad enough.  That stuff is in sore
need of refactoring, but I'm too coward^H^H^H^H^H^Hbusy to do that
myself.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 26 Dec 2014 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 176 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.