all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: tooltip-show with a timer
Date: Sat, 31 Jan 2009 22:10:11 +0100	[thread overview]
Message-ID: <87ab97ji6k.fsf@tux.homenetwork> (raw)
In-Reply-To: 49847F81.2030008@biostat.wisc.edu

Hi
Erik Iverson <iverson@biostat.wisc.edu> writes:

> If you don't know, you can then cancel the timer with
>
> M-x cancel-function-timers <RET> moving-tooltip <RET>

If you want to cancel timer you have to set it explicitely:

,----
| (setq my-timer (run-with-timer ....))
| (cancel-timer my-timer)
`----

> Erik Iverson wrote:
>> Hello all,
>>
>> Could someone help me understand what is going on here?
>>
>> Define a function called moving-tooltip, which simply shows a
>> tooltip that says "hi".
>>
>>
>> (defun moving-tooltip ()
>>  (tooltip-show "hi"))
>>
>> Then, hook the new function up to a timer that runs every two seconds.
>>
>> (run-with-timer 1 2 'moving-tooltip)
>>
>> Let the mouse come to rest, and you'll see the tooltip.  Don't move
>> the mouse, and the next time the tooltip timer is called, the
>> tooltip gets moved (specifically, to the upper-left corner of my
>> screen).
>>
>> Any ideas as to what is happening here?

,----[ C-h f tooltip-show RET ]
| tooltip-show is a compiled Lisp function in `tooltip.el'.
| 
| (tooltip-show text &optional use-echo-area)
| 
| Show a tooltip window displaying text.
| 
| Text larger than `x-max-tooltip-size' is clipped.
| 
| If the alist in `tooltip-frame-parameters' includes `left' and `top'
| parameters, they determine the x and y position where the tooltip
| is displayed.  Otherwise, the tooltip pops at offsets specified by
| `tooltip-x-offset' and `tooltip-y-offset' from the current mouse
| position.
| 
| Optional second arg use-echo-area non-nil means to show tooltip
| in echo area.
| 
| ===*===*===*===*===*===*===*===*===*===*===
`----

>> I'd love it if the tooltip just stayed where it was if the mouse
>> didn't move.
>>
>> Thanks,
>> Erik
>>
>>
>
>
>

-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France





      reply	other threads:[~2009-01-31 21:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-31 16:39 tooltip-show with a timer Erik Iverson
2009-01-31 16:42 ` Erik Iverson
2009-01-31 21:10   ` Thierry Volpiatto [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ab97ji6k.fsf@tux.homenetwork \
    --to=thierry.volpiatto@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.