From unknown Sat Jun 21 03:26:48 2025 X-Loop: don@donarmstrong.com Subject: bug#1336: after-string not displayed when overlay has a before-string and image display property Reply-To: "Tim Toolan" , 1336@debbugs.gnu.org Resent-From: "Tim Toolan" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 13 Nov 2008 13:15:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1336 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122658174924268 (code B ref -1); Thu, 13 Nov 2008 13:15:02 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.9 required=4.0 tests=BAYES_00,FOURLA, MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 13 Nov 2008 13:09:09 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mADD94B2024261 for ; Thu, 13 Nov 2008 05:09:06 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0bwW-00031V-FG for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2008 08:09:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0bwU-0002zE-Qc for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2008 08:09:04 -0500 Received: from [199.232.76.173] (port=38678 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0bwU-0002zB-NH for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2008 08:09:02 -0500 Received: from orca.ele.uri.edu ([131.128.51.63]:36396) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L0bwU-0000jZ-FF for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2008 08:09:02 -0500 Received: from lobster (lobster.ele.uri.edu [131.128.51.4]) by orca.ele.uri.edu (8.14.3/8.14.3) with SMTP id mADD8rle011616 for ; Thu, 13 Nov 2008 08:08:54 -0500 Message-Id: <200811131308.mADD8rle011616@orca.ele.uri.edu> Received: by lobster (sSMTP sendmail emulation); Thu, 13 Nov 2008 08:08:53 -0500 From: "Tim Toolan" Date: Thu, 13 Nov 2008 08:08:53 -0500 To: bug-gnu-emacs@gnu.org X-Scanned-By: MIMEDefang 2.64 on 131.128.51.63 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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 From unknown Sat Jun 21 03:26:48 2025 X-Loop: don@donarmstrong.com Subject: bug#1336: clarification of what conditions produce bug 1336 Reply-To: "Tim Toolan" , 1336@debbugs.gnu.org Resent-From: "Tim Toolan" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 13 Nov 2008 15:15:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1336 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1336-submit@emacsbugs.donarmstrong.com id=B1336.122658894122827 (code B ref 1336); Thu, 13 Nov 2008 15:15:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.0 required=4.0 tests=AWL,BAYES_05 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1336) by emacsbugs.donarmstrong.com; 13 Nov 2008 15:09:01 +0000 Received: from orca.ele.uri.edu (orca.ele.uri.edu [131.128.51.63]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mADF8wg0022820 for <1336@emacsbugs.donarmstrong.com>; Thu, 13 Nov 2008 07:08:59 -0800 Received: from webmail.ele.uri.edu (orca [131.128.51.63]) by orca.ele.uri.edu (8.14.3/8.14.3) with ESMTP id mADF8qfI019513 for <1336@emacsbugs.donarmstrong.com>; Thu, 13 Nov 2008 10:08:52 -0500 Received: from lobster.ele.uri.edu (lobster.ele.uri.edu [131.128.51.4]) by webmail.ele.uri.edu (Horde Framework) with HTTP; Thu, 13 Nov 2008 10:08:52 -0500 Message-ID: <20081113100852.20835r3on707gb2c@webmail.ele.uri.edu> Date: Thu, 13 Nov 2008 10:08:52 -0500 From: "Tim Toolan" To: 1336@debbugs.gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.2) X-Scanned-By: MIMEDefang 2.64 on 131.128.51.63 Hi, After looking into this bug further, I can clarify exactly what is happening. When an overlay has a display property which is an image which is displayed, and exactly one overlay (it does not have to be the one which contains the image) has a before-string property that occurs at the start of the overlay with the image, then all after-strings in all overlays that end at the end of the image will not appear. If there are any other number of overlays (including zero) with before-string properties that occur at the beginning of the image, the bug does not occur. Hope this new information helps find the problem. Regards, Tim From unknown Sat Jun 21 03:26:48 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: "Tim Toolan" Subject: bug#1336: closed (Re: after-string not displayed when overlay has a before-string and image display property) Message-ID: References: <87iq58t0jv.fsf@stupidchicken.com> <200811131308.mADD8rle011616@orca.ele.uri.edu> X-Gnu-PR-Message: they-closed 1336 X-Gnu-PR-Package: emacs Reply-To: 1336@debbugs.gnu.org Date: Fri, 25 Jun 2010 00:32:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1277425922-9057-1" This is a multi-part message in MIME format... ------------=_1277425922-9057-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #1336: after-string not displayed when overlay has a before-string and imag= e 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@debbugs.gnu.org. --=20 1336: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D1336 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1277425922-9057-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 1336-done) by debbugs.gnu.org; 25 Jun 2010 00:31:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORwpl-0002Lu-Uh for submit@debbugs.gnu.org; Thu, 24 Jun 2010 20:31:54 -0400 Received: from pantheon-po16.its.yale.edu ([130.132.50.72]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORwpj-0002Lp-Oj for 1336-done@debbugs.gnu.org; Thu, 24 Jun 2010 20:31:52 -0400 Received: from furry (dhcp128036014221.central.yale.edu [128.36.14.221]) (authenticated bits=0) by pantheon-po16.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o5P0VlWU009469 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 24 Jun 2010 20:31:48 -0400 Received: by furry (Postfix, from userid 1000) id 19E5C16D416; Fri, 25 Jun 2010 02:31:48 +0200 (CEST) From: Chong Yidong To: "Tim Toolan" 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 Message-ID: <87iq58t0jv.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 1336-done Cc: 1336-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) > 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. ------------=_1277425922-9057-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From toolan@ele.uri.edu Thu Nov 13 05:09:08 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.9 required=4.0 tests=BAYES_00,FOURLA, MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 13 Nov 2008 13:09:09 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mADD94B2024261 for ; Thu, 13 Nov 2008 05:09:06 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0bwW-00031V-FG for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2008 08:09:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0bwU-0002zE-Qc for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2008 08:09:04 -0500 Received: from [199.232.76.173] (port=38678 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0bwU-0002zB-NH for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2008 08:09:02 -0500 Received: from orca.ele.uri.edu ([131.128.51.63]:36396) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L0bwU-0000jZ-FF for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2008 08:09:02 -0500 Received: from lobster (lobster.ele.uri.edu [131.128.51.4]) by orca.ele.uri.edu (8.14.3/8.14.3) with SMTP id mADD8rle011616 for ; Thu, 13 Nov 2008 08:08:54 -0500 Message-Id: <200811131308.mADD8rle011616@orca.ele.uri.edu> Received: by lobster (sSMTP sendmail emulation); Thu, 13 Nov 2008 08:08:53 -0500 From: "Tim Toolan" Date: Thu, 13 Nov 2008 08:08:53 -0500 To: bug-gnu-emacs@gnu.org Subject: after-string not displayed when overlay has a before-string and image display property X-Scanned-By: MIMEDefang 2.64 on 131.128.51.63 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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 ------------=_1277425922-9057-1--