GNU bug report logs - #27399
26.0.50; Tooltips displayed on images in shr do not line wrap

Previous Next

Package: emacs;

Reported by: asjo <at> koldfront.dk (Adam Sjøgren)

Date: Fri, 16 Jun 2017 16:06:02 UTC

Severity: normal

Found in version 26.0.50

Fixed in version 26.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27399 in the body.
You can then email your comments to 27399 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#27399; Package emacs. (Fri, 16 Jun 2017 16:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to asjo <at> koldfront.dk (Adam Sjøgren):
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 16 Jun 2017 16:06:02 GMT) Full text and rfc822 format available.

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

From: asjo <at> koldfront.dk (Adam Sjøgren)
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; Tooltips displayed on images in shr do not line wrap
Date: Fri, 16 Jun 2017 18:05:27 +0200
When displaying tooltips (the content of an HTML title attribute, for
instance) with long texts, the text is not line wrapped.

Here is a screenshot from an xkcd comic, showing the problem:

 · https://koldfront.dk/misc/gnu-emacs//gnus_shr_long_titles_wasnt_this_fixed.png

Tooltip texts should be line wrapped, because otherwise you can't read
the entire text. It used to be, as far as I remember, so this is
probably a regression.


In GNU Emacs 26.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.22.12)
 of 2017-06-12 built on tullinup
Repository revision: 6096f81151280b6db59c0432f86b63ae766b374a
Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
System Description:	Debian GNU/Linux 9.0 (stretch)

Recent messages:
Opening nnml server...done

Configured using:
 'configure --without-pop'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Summary

Minor modes in effect:
  engine-mode: t
  diff-auto-refine-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  dumb-jump-mode: t
  shell-dirtrack-mode: t
  which-function-mode: t
  global-auto-complete-mode: t
  save-place-mode: t
  jabber-activity-mode: t
  winner-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t

Load-path shadows:
~/elisp/extra/let-alist hides /usr/src/emacs/lisp/emacs-lisp/let-alist

Features:
(shadow nnir emacsbug misearch multi-isearch tramp-cmds vc-git
bbdb-hooks bbdb-mhe mh-comp sendmail mh-scan mh-gnus mh-e mh-compat
mh-buffers mh-loaddefs bbdb-rmail rmailsum url-http url-gw url-auth
gnus-gravatar gravatar sort smiley gnus-cite mm-archive qp gnus-async
gnus-bcklg gnus-dup gnus-ml disp-table gnus-topic utf-7 imap pp epa-file
network-stream nsm nnml bbdb-gnus bbdb-snarf nnnil gnus-demon shr svg
gnus-delay gnus-draft gnus-agent gnus-srvr gnus-score score-mode
nnvirtual nntp gnus-cache nndraft nnmh mail-extr spam spam-stat bbdb-com
warnings gnus-uu yenc gnus-msg gnus-html url-queue help-fns radix-tree
browse-url url-cache mm-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util bbdb-picture
gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group
gnus-undo gnus-fun hashcash gnus-start gnus-cloud nnimap nnmail
mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus
nnheader paren cus-start cus-load litable engine-mode magithub
magithub-ci magithub-issue magithub-cache magithub-core magit-obsolete
magit-blame magit-stash magit-bisect magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-branch magit-files
magit-refs magit-status magit package url-handlers url-parse url-vars
magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode
diff-mode magit-core magit-autorevert autorevert filenotify
magit-process magit-margin magit-mode magit-git crm magit-section
magit-popup git-commit magit-utils log-edit easy-mmode message puny
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils
mailheader pcvs-util add-log with-editor tramp-sh dumb-jump f dash s
etags xref project tramp tramp-compat tramp-loaddefs trampver
ucs-normalize shell pcomplete parse-time expand-region
cperl-mode-expansions text-mode-expansions html-mode-expansions
er-basic-expansions thingatpt expand-region-core expand-region-custom
which-func imenu cperl-mode auto-complete-config auto-complete popup
cl-extra help-mode easymenu saveplace vc vc-dispatcher bbdb-autoloads
bbdb timezone boxquote rect jabber-otr json map jabber
jabber-notifications notifications jabber-libnotify dbus jabber-awesome
jabber-osd jabber-wmii jabber-xmessage jabber-festival jabber-sawfish
jabber-ratpoison jabber-tmux jabber-screen jabber-socks5
jabber-ft-server jabber-si-server jabber-ft-client jabber-ft-common
jabber-si-client jabber-si-common jabber-feature-neg jabber-truncate
jabber-time jabber-autoaway jabber-vcard-avatars jabber-chatstates
jabber-events jabber-vcard jabber-avatar mailcap jabber-activity
jabber-watch jabber-modeline advice jabber-ahc-presence jabber-ahc
jabber-version jabber-ourversion jabber-muc-nick-completion hippie-exp
comint ansi-color jabber-browse jabber-search jabber-register
jabber-roster format-spec jabber-presence jabber-muc jabber-bookmarks
jabber-private jabber-muc-nick-coloring hexrgb jabber-widget
jabber-disco wid-edit jabber-chat jabber-history jabber-mam
jabber-chatbuffer jabber-alert jabber-iq jabber-core jabber-console
sgml-mode seq dom ewoc jabber-keymap jabber-sasl sasl sasl-anonymous
sasl-login sasl-plain fsm jabber-logon jabber-conn srv dns starttls tls
jabber-xml xml jabber-menu jabber-util auth-source cl-seq eieio byte-opt
bytecomp byte-compile cconv eieio-core cl-macs eieio-loaddefs
password-cache cl gv winner ring gnutls find-file-from-selection subr-x
find-lisp dired dired-loaddefs cap-words superword subword edmacro
kmacro cl-loaddefs cl-lib server time-date mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors 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 composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray 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 dbusbind inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 687201 37906)
 (symbols 48 159387 1)
 (miscs 40 3485 639)
 (strings 32 236408 17606)
 (string-bytes 1 11514264)
 (vectors 16 71051)
 (vector-slots 8 1232959 24792)
 (floats 8 412 1004)
 (intervals 56 785 131)
 (buffers 976 37))

-- 
 "Hur långt man än har kommit                                 Adam Sjøgren
  är det alltid längre kvar"                             asjo <at> koldfront.dk




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27399; Package emacs. (Fri, 16 Jun 2017 16:31:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: asjo <at> koldfront.dk (Adam Sjøgren)
Cc: 27399 <at> debbugs.gnu.org
Subject: Re: bug#27399: 26.0.50;
 Tooltips displayed on images in shr do not line wrap
Date: Fri, 16 Jun 2017 19:30:13 +0300
> From: asjo <at> koldfront.dk (Adam Sjøgren)
> Date: Fri, 16 Jun 2017 18:05:27 +0200
> 
> 
> When displaying tooltips (the content of an HTML title attribute, for
> instance) with long texts, the text is not line wrapped.
> 
> Here is a screenshot from an xkcd comic, showing the problem:
> 
>  · https://koldfront.dk/misc/gnu-emacs//gnus_shr_long_titles_wasnt_this_fixed.png
> 
> Tooltip texts should be line wrapped, because otherwise you can't read
> the entire text. It used to be, as far as I remember, so this is
> probably a regression.

Are you sure you saw lines wrapping in tooltips?  AFAIR, text shown in
a tooltip should be preformatted to not require wrapping.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27399; Package emacs. (Fri, 16 Jun 2017 16:44:02 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Adam Sjøgren <asjo <at> koldfront.dk>, 27399 <at> debbugs.gnu.org
Subject: Re: bug#27399: 26.0.50;
 Tooltips displayed on images in shr do not line wrap
Date: Fri, 16 Jun 2017 18:43:24 +0200
On Fri, 16 Jun 2017 19:30:13 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: asjo <at> koldfront.dk (Adam Sjøgren)
>> Date: Fri, 16 Jun 2017 18:05:27 +0200
>> 
>> 
>> When displaying tooltips (the content of an HTML title attribute, for
>> instance) with long texts, the text is not line wrapped.
>> 
>> Here is a screenshot from an xkcd comic, showing the problem:
>> 
>>  · https://koldfront.dk/misc/gnu-emacs//gnus_shr_long_titles_wasnt_this_fixed.png
>> 
>> Tooltip texts should be line wrapped, because otherwise you can't read
>> the entire text. It used to be, as far as I remember, so this is
>> probably a regression.
>
> Are you sure you saw lines wrapping in tooltips?  AFAIR, text shown in
> a tooltip should be preformatted to not require wrapping.

From the screenshot this looks like it's using the GTK+ system tooltip,
and I can confirm the observation with x-gtk-use-system-tooltips set to
t (the default).  But when I set this variable to nil to use the builtin
Emacs tooltip, the tooltip does have wrapped lines.

Steve




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27399; Package emacs. (Fri, 16 Jun 2017 16:53:02 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Adam Sjøgren <asjo <at> koldfront.dk>, 27399 <at> debbugs.gnu.org
Subject: Re: bug#27399: 26.0.50;
 Tooltips displayed on images in shr do not line wrap
Date: Fri, 16 Jun 2017 18:52:27 +0200
On Fri, 16 Jun 2017 18:43:24 +0200 Stephen Berman <stephen.berman <at> gmx.net> wrote:

> On Fri, 16 Jun 2017 19:30:13 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>>> From: asjo <at> koldfront.dk (Adam Sjøgren)
>>> Date: Fri, 16 Jun 2017 18:05:27 +0200
>>> 
>>> 
>>> When displaying tooltips (the content of an HTML title attribute, for
>>> instance) with long texts, the text is not line wrapped.
>>> 
>>> Here is a screenshot from an xkcd comic, showing the problem:
>>> 
>>>  · https://koldfront.dk/misc/gnu-emacs//gnus_shr_long_titles_wasnt_this_fixed.png
>>> 
>>> Tooltip texts should be line wrapped, because otherwise you can't read
>>> the entire text. It used to be, as far as I remember, so this is
>>> probably a regression.
>>
>> Are you sure you saw lines wrapping in tooltips?  AFAIR, text shown in
>> a tooltip should be preformatted to not require wrapping.
>
>> From the screenshot this looks like it's using the GTK+ system tooltip,
> and I can confirm the observation with x-gtk-use-system-tooltips set to
> t (the default).  But when I set this variable to nil to use the builtin
> Emacs tooltip, the tooltip does have wrapped lines.

To be more precise: with the built-in Emacs tooltips, the text of the
tooltip in the above screenshot is displayed in four lines, not with
word-wrapping but wrapping at the tooltip window's edge.

Steve Berman




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27399; Package emacs. (Fri, 16 Jun 2017 17:27:01 GMT) Full text and rfc822 format available.

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

From: asjo <at> koldfront.dk (Adam Sjøgren)
To: 27399 <at> debbugs.gnu.org
Subject: Re: bug#27399: 26.0.50;
 Tooltips displayed on images in shr do not line wrap
Date: Fri, 16 Jun 2017 19:26:32 +0200
Eli writes:

>> When displaying tooltips (the content of an HTML title attribute, for
>> instance) with long texts, the text is not line wrapped.
>> 
>> Here is a screenshot from an xkcd comic, showing the problem:
>> 
>>  · https://koldfront.dk/misc/gnu-emacs//gnus_shr_long_titles_wasnt_this_fixed.png
>> 
>> Tooltip texts should be line wrapped, because otherwise you can't read
>> the entire text. It used to be, as far as I remember, so this is
>> probably a regression.

> Are you sure you saw lines wrapping in tooltips?  AFAIR, text shown in
> a tooltip should be preformatted to not require wrapping.

I'm pretty sure, I contributed a patch in 2014 implementing it in
shr.el:

 · http://article.gmane.org/gmane.emacs.devel/179964/

As a result a slightly way to fix the problem was committed by Lars:

 · http://article.gmane.org/gmane.emacs.devel/180011
 · http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/net/shr.el?id=76f9994d677e0440584216e4e47be37e2d3dc312

But it seems not to work any more.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27399; Package emacs. (Thu, 22 Jun 2017 01:17:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: asjo <at> koldfront.dk (Adam Sjøgren)
Cc: 27399 <at> debbugs.gnu.org
Subject: Re: bug#27399: 26.0.50;
 Tooltips displayed on images in shr do not line wrap
Date: Wed, 21 Jun 2017 21:16:19 -0400
I guess this broke in 656caef.

--- i/lisp/net/shr.el
+++ w/lisp/net/shr.el
@@ -512,6 +512,7 @@ shr-fill-text
                                        (* (frame-char-width) 2)
                                      0))))
 	(shr-insert text)
+	(shr-fill-lines (point-min) (point-max))
 	(buffer-string)))))
 
 (define-inline shr-char-breakable-p (char)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27399; Package emacs. (Thu, 22 Jun 2017 14:46:02 GMT) Full text and rfc822 format available.

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

From: asjo <at> koldfront.dk (Adam Sjøgren)
To: Glenn Morris <rgm <at> gnu.org>
Cc: 27399 <at> debbugs.gnu.org
Subject: Re: bug#27399: 26.0.50;
 Tooltips displayed on images in shr do not line wrap
Date: Thu, 22 Jun 2017 16:45:11 +0200
Glenn writes:

> I guess this broke in 656caef.

Lars mentioned that it probably was broken during the proportional font
changes, so that sounds like you agree.

Your patch:

> --- i/lisp/net/shr.el
> +++ w/lisp/net/shr.el
> @@ -512,6 +512,7 @@ shr-fill-text
>                                         (* (frame-char-width) 2)
>                                       0))))
>  	(shr-insert text)
> +	(shr-fill-lines (point-min) (point-max))
>  	(buffer-string)))))

however, does not seem to work for me.

When I edebug-defun the function and step through it (point-min) and
(point-max) both return 1, which I don't know is the reason it doesn't
help, but it looked kind of suspicious to me.

I can send the messages when stepping through the function, if that is
of any use.


  Thanks for looking at this!

    Adam

-- 
 "I gotta go right now; someone is videotaping me in          Adam Sjøgren
  my spaceship"                                          asjo <at> koldfront.dk




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27399; Package emacs. (Thu, 22 Jun 2017 14:48:02 GMT) Full text and rfc822 format available.

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

From: asjo <at> koldfront.dk (Adam Sjøgren)
To: Glenn Morris <rgm <at> gnu.org>
Cc: 27399 <at> debbugs.gnu.org
Subject: Re: bug#27399: 26.0.50;
 Tooltips displayed on images in shr do not line wrap
Date: Thu, 22 Jun 2017 16:47:22 +0200
Just as I sent the email, I realized I had messed up and applied your
patch wrong (I had it filling before inserting, d'oh). It works perfectly.

Thanks!

-- 
 "I do not find reading diffs in email to be a                Adam Sjøgren
  hardship, but I used to walk uphill both ways to       asjo <at> koldfront.dk
  school, so I dunno."




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Thu, 22 Jun 2017 18:14:02 GMT) Full text and rfc822 format available.

Notification sent to asjo <at> koldfront.dk (Adam Sjøgren):
bug acknowledged by developer. (Thu, 22 Jun 2017 18:14:02 GMT) Full text and rfc822 format available.

Message #31 received at 27399-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 27399-done <at> debbugs.gnu.org
Subject: Re: bug#27399: 26.0.50;
 Tooltips displayed on images in shr do not line wrap
Date: Thu, 22 Jun 2017 14:13:13 -0400
Version: 26.1

Applied as 18896f7.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 21 Jul 2017 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 62 days ago.

Previous Next


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