From unknown Sat Jun 21 03:18:49 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#5108: 23.1; ps-print-buffer infinite loop on image-mode Reply-To: Kevin Ryde , 5108@debbugs.gnu.org Resent-From: Kevin Ryde Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 02 Dec 2009 22:35:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 5108 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125979281820600 (code B ref -1); Wed, 02 Dec 2009 22:35:05 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 2 Dec 2009 22:26:58 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.8 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB2MQuDD020595 for ; Wed, 2 Dec 2009 14:26:58 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFxex-0006PV-Ld for bug-gnu-emacs@gnu.org; Wed, 02 Dec 2009 17:26:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFxet-0006Kh-N6 for bug-gnu-emacs@gnu.org; Wed, 02 Dec 2009 17:26:55 -0500 Received: from [199.232.76.173] (port=38578 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFxet-0006KW-Fb for bug-gnu-emacs@gnu.org; Wed, 02 Dec 2009 17:26:51 -0500 Received: from mailout1-1.pacific.net.au ([61.8.2.208]:44235 helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NFxes-0003RY-ID for bug-gnu-emacs@gnu.org; Wed, 02 Dec 2009 17:26:51 -0500 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 89A1F514310 for ; Thu, 3 Dec 2009 09:26:44 +1100 (EST) Received: from blah.blah (ppp241D.dyn.pacific.net.au [61.8.36.29]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id C7E858C3E for ; Thu, 3 Dec 2009 09:26:43 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1NFxeW-0003QK-Tf for bug-gnu-emacs@gnu.org; Thu, 03 Dec 2009 09:26:29 +1100 From: Kevin Ryde To: bug-gnu-emacs@gnu.org Date: Thu, 03 Dec 2009 09:26:27 +1100 Message-ID: <87vdgpf1ws.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) A ps-print-buffer on some image files in image-mode goes into an infinite loop. For example "cut.xpm" in the current emacs cvs, (progn (switch-to-buffer "x") (erase-buffer) (insert-file-contents (concat data-directory "images/cut.xpm")) (image-mode) (ps-print-buffer "/tmp/foo.ps")) shows message Formatting... 0% and then goes away apparently forever. debug-on-quit says the loop is ps-mule-plot-string. It seems (point) has gone past the intended `stop' position, so "(= (point) stop)" is not satisfied, or something like that. Might be the forward-char under "(looking-at ascii-or-latin-1)" going too far, maybe something to do with the image overlay, or point movement within image mode ... (What I actually hoped for was that it might print the image, but perhaps it doesn't print images at all ...) In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) of 2009-09-14 on raven, modified by Debian configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' 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: en_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default-enable-multibyte-characters: t From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 18 05:54:43 2011 Received: (at control) by debbugs.gnu.org; 18 Sep 2011 09:54:43 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5E5D-0008BM-H1 for submit@debbugs.gnu.org; Sun, 18 Sep 2011 05:54:43 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5E5C-0008BG-Lc for control@debbugs.gnu.org; Sun, 18 Sep 2011 05:54:43 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R5E0L-0007oT-QZ for control@debbugs.gnu.org; Sun, 18 Sep 2011 11:49:41 +0200 Date: Sun, 18 Sep 2011 11:46:21 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #5108 X-MailScanner-ID: 1R5E0L-0007oT-QZ X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1316944181.94046@Kf63y2RR1KTiPNZJ3TvDXg X-Spam-Status: No X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: control 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.6 (--) tags 5108 confirmed From unknown Sat Jun 21 03:18:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5108: 23.1; ps-print-buffer infinite loop on image-mode Resent-From: Lars Magne Ingebrigtsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Sep 2011 09:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5108 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Kevin Ryde Cc: 5108@debbugs.gnu.org Received: via spool by 5108-submit@debbugs.gnu.org id=B5108.131633979331691 (code B ref 5108); Sun, 18 Sep 2011 09:57:02 +0000 Received: (at 5108) by debbugs.gnu.org; 18 Sep 2011 09:56:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5E6y-0008F2-6X for submit@debbugs.gnu.org; Sun, 18 Sep 2011 05:56:32 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5E6w-0008En-1i for 5108@debbugs.gnu.org; Sun, 18 Sep 2011 05:56:30 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R5E22-0007qe-I2; Sun, 18 Sep 2011 11:51:26 +0200 From: Lars Magne Ingebrigtsen In-Reply-To: <87vdgpf1ws.fsf@blah.blah> (Kevin Ryde's message of "Thu, 03 Dec 2009 09:26:27 +1100") Date: Sun, 18 Sep 2011 11:46:19 +0200 Message-ID: References: <87vdgpf1ws.fsf@blah.blah> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Eurythmics's _Savage_: "I've Got A Lover (Back In Japan)" MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1R5E22-0007qe-I2 X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1316944286.6244@Glj8u4dClx1LADo4mH5CAg X-Spam-Status: No X-Spam-Score: -2.6 (--) 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.6 (--) Kevin Ryde writes: > A ps-print-buffer on some image files in image-mode goes into an > infinite loop. For example "cut.xpm" in the current emacs cvs, > > (progn > (switch-to-buffer "x") > (erase-buffer) > (insert-file-contents (concat data-directory "images/cut.xpm")) > (image-mode) > (ps-print-buffer "/tmp/foo.ps")) > > shows message > > Formatting... 0% > > and then goes away apparently forever. I can confirm that this bug is still present in Emacs 24. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From unknown Sat Jun 21 03:18:49 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: Kevin Ryde Subject: bug#5108: closed (Re: bug#5108: 23.1; ps-print-buffer infinite loop on image-mode) Message-ID: References: <87vdgpf1ws.fsf@blah.blah> X-Gnu-PR-Message: they-closed 5108 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: confirmed Reply-To: 5108@debbugs.gnu.org Date: Mon, 19 Sep 2011 19:33:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1316460782-6186-1" This is a multi-part message in MIME format... ------------=_1316460782-6186-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #5108: 23.1; ps-print-buffer infinite loop on image-mode 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 5108@debbugs.gnu.org. --=20 5108: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D5108 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1316460782-6186-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 5108-done) by debbugs.gnu.org; 19 Sep 2011 19:32:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5jaD-0001bP-Fm for submit@debbugs.gnu.org; Mon, 19 Sep 2011 15:32:56 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5ja4-0001bB-Fb for 5108-done@debbugs.gnu.org; Mon, 19 Sep 2011 15:32:47 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAPaWd05FpZ7x/2dsb2JhbABCpzt4gVMBAQVWIxALNBIUGA0kvUmGeASgToRE X-IronPort-AV: E=Sophos;i="4.68,406,1312171200"; d="scan'208";a="137161929" Received: from 69-165-158-241.dsl.teksavvy.com (HELO pastel.home) ([69.165.158.241]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 19 Sep 2011 15:27:36 -0400 Received: by pastel.home (Postfix, from userid 20848) id 2A4EF591F1; Mon, 19 Sep 2011 15:27:36 -0400 (EDT) From: Stefan Monnier To: Lars Magne Ingebrigtsen Subject: Re: bug#5108: 23.1; ps-print-buffer infinite loop on image-mode Message-ID: References: <87vdgpf1ws.fsf@blah.blah> Date: Mon, 19 Sep 2011 15:27:36 -0400 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sun, 18 Sep 2011 11:46:19 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 5108-done Cc: 5108-done@debbugs.gnu.org, Kevin Ryde 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: -3.0 (---) >> (with-temp-buffer >> (insert-file-contents (concat data-directory "images/cut.xpm")) >> (image-mode) >> (ps-print-buffer "/tmp/foo.ps")) >> shows message >> Formatting... 0% >> and then goes away apparently forever. > I can confirm that this bug is still present in Emacs 24. Yes, it's the evil `intangible' property at work. I've installed the patch below which should fix the immediate inf-loop problem. I also removed the intangible property from image-mode to avoid similar problems in other codes. Stefan --- lisp/ps-mule.el 2011-04-19 13:44:55 +0000 +++ lisp/ps-mule.el 2011-09-19 18:57:29 +0000 @@ -659,7 +659,7 @@ width) (goto-char from) (while (not endpos) - (cond ((= (point) stop) + (cond ((>= (point) stop) (if (= stop to) (setq endpos stop) (when (< from stop) ------------=_1316460782-6186-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 2 Dec 2009 22:26:58 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.8 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB2MQuDD020595 for ; Wed, 2 Dec 2009 14:26:58 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFxex-0006PV-Ld for bug-gnu-emacs@gnu.org; Wed, 02 Dec 2009 17:26:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFxet-0006Kh-N6 for bug-gnu-emacs@gnu.org; Wed, 02 Dec 2009 17:26:55 -0500 Received: from [199.232.76.173] (port=38578 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFxet-0006KW-Fb for bug-gnu-emacs@gnu.org; Wed, 02 Dec 2009 17:26:51 -0500 Received: from mailout1-1.pacific.net.au ([61.8.2.208]:44235 helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NFxes-0003RY-ID for bug-gnu-emacs@gnu.org; Wed, 02 Dec 2009 17:26:51 -0500 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 89A1F514310 for ; Thu, 3 Dec 2009 09:26:44 +1100 (EST) Received: from blah.blah (ppp241D.dyn.pacific.net.au [61.8.36.29]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id C7E858C3E for ; Thu, 3 Dec 2009 09:26:43 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1NFxeW-0003QK-Tf for bug-gnu-emacs@gnu.org; Thu, 03 Dec 2009 09:26:29 +1100 From: Kevin Ryde To: bug-gnu-emacs@gnu.org Subject: 23.1; ps-print-buffer infinite loop on image-mode Date: Thu, 03 Dec 2009 09:26:27 +1100 Message-ID: <87vdgpf1ws.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) A ps-print-buffer on some image files in image-mode goes into an infinite loop. For example "cut.xpm" in the current emacs cvs, (progn (switch-to-buffer "x") (erase-buffer) (insert-file-contents (concat data-directory "images/cut.xpm")) (image-mode) (ps-print-buffer "/tmp/foo.ps")) shows message Formatting... 0% and then goes away apparently forever. debug-on-quit says the loop is ps-mule-plot-string. It seems (point) has gone past the intended `stop' position, so "(= (point) stop)" is not satisfied, or something like that. Might be the forward-char under "(looking-at ascii-or-latin-1)" going too far, maybe something to do with the image overlay, or point movement within image mode ... (What I actually hoped for was that it might print the image, but perhaps it doesn't print images at all ...) In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) of 2009-09-14 on raven, modified by Debian configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' 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: en_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default-enable-multibyte-characters: t ------------=_1316460782-6186-1--