GNU bug report logs - #1336
after-string not displayed when overlay has a before-string and image display property

Previous Next

Package: emacs;

Reported by: "Tim Toolan" <toolan <at> ele.uri.edu>

Date: Thu, 13 Nov 2008 13:15:02 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: "Tim Toolan" <toolan <at> ele.uri.edu>
Subject: bug#1336: closed (Re: after-string not displayed when overlay has
 a before-string and image display property)
Date: Fri, 25 Jun 2010 00:32:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#1336: after-string not displayed when overlay has a before-string and image display property

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 1336 <at> debbugs.gnu.org.

-- 
1336: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1336
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Chong Yidong <cyd <at> stupidchicken.com>
To: "Tim Toolan" <toolan <at> ele.uri.edu>
Cc: 1336-done <at> debbugs.gnu.org
Subject: Re: after-string not displayed when overlay has a before-string and
	image display property
Date: Thu, 24 Jun 2010 20:31:48 -0400
> When an overlay has both a before-string and an after-string, and it
> has a display property which is an image, the after-string will not be
> displayed.

Thanks for the bug report.  I finally tracked the problem down, and have
committed a fix.

[Message part 3 (message/rfc822, inline)]
From: "Tim Toolan" <toolan <at> ele.uri.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: after-string not displayed when overlay has a before-string and image display property
Date: Thu, 13 Nov 2008 08:08:53 -0500
When an overlay has both a before-string and an after-string, and it
has a display property which is an image, the after-string will not be
displayed.

I'm assuming this macro of Joe Wells' in my reproduction code below:

  (defmacro test-in-fresh-buffer-and-window (&rest body)
    `(progn
       (delete-other-windows)
       (kill-buffer (get-buffer-create "xyzzy"))
       (let ((xyzzy-buf (get-buffer-create "xyzzy")))
         (set-buffer xyzzy-buf)
         (display-buffer xyzzy-buf)
         ,@body
         )))

Reproduce this problem with:

  (test-in-fresh-buffer-and-window
   (insert "ABCD \n")
   (let ((o1 (make-overlay 2 3)))
     (overlay-put o1 'before-string "B1")
     (overlay-put o1 'after-string "A1")
     (overlay-put o1 'display '(image :data "#define x_width 8\n#define x_height 8\nstatic unsigned char x_bits[] = {0xff, 0x81, 0xbd, 0xa5, 0xa5, 0xbd, 0x81, 0xff };" :type xbm))))

The above expression should display "ABB1(image)A1CD".
The above expression wrongly displays "ABB1(image)CD".

Note that the problem goes away when any of the following conditions 
are met:
 1) The display property is something other than an image (like a string).
 2) There is no before-string, only an after-string.
 3) There is another overlay that covers the same region and has a
    before-string (if it only has an after-string that will not be
    displayed either).
 4) If there is a higher priority overlay that covers the same region,
    and has a display property set which is not an image.

Note that this problem also exists in the current CVS version of emacs.

Regards,

Tim


In GNU Emacs 22.2.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2008-06-12 on aquarius
Windowing system distributor `The X.Org Foundation', version 11.0.10300000
configured using `configure  '--prefix=/usr' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--program-suffix=-emacs-22' '--infodir=/usr/share/info/emacs-22' '--without-carbon' '--with-sound' '--with-x' '--with-toolkit-scroll-bars' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png' '--with-xpm' '--with-x-toolkit=athena' '--without-gtk' '--without-hesiod' '--with-kerberos' '--with-kerberos5' '--libdir=/usr/lib64' '--build=x86_64-pc-linux-gnu' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-march=nocona -pipe -O2' 'LDFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t





This bug report was last modified 14 years and 333 days ago.

Previous Next


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