GNU bug report logs -
#25863
25.1; garbage display by small image
Previous Next
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
To reply to this bug, email your comments to 25863 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25863
; Package
emacs
.
(Fri, 24 Feb 2017 15:40:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
ynyaaa <at> gmail.com
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 24 Feb 2017 15:40:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Evaluating the form below, the lower part of 'g' shape
remains to be displayed.
(progn
(switch-to-buffer (generate-new-buffer "temp"))
(insert-image (create-image (concat "P4\n8 22\n" (make-string 22 127))
'pbm t))
(insert ?g)
(redisplay)
(delete-char -1))
In GNU Emacs 25.1.1 (i686-w64-mingw32)
of 2016-09-18 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 6.0.6002
Configured using:
'configure --host=i686-w64-mingw32 --without-dbus
--without-compress-install CFLAGS=-static'
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS
Important settings:
value of $LANG: JPN
locale-coding-system: cp932
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
Load-path shadows:
None found.
Features:
(novice network-stream nsm starttls tls gnutls mailalias smtpmail
auth-source cl-seq eieio byte-opt bytecomp byte-compile cl-extra cconv
eieio-core cl-macs gv pp shadow sort mail-extr emacsbug message dired
format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns
help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr mail-utils
time-date mule-util japan-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table
w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote w32notify w32 multi-tty
make-network-process emacs)
Memory information:
((conses 8 107526 23155)
(symbols 32 21046 0)
(miscs 32 95 243)
(strings 16 20052 5589)
(string-bytes 1 577364)
(vectors 8 15163)
(vector-slots 4 542778 17060)
(floats 8 199 312)
(intervals 28 914 6)
(buffers 520 23))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25863
; Package
emacs
.
(Fri, 24 Feb 2017 18:22:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 25863 <at> debbugs.gnu.org (full text, mbox):
> From: ynyaaa <at> gmail.com
> Date: Sat, 25 Feb 2017 00:39:15 +0900
>
> Evaluating the form below, the lower part of 'g' shape
> remains to be displayed.
>
> (progn
> (switch-to-buffer (generate-new-buffer "temp"))
> (insert-image (create-image (concat "P4\n8 22\n" (make-string 22 127))
> 'pbm t))
> (insert ?g)
> (redisplay)
> (delete-char -1))
Not reproducible here.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25863
; Package
emacs
.
(Sat, 25 Feb 2017 08:49:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 25863 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Evaluating the form below, the lower part of 'g' shape
>> remains to be displayed.
>>
>> (progn
>> (switch-to-buffer (generate-new-buffer "temp"))
>> (insert-image (create-image (concat "P4\n8 22\n" (make-string 22 127))
>> 'pbm t))
>> (insert ?g)
>> (redisplay)
>> (delete-char -1))
>
> Not reproducible here.
Reducing the height of the image or enlarging the font may show garbages.
Otherwise I have no idea.
With emacs -Q, the font used is
"-outline-Courier New-normal-normal-normal-mono-20-*-*-*-c-*-iso8859-1".
In this case, garbages are shown with images of height from 11 to 22.
Setting the font to
"-outline-Courier New-normal-normal-normal-mono-16-*-*-*-c-*-iso8859-1".
In this case, garbages are shown with images of height from 9 to 18.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25863
; Package
emacs
.
(Sat, 25 Feb 2017 09:08:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 25863 <at> debbugs.gnu.org (full text, mbox):
> From: ynyaaa <at> gmail.com
> Cc: 25863 <at> debbugs.gnu.org
> Date: Sat, 25 Feb 2017 17:48:40 +0900
>
> >> (progn
> >> (switch-to-buffer (generate-new-buffer "temp"))
> >> (insert-image (create-image (concat "P4\n8 22\n" (make-string 22 127))
> >> 'pbm t))
> >> (insert ?g)
> >> (redisplay)
> >> (delete-char -1))
> >
> > Not reproducible here.
>
> Reducing the height of the image or enlarging the font may show garbages.
> Otherwise I have no idea.
>
> With emacs -Q, the font used is
> "-outline-Courier New-normal-normal-normal-mono-20-*-*-*-c-*-iso8859-1".
> In this case, garbages are shown with images of height from 11 to 22.
>
> Setting the font to
> "-outline-Courier New-normal-normal-normal-mono-16-*-*-*-c-*-iso8859-1".
> In this case, garbages are shown with images of height from 9 to 18.
I'm not sure I understand how to change the test case to account for
the above. Evaluating "(face-font 'default)" in "emacs -Q" produces
this:
"-outline-Courier New-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1"
How to change the test case to reproduce the problem with this font,
please?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25863
; Package
emacs
.
(Sat, 25 Feb 2017 10:12:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 25863 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
> I'm not sure I understand how to change the test case to account for
> the above. Evaluating "(face-font 'default)" in "emacs -Q" produces
> this:
>
> "-outline-Courier New-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1"
>
> How to change the test case to reproduce the problem with this font,
> please?
Starting emacs -Q and (set-frame-font
"-outline-Courier New-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1"),
the form below displayed garbage.
The value for 'h' may be modified between 9 and 16.
(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))
The attached image is the screen shot of the garbage display.
The left rectangle is the pbm image and the right rectangle
is text cursor, which looks shorter than the line height
where the line height equals to the image height.
[test-emacs-garbage.png (image/png, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25863
; Package
emacs
.
(Sat, 25 Feb 2017 12:20:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 25863 <at> debbugs.gnu.org (full text, mbox):
> From: ynyaaa <at> gmail.com
> Cc: 25863 <at> debbugs.gnu.org
> Date: Sat, 25 Feb 2017 19:11:41 +0900
>
> > "-outline-Courier New-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1"
> >
> > How to change the test case to reproduce the problem with this font,
> > please?
>
> Starting emacs -Q and (set-frame-font
> "-outline-Courier New-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1"),
> the form below displayed garbage.
> The value for 'h' may be modified between 9 and 16.
>
> (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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25863
; Package
emacs
.
(Sat, 25 Feb 2017 14:07:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 25863 <at> debbugs.gnu.org (full text, mbox):
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.
Severity set to 'minor' from 'normal'
Request was from
Eli Zaretskii <eliz <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sat, 25 Feb 2017 14:07:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25863
; Package
emacs
.
(Sun, 26 Feb 2017 00:00:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 25863 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> Fortunately, this is a fairly rare situation.
I think it is not so rare.
Long ago, I noticed that a small dot may be displayed near an image
when viewing it by find-file.
For a long time I was not aware that it is a small part of a glyph
which is displayed before buffer switching.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25863
; Package
emacs
.
(Sun, 26 Feb 2017 15:39:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 25863 <at> debbugs.gnu.org (full text, mbox):
> From: ynyaaa <at> gmail.com
> Cc: 25863 <at> debbugs.gnu.org
> Date: Sun, 26 Feb 2017 08:59:14 +0900
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
> > Fortunately, this is a fairly rare situation.
>
> I think it is not so rare.
>
> Long ago, I noticed that a small dot may be displayed near an image
> when viewing it by find-file.
> For a long time I was not aware that it is a small part of a glyph
> which is displayed before buffer switching.
It could be not so rare in your use patterns, but I was talking about
the average Emacs user out there. The fact is we didn't (AFAIR) see
bug reports about such problems, and even reproducing this on my
machine needed some effort. Which is not surprising, given the
particular relation between the default font size and the metrics and
position of the image needed to have the bug show itself.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25863
; Package
emacs
.
(Tue, 04 Aug 2020 09:17:01 GMT)
Full text and
rfc822 format available.
Message #34 received at 25863 <at> debbugs.gnu.org (full text, mbox):
ynyaaa <at> gmail.com writes:
> (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))
I can confirm that this bug is still present in Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) confirmed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 04 Aug 2020 09:17:02 GMT)
Full text and
rfc822 format available.
Forcibly Merged 25863 53217.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 13 Jan 2022 06:15:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 157 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.