From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: tooltip-show with a timer Date: Sat, 31 Jan 2009 22:10:11 +0100 Message-ID: <87ab97ji6k.fsf@tux.homenetwork> References: <49847EAC.3020708@biostat.wisc.edu> <49847F81.2030008@biostat.wisc.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1233436644 30951 80.91.229.12 (31 Jan 2009 21:17:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Jan 2009 21:17:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 31 22:18:38 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LTNEb-0008Ae-Ja for geh-help-gnu-emacs@m.gmane.org; Sat, 31 Jan 2009 22:18:37 +0100 Original-Received: from localhost ([127.0.0.1]:50674 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LTNDJ-0002Kx-54 for geh-help-gnu-emacs@m.gmane.org; Sat, 31 Jan 2009 16:17:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LTNCz-0002Kg-Tc for help-gnu-emacs@gnu.org; Sat, 31 Jan 2009 16:16:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LTNCy-0002KU-Hd for help-gnu-emacs@gnu.org; Sat, 31 Jan 2009 16:16:56 -0500 Original-Received: from [199.232.76.173] (port=36399 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LTNCy-0002KR-CV for help-gnu-emacs@gnu.org; Sat, 31 Jan 2009 16:16:56 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:43662 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LTNCx-0007gO-PH for help-gnu-emacs@gnu.org; Sat, 31 Jan 2009 16:16:56 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LTNCt-0008E1-75 for help-gnu-emacs@gnu.org; Sat, 31 Jan 2009 21:16:51 +0000 Original-Received: from 90.211.85-79.rev.gaoland.net ([79.85.211.90]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 31 Jan 2009 21:16:51 +0000 Original-Received: from thierry.volpiatto by 90.211.85-79.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 31 Jan 2009 21:16:51 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 72 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 90.211.85-79.rev.gaoland.net User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:7rCXkiAqGplThzEWPe3tY/W6gwQ= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61806 Archived-At: Hi Erik Iverson writes: > If you don't know, you can then cancel the timer with > > M-x cancel-function-timers moving-tooltip 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