[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5108: 23.1; ps-print-buffer infinite loop on image-mode
From: |
Stefan Monnier |
Subject: |
bug#5108: 23.1; ps-print-buffer infinite loop on image-mode |
Date: |
Mon, 19 Sep 2011 15:27:36 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> (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)