GNU bug report logs - #25863
25.1; garbage display by small image

Previous Next

Package: emacs;

Reported by: ynyaaa <at> gmail.com

Date: Fri, 24 Feb 2017 15:40:02 UTC

Severity: normal

Tags: confirmed

Merged with 53217

Found in versions 25.1, 27.2

Full log


Message #23 received at 25863 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: ynyaaa <at> gmail.com
Cc: 25863 <at> debbugs.gnu.org
Subject: Re: bug#25863: 25.1; garbage display by small image
Date: Sat, 25 Feb 2017 16:05:54 +0200
severity 25863 minor
thanks

> Date: Sat, 25 Feb 2017 14:19:19 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 25863 <at> debbugs.gnu.org
> 
> > (let ((h 16))
> >   (switch-to-buffer (generate-new-buffer "temp"))
> >   (insert-image (create-image (concat (format "P4\n8 %d\n" h)
> >                                       (make-string h 127))
> >                               'pbm t))
> >   (insert ?g)
> >   (redisplay)
> >   (delete-char -1))
> 
> Thanks, I see it now.

Looks like a basic deficiency in the design of the Emacs redisplay,
and in particular the way screen lines are redrawn when they have
variable-height glyphs.

Fortunately, this is a fairly rare situation.  In the recipe above,
it's enough to make a very small change to make the problem go away:

(let ((h 16))
  (switch-to-buffer (generate-new-buffer "temp"))
  (insert "x")     ;; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  (insert-image (create-image (concat (format "P4\n8 %d\n" h)
                                      (make-string h 127))
                              'pbm t))
  (insert ?g)
  (redisplay)
  (delete-char -1))

Or maybe I'm missing something; ideas are welcome.




This bug report was last modified 3 years and 158 days ago.

Previous Next


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