* bug#1336: after-string not displayed when overlay has a before-string and image display property
@ 2008-11-13 13:08 Tim Toolan
2010-06-25 0:31 ` Chong Yidong
0 siblings, 1 reply; 2+ messages in thread
From: Tim Toolan @ 2008-11-13 13:08 UTC (permalink / raw)
To: bug-gnu-emacs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#1336: after-string not displayed when overlay has a before-string and image display property
2008-11-13 13:08 bug#1336: after-string not displayed when overlay has a before-string and image display property Tim Toolan
@ 2010-06-25 0:31 ` Chong Yidong
0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2010-06-25 0:31 UTC (permalink / raw)
To: Tim Toolan; +Cc: 1336-done
> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-25 0:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-13 13:08 bug#1336: after-string not displayed when overlay has a before-string and image display property Tim Toolan
2010-06-25 0:31 ` Chong Yidong
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).