all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Can't use tooltip of dictionary package in Emacs 23
@ 2006-06-18  8:02 Chiyuan Zhang
  2007-03-16  5:37 ` Xingang Zhang
  0 siblings, 1 reply; 12+ messages in thread
From: Chiyuan Zhang @ 2006-06-18  8:02 UTC (permalink / raw)


hello! I'm using cvs emacs-unicode-2, I have my own dictd installed
and I use dictionary package to connect to it. There is a tooltip
utility of dictionary: when you point to a word with your mouse for a
moment, a tooltip is displayed to show the meaning of the word. My
configure is

,----------[ dictionary config ]
| (setq dictionary-tooltip-dictionary "wn")
| (require 'dictionary)
| (global-dictionary-tooltip-mode t)
`----------

I tried emacs21 of Debian package, it works perfectly with the same
config file. I want to use the xft utility of Emacs 23 but will
anybody tell me what's wrong with the tooltip utility?

BTW: My Emacs 23 can show tooltip perfectly when I
invoke (tooltip-show "message") mannually , so I wonder is there
anything other than tooltip wrong? Is it the timer or sth. else?

Thanks!

With,
  Regards
                                         Chiyuan Zhang

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Can't use tooltip of dictionary package in Emacs 23
       [not found] <mailman.2992.1150617753.9609.help-gnu-emacs@gnu.org>
@ 2006-06-18 12:08 ` Tassilo Horn
  2006-06-19  3:50   ` pluskid
  0 siblings, 1 reply; 12+ messages in thread
From: Tassilo Horn @ 2006-06-18 12:08 UTC (permalink / raw)


"Chiyuan Zhang" <pluskid.zju@gmail.com> writes:

Hi Chiyuan,

> [dictionary-tooltips don't work with emacs >= 22.]

Two month ago I wrote a german-english translation app (in Ruby, RDictCc
[1]) and tried to integrate it into GNU Emacs, so that I easily can
translate the word at point or replace it with its translation.

Then I thought those tooltips could be nice and had a look on how
dictionary.el implements it. But it didn't work at all. I'm not sure if
it's a bug in emacs 22, or if it was rather an intended change.

So to make it short: Yes, dictionary.el's tooltips don't work with
emacsen >= 22.

Bye,
Tassilo

Footnotes: 
[1] http://www.uni-koblenz.de/%7Eheimdall/apps.php
-- 
"Emacs is not a development tool but a way of life."
     - David Kastrup in alt.religion.emacs -

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Can't use tooltip of dictionary package in Emacs 23
  2006-06-18 12:08 ` Can't use tooltip of dictionary package in Emacs 23 Tassilo Horn
@ 2006-06-19  3:50   ` pluskid
  2006-06-19 14:54     ` Tassilo Horn
  0 siblings, 1 reply; 12+ messages in thread
From: pluskid @ 2006-06-19  3:50 UTC (permalink / raw)


Hi Tassilo!
   You mentioned you looked on how dictionary.el implemented it.
Can you explain how it implement? Then maybe we can look on
Emacs's source code or consult the developers of Emacs to solve
this problem. :)

Tassilo Horn wrote:
> "Chiyuan Zhang" <pluskid.zju@gmail.com> writes:
>
> Hi Chiyuan,
>
> > [dictionary-tooltips don't work with emacs >= 22.]
>
> Two month ago I wrote a german-english translation app (in Ruby, RDictCc
> [1]) and tried to integrate it into GNU Emacs, so that I easily can
> translate the word at point or replace it with its translation.
>
> Then I thought those tooltips could be nice and had a look on how
> dictionary.el implements it. But it didn't work at all. I'm not sure if
> it's a bug in emacs 22, or if it was rather an intended change.
>
> So to make it short: Yes, dictionary.el's tooltips don't work with
> emacsen >= 22.
>
> Bye,
> Tassilo
>
> Footnotes:
> [1] http://www.uni-koblenz.de/%7Eheimdall/apps.php
> --
> "Emacs is not a development tool but a way of life."
>      - David Kastrup in alt.religion.emacs -

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Can't use tooltip of dictionary package in Emacs 23
  2006-06-19  3:50   ` pluskid
@ 2006-06-19 14:54     ` Tassilo Horn
  2006-06-25 11:51       ` Leon
       [not found]       ` <mailman.3302.1151236323.9609.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 12+ messages in thread
From: Tassilo Horn @ 2006-06-19 14:54 UTC (permalink / raw)


"pluskid" <pluskid.zju@gmail.com> writes:

Hi,

>    You mentioned you looked on how dictionary.el implemented it.  Can
> you explain how it implement?

Well, this is basically the code dictionary.el uses for tooltips on GNU
Emacs:

--8<---------------cut here---------------start------------->8---
(defun dictionary-display-tooltip (event)
  "Search the current word in the `dictionary-tooltip-dictionary'."
  (interactive "e")
  ;; Process event and show tooltip
  )

;;;###autoload
(defun dictionary-tooltip-mode (&optional arg)
  "Display tooltips for the current word"
  (interactive "P")
  ;; - snip -
    (add-hook 'tooltip-hook 'dictionary-display-tooltip)
    (make-local-variable 'track-mouse)
    (setq track-mouse on)))
--8<---------------cut here---------------end--------------->8---

By setting the `track-mouse' variable to a non-nil value, mouse motion
events should be generated. When it's time to display a tooltip each
function in `tooltip-hook' is called with an event which can be used to
extract the word under the mouse pointer, etc.

As a test case you could evaluate the following code in *scratch*.

--8<---------------cut here---------------start------------->8---
(progn
  (defun foo (event)
    (interactive "e")
    (message "Gotten Event")
    (tooltip-show "Huzzah!"))
  (add-hook 'tooltip-hook 'foo)
  (setq track-mouse t)
  (tooltip-mode 1))
--8<---------------cut here---------------end--------------->8---

On GNU Emacs 21 this should open tooltips with "Huzzah!" in it, and
"Gotten Event" should be printed in the echo area. (Can someone test it?
I don't have emacs 21 accessible right now.)

On GNU Emacs 22 nothing happens -- it's even worse. All tooltips which
appeared before, for example the modeline help, don't appear anymore
after setting `track-mouse' to non-nil.

Bye,
Tassilo
-- 
A child of five could understand this! Fetch me a child of five!

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Can't use tooltip of dictionary package in Emacs 23
  2006-06-19 14:54     ` Tassilo Horn
@ 2006-06-25 11:51       ` Leon
       [not found]       ` <mailman.3302.1151236323.9609.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 12+ messages in thread
From: Leon @ 2006-06-25 11:51 UTC (permalink / raw)


Tassilo Horn <heimdall@uni-koblenz.de> writes:

> "pluskid" <pluskid.zju@gmail.com> writes:
>
> Hi,
>
>>    You mentioned you looked on how dictionary.el implemented it.  Can
>> you explain how it implement?
>
> Well, this is basically the code dictionary.el uses for tooltips on GNU
> Emacs:
>
> --8<---------------cut here---------------start------------->8---
> (defun dictionary-display-tooltip (event)
>   "Search the current word in the `dictionary-tooltip-dictionary'."
>   (interactive "e")
>   ;; Process event and show tooltip
>   )
>
> ;;;###autoload
> (defun dictionary-tooltip-mode (&optional arg)
>   "Display tooltips for the current word"
>   (interactive "P")
>   ;; - snip -
>     (add-hook 'tooltip-hook 'dictionary-display-tooltip)
>     (make-local-variable 'track-mouse)
>     (setq track-mouse on)))
> --8<---------------cut here---------------end--------------->8---
>
> By setting the `track-mouse' variable to a non-nil value, mouse motion
> events should be generated. When it's time to display a tooltip each
> function in `tooltip-hook' is called with an event which can be used to
> extract the word under the mouse pointer, etc.
>
> As a test case you could evaluate the following code in *scratch*.
>
> --8<---------------cut here---------------start------------->8---
> (progn
>   (defun foo (event)
>     (interactive "e")
>     (message "Gotten Event")
>     (tooltip-show "Huzzah!"))
>   (add-hook 'tooltip-hook 'foo)
>   (setq track-mouse t)
>   (tooltip-mode 1))
> --8<---------------cut here---------------end--------------->8---
>
> On GNU Emacs 21 this should open tooltips with "Huzzah!" in it, and
> "Gotten Event" should be printed in the echo area. (Can someone test it?
> I don't have emacs 21 accessible right now.)
>
> On GNU Emacs 22 nothing happens -- it's even worse. All tooltips which
> appeared before, for example the modeline help, don't appear anymore
> after setting `track-mouse' to non-nil.
>
> Bye,
> Tassilo

Hope someone have time to take a look. It seems not very
complicated. Besides if the tooltip is enabled it will cause the mouse
to misbehave[1] (in emacs 22).

Footnotes: 
[1]  http://article.gmane.org/gmane.emacs.pretest.bugs/11443

-- 
Leon

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Can't use tooltip of dictionary package in Emacs 23
       [not found]       ` <mailman.3302.1151236323.9609.help-gnu-emacs@gnu.org>
@ 2006-06-25 12:34         ` pluskid
  2006-06-29 20:56           ` Leon
       [not found]           ` <mailman.3533.1151614629.9609.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 12+ messages in thread
From: pluskid @ 2006-06-25 12:34 UTC (permalink / raw)


Hmm, I remember I have sent a mail to bug-gnu-emacs .
But I didn't see that mail. Is there any rule that must be
followed to send mail to bug-gnu-emacs ? I didn't receive
any delivery  failure report. Hmm, it's so strange.
Hope someone could take a look at this bug of tooltip.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Can't use tooltip of dictionary package in Emacs 23
  2006-06-25 12:34         ` pluskid
@ 2006-06-29 20:56           ` Leon
       [not found]           ` <mailman.3533.1151614629.9609.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 12+ messages in thread
From: Leon @ 2006-06-29 20:56 UTC (permalink / raw)


"pluskid" <pluskid.zju@gmail.com> writes:

> Hmm, I remember I have sent a mail to bug-gnu-emacs .
> But I didn't see that mail. Is there any rule that must be
> followed to send mail to bug-gnu-emacs ? I didn't receive
> any delivery  failure report. Hmm, it's so strange.
> Hope someone could take a look at this bug of tooltip.

The author of dictionary-el is quite busy and probably has no time to
solve this bug for emacs 22. So some community help will definitely be
much appreciated.

-- 
Leon

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Can't use tooltip of dictionary package in Emacs 23
       [not found]           ` <mailman.3533.1151614629.9609.help-gnu-emacs@gnu.org>
@ 2006-06-29 21:25             ` Tassilo Horn
  2006-06-30  0:58               ` Leon
       [not found]               ` <mailman.3544.1151629100.9609.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 12+ messages in thread
From: Tassilo Horn @ 2006-06-29 21:25 UTC (permalink / raw)


Leon <sdl.web@gmail.com> writes:

Hi Leon,

> The author of dictionary-el is quite busy and probably has no time to
> solve this bug for emacs 22. So some community help will definitely be
> much appreciated.

Is the author of dictionary-el responsible for emacs' tooltips? AFAIKS
the bug is in emacs, not dictionary-el.

Or do I get you wrong?

Bye,
Tassilo
-- 
A morning without coffee is like something without something else.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Can't use tooltip of dictionary package in Emacs 23
  2006-06-29 21:25             ` Tassilo Horn
@ 2006-06-30  0:58               ` Leon
       [not found]               ` <mailman.3544.1151629100.9609.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 12+ messages in thread
From: Leon @ 2006-06-30  0:58 UTC (permalink / raw)


Tassilo Horn <heimdall@uni-koblenz.de> writes:

> Leon <sdl.web@gmail.com> writes:
>
> Hi Leon,
>
>> The author of dictionary-el is quite busy and probably has no time to
>> solve this bug for emacs 22. So some community help will definitely be
>> much appreciated.
>
> Is the author of dictionary-el responsible for emacs' tooltips? AFAIKS
> the bug is in emacs, not dictionary-el.
>
> Or do I get you wrong?
>
> Bye,
> Tassilo

Tassilo, I could be wrong since I know very little elisp. But if it is
a fault of emacs, could you submit a bug report? It's hard for me to
describe the bug.

-- 
Leon

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Can't use tooltip of dictionary package in Emacs 23
       [not found]               ` <mailman.3544.1151629100.9609.help-gnu-emacs@gnu.org>
@ 2006-06-30 11:31                 ` Tassilo Horn
  2006-06-30 22:25                   ` Leon
  0 siblings, 1 reply; 12+ messages in thread
From: Tassilo Horn @ 2006-06-30 11:31 UTC (permalink / raw)


Leon <sdl.web@gmail.com> writes:

Hi Leon,

> Tassilo, I could be wrong since I know very little elisp. But if it is
> a fault of emacs, could you submit a bug report? It's hard for me to
> describe the bug.

I submitted a bug report to emacs-pretest-bug, which currently awaits
moderator approval. Message-ID is <87wtazt656.fsf@baldur.nicundtas.de>.

Bye,
Tassilo
-- 
My opinions may have changed, but not the fact that I am right.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Can't use tooltip of dictionary package in Emacs 23
  2006-06-30 11:31                 ` Tassilo Horn
@ 2006-06-30 22:25                   ` Leon
  0 siblings, 0 replies; 12+ messages in thread
From: Leon @ 2006-06-30 22:25 UTC (permalink / raw)


Tassilo Horn <heimdall@uni-koblenz.de> writes:

> Leon <sdl.web@gmail.com> writes:
>
> Hi Leon,
>
>> Tassilo, I could be wrong since I know very little elisp. But if it is
>> a fault of emacs, could you submit a bug report? It's hard for me to
>> describe the bug.
>
> I submitted a bug report to emacs-pretest-bug, which currently awaits
> moderator approval. Message-ID is <87wtazt656.fsf@baldur.nicundtas.de>.
>
> Bye,
> Tassilo

Tassilo, I have seen your post in emacs-pretest-bug. Thank you.

-- 
Leon

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Can't use tooltip of dictionary package in Emacs 23
  2006-06-18  8:02 Chiyuan Zhang
@ 2007-03-16  5:37 ` Xingang Zhang
  0 siblings, 0 replies; 12+ messages in thread
From: Xingang Zhang @ 2007-03-16  5:37 UTC (permalink / raw)
  To: help-gnu-emacs


any solution or patch so far? I had the similar problem and would like
to know the answer. Thanks a lot!

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-03-16  5:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.2992.1150617753.9609.help-gnu-emacs@gnu.org>
2006-06-18 12:08 ` Can't use tooltip of dictionary package in Emacs 23 Tassilo Horn
2006-06-19  3:50   ` pluskid
2006-06-19 14:54     ` Tassilo Horn
2006-06-25 11:51       ` Leon
     [not found]       ` <mailman.3302.1151236323.9609.help-gnu-emacs@gnu.org>
2006-06-25 12:34         ` pluskid
2006-06-29 20:56           ` Leon
     [not found]           ` <mailman.3533.1151614629.9609.help-gnu-emacs@gnu.org>
2006-06-29 21:25             ` Tassilo Horn
2006-06-30  0:58               ` Leon
     [not found]               ` <mailman.3544.1151629100.9609.help-gnu-emacs@gnu.org>
2006-06-30 11:31                 ` Tassilo Horn
2006-06-30 22:25                   ` Leon
2006-06-18  8:02 Chiyuan Zhang
2007-03-16  5:37 ` Xingang Zhang

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.