From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xiaolong Zhang Newsgroups: gmane.emacs.bugs Subject: bug#20518: 24.5; Tooltip on Ubuntu 12.04/14.04 can't render Date: Fri, 8 May 2015 02:28:13 +0800 Message-ID: References: <554A6420.8090109@gmail.com> <2DA4923E-4C05-45C4-99BE-3DCE73479094@swipnet.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0122a25e18ad8b0515821387 X-Trace: ger.gmane.org 1431023364 5242 80.91.229.3 (7 May 2015 18:29:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 May 2015 18:29:24 +0000 (UTC) Cc: 20518-done@debbugs.gnu.org To: "Jan D." Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 07 20:29:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YqQXn-0006RI-Uz for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 May 2015 20:29:12 +0200 Original-Received: from localhost ([::1]:52477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqQXn-0003d1-Ed for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 May 2015 14:29:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqQXj-0003cl-5q for bug-gnu-emacs@gnu.org; Thu, 07 May 2015 14:29:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqQXf-0008PC-PH for bug-gnu-emacs@gnu.org; Thu, 07 May 2015 14:29:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqQXf-0008P6-L2 for bug-gnu-emacs@gnu.org; Thu, 07 May 2015 14:29:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YqQXe-0005BA-MG for bug-gnu-emacs@gnu.org; Thu, 07 May 2015 14:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Xiaolong Zhang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 May 2015 18:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20518 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20518-done@debbugs.gnu.org id=D20518.143102330419865 (code D ref 20518); Thu, 07 May 2015 18:29:02 +0000 Original-Received: (at 20518-done) by debbugs.gnu.org; 7 May 2015 18:28:24 +0000 Original-Received: from localhost ([127.0.0.1]:38064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YqQX1-0005AJ-2s for submit@debbugs.gnu.org; Thu, 07 May 2015 14:28:24 -0400 Original-Received: from mail-ie0-f170.google.com ([209.85.223.170]:36705) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YqQWx-0005A5-Di for 20518-done@debbugs.gnu.org; Thu, 07 May 2015 14:28:20 -0400 Original-Received: by iecnq11 with SMTP id nq11so46473447iec.3 for <20518-done@debbugs.gnu.org>; Thu, 07 May 2015 11:28:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=sQ5y4flc9lSqwKLqzp872uFC2FV2NMveOOKxgC4SjEM=; b=B7xCjaPz/QVOZl4DVBw9tFzYAtQv3GXn5QBg6LoDvhz1+wl7L9xlmnkM83KkLZ2bPR 7IRnO0upnIqdI/CNg56jIpJRf+SETcMlcJLrLaEzEsDmPni/SVhnc8tWEmy2txS0g5uy rGQkAzXh44bmsfM3NEpTOGHOy0nfFktICXlYBe4lwGz7nZ7hzc+1464BoV8izcWYFsSg 02pKWN6DkHUwXSr5o0uFvXBWtcr2DzdzrPAYUeIav0zdc9H6Ae0dVeYru7YISGIptmI3 QDVSnlgmoRLHjY1F90hBCaIZK4nzOvYtlHb3KQsK/+E2s+gHbMvAeYUHTPGiVzy9lZjM 13+w== X-Received: by 10.50.13.5 with SMTP id d5mr6323214igc.4.1431023293867; Thu, 07 May 2015 11:28:13 -0700 (PDT) Original-Received: by 10.64.79.33 with HTTP; Thu, 7 May 2015 11:28:13 -0700 (PDT) In-Reply-To: <2DA4923E-4C05-45C4-99BE-3DCE73479094@swipnet.se> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:102582 Archived-At: --089e0122a25e18ad8b0515821387 Content-Type: text/plain; charset=UTF-8 Hi Jan D, Thank you very much! It worked. Best regards, Xiaolong On Fri, May 8, 2015 at 1:44 AM, Jan D. wrote: > Hi. > > C-h f x-gtk-use-system-tooltips > > x-gtk-use-system-tooltips is a variable defined in `C source code'. > Its value is t > > Documentation: > If non-nil with a Gtk+ built Emacs, the Gtk+ tooltip is used. > Otherwise use Emacs own tooltip implementation. > When using Gtk+ tooltips, the tooltip face is not used. > > You can customize this variable. > > System tooltips only support text. Showing images in tooltips is perverse > IMHO. > > Jan D. > > > > 6 maj 2015 kl. 20:57 skrev Xiaolong Zhang : > > > > > > Hi list, > > > > The Dired+ package has a feature that with on a image filename, it will > > display a thumbnail of that image. However, it seems that emacs does not > > render tooltip correctly on my machine. > > > > Here is a code snippet I used for testing. > > > > > > > -----------8<---------------8<----------------------------------------------- > > ;; text in buffer can show image correctly > > (insert (propertize "text" 'display (create-image > "~/Dropbox/images/1.jpg"))) > > > > ;; tooltip can't render image correctly > > (defun get-tooltip(window object pos) > > (propertize "tooltip" 'display (create-image "~/Dropbox/images/1.jpg"))) > > (insert (propertize "text" 'mouse-face 'highlight 'help-echo > 'get-tooltip)) > > > > > -----------8<---------------8<-------------------------------------------- > > > > This file line can insert an image rendered in the buffer > > correctly. However, the second inserted text only show tooltip text, but > > not the image. > > > > I have tested the same code with the same image file on Ubuntu > > 12.04/14.04 with Emacs (24.5.1) -Q option. Both failed. > > > > I have also tested the code on a Windows 8.1 machine with pre-build > > Emacs 24.5. It render the tooltip image correctly. > > > > I'm wondering if this is a bug of Emacs or Ubuntu? > > > > Following is some auto-generated message for bug-report, so I keep it > FYI. > > > > Thank you guys! > > > > Best, > > Xiaolong > > > > In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) > > of 2015-05-07 on xlzhang-HP-EliteBook-Folio-9470m > > Windowing system distributor `The X.Org Foundation', version > 11.0.11501000 > > System Description: Ubuntu 12.04.5 LTS > > > > Important settings: > > value of $LANG: en_HK.UTF-8 > > value of $XMODIFIERS: @im=fcitx > > locale-coding-system: utf-8-unix > > > > Major mode: Emacs-Lisp > > > > Minor modes in effect: > > tooltip-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: > > Mark set > > Undo! > > get-tooltip > > nil > > Undo! > > nil > > Undo! > > Saving file /home/xlzhang/code/emacs-bug/emacs-bug.el... > > Wrote /home/xlzhang/code/emacs-bug/emacs-bug.el > > Making completion list... > > > > Load-path shadows: > > None found. > > > > Features: > > (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml > > mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev > > gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util > > help-fns mail-prsvr mail-utils help-mode easymenu time-date tooltip > > electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd > > tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment > > lisp-mode prog-mode register page menu-bar rfn-eshadow timer select > > scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham > > georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao > > korean japanese hebrew greek romanian slovak czech european ethiopic > > indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple > > abbrev minibuffer 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 make-network-process > > gfilenotify dynamic-setting system-font-setting font-render-setting > > move-toolbar gtk x-toolkit x multi-tty emacs) > > > > Memory information: > > ((conses 16 72398 9042) > > (symbols 48 17485 0) > > (miscs 40 40 138) > > (strings 32 9263 4439) > > (string-bytes 1 254881) > > (vectors 16 8985) > > (vector-slots 8 383624 17310) > > (floats 8 63 253) > > (intervals 56 202 11) > > (buffers 960 13) > > (heap 1024 11163 546)) > > > > > > > > --089e0122a25e18ad8b0515821387 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Jan D,

Thank you very much! It worked.
Best regards,
Xiaolong

On Fri, May 8, 2015 at 1:44 AM, = Jan D. <jan.h.d@swipnet.se> wrote:
Hi.

C-h f x-gtk-use-system-tooltips <RET>

x-gtk-use-system-tooltips is a variable defined in `C source code'.
Its value is t

Documentation:
If non-nil with a Gtk+ built Emacs, the Gtk+ tooltip is used.
Otherwise use Emacs own tooltip implementation.
When using Gtk+ tooltips, the tooltip face is not used.

You can customize this variable.

System tooltips only support text.=C2=A0 Showing images in tooltips is perv= erse IMHO.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 Jan D.


> 6 maj 2015 kl. 20:57 skrev Xiaolong Zhang <xlzhang921@gmail.com>:
>
>
> Hi list,
>
> The Dired+ package has a feature that with on a image filename, it wil= l
> display a thumbnail of that image. However, it seems that emacs does n= ot
> render tooltip correctly on my machine.
>
> Here is a code snippet I used for testing.
>
>
> -----------8<---------------8<----------------------------------= -------------
> ;; text in buffer can show image correctly
> (insert (propertize "text" 'display (create-image "= ~/Dropbox/images/1.jpg")))
>
> ;; tooltip can't render image correctly
> (defun get-tooltip(window object pos)
> (propertize "tooltip" 'display (create-image "~/Dro= pbox/images/1.jpg")))
> (insert (propertize "text" 'mouse-face 'highlight &#= 39;help-echo 'get-tooltip))
>
> -----------8<---------------8<----------------------------------= ----------
>
> This file line can insert an image rendered in the buffer
> correctly. However, the second inserted text only show tooltip text, b= ut
> not the image.
>
> I have tested the same code with the same image file on Ubuntu
> 12.04/14.04 with Emacs (24.5.1) -Q option. Both failed.
>
> I have also tested the code on a Windows 8.1 machine with pre-build > Emacs 24.5. It render the tooltip image correctly.
>
> I'm wondering if this is a bug of Emacs or Ubuntu?
>
> Following is some auto-generated message for bug-report, so I keep it = FYI.
>
> Thank you guys!
>
> Best,
> Xiaolong
>
> In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) > of 2015-05-07 on xlzhang-HP-EliteBook-Folio-9470m
> Windowing system distributor `The X.Org Foundation', version 11.0.= 11501000
> System Description: Ubuntu 12.04.5 LTS
>
> Important settings:
> value of $LANG: en_HK.UTF-8
> value of $XMODIFIERS: @im=3Dfcitx
> locale-coding-system: utf-8-unix
>
> Major mode: Emacs-Lisp
>
> Minor modes in effect:
> tooltip-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:
> Mark set
> Undo!
> get-tooltip
> nil
> Undo!
> nil
> Undo!
> Saving file /home/xlzhang/code/emacs-bug/emacs-bug.el...
> Wrote /home/xlzhang/code/emacs-bug/emacs-bug.el
> Making completion list...
>
> Load-path shadows:
> None found.
>
> Features:
> (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 m= ml
> mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev > gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
> help-fns mail-prsvr mail-utils help-mode easymenu time-date tooltip > electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-d= nd
> tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment=
> lisp-mode prog-mode register page menu-bar rfn-eshadow timer select > scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame ch= am
> georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
> korean japanese hebrew greek romanian slovak czech european ethiopic > indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple<= br> > abbrev minibuffer nadvice loaddefs button faces cus-face macroexp file= s
> text-properties overlay sha1 md5 base64 format env code-pages mule
> custom widget hashtable-print-readable backquote make-network-process<= br> > gfilenotify dynamic-setting system-font-setting font-render-setting > move-toolbar gtk x-toolkit x multi-tty emacs)
>
> Memory information:
> ((conses 16 72398 9042)
> (symbols 48 17485 0)
> (miscs 40 40 138)
> (strings 32 9263 4439)
> (string-bytes 1 254881)
> (vectors 16 8985)
> (vector-slots 8 383624 17310)
> (floats 8 63 253)
> (intervals 56 202 11)
> (buffers 960 13)
> (heap 1024 11163 546))
>
>
>


--089e0122a25e18ad8b0515821387--