From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Kevin Burton" Newsgroups: gmane.emacs.devel Subject: Re: Possible to show tooltip at (point) ???? Date: Sun, 28 Dec 2008 09:38:16 -0800 Message-ID: <30c6373b0812280938g33b93687qd06949687d44e980@mail.gmail.com> References: <30c6373b0812272248y7c51447ax15bcea34d8cce132@mail.gmail.com> <8763l47jpy.fsf@cyd.mit.edu> <30c6373b0812280124r6301ec1ka7e12d2e719126a1@mail.gmail.com> <49574CB0.5050600@gnu.org> <30c6373b0812280920y722b7822s7c844f0c73636545@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_121413_31983458.1230485896792" X-Trace: ger.gmane.org 1230485933 6573 80.91.229.12 (28 Dec 2008 17:38:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Dec 2008 17:38:53 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org, Jason Rumney To: "Lennart Borgman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 28 18:39:59 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LGzc8-0002wx-9G for ged-emacs-devel@m.gmane.org; Sun, 28 Dec 2008 18:39:44 +0100 Original-Received: from localhost ([127.0.0.1]:33458 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LGzau-00006T-V9 for ged-emacs-devel@m.gmane.org; Sun, 28 Dec 2008 12:38:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LGzaq-00006O-9N for emacs-devel@gnu.org; Sun, 28 Dec 2008 12:38:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LGzan-00006C-OK for emacs-devel@gnu.org; Sun, 28 Dec 2008 12:38:23 -0500 Original-Received: from [199.232.76.173] (port=34289 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LGzan-000069-KU for emacs-devel@gnu.org; Sun, 28 Dec 2008 12:38:21 -0500 Original-Received: from yw-out-1718.google.com ([74.125.46.153]:8385) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LGzaj-0003L0-Hl; Sun, 28 Dec 2008 12:38:17 -0500 Original-Received: by yw-out-1718.google.com with SMTP id 9so1486229ywk.66 for ; Sun, 28 Dec 2008 09:38:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type:references :x-google-sender-auth; bh=0dHiLSCRZkqUdqYxoNMVaHANVNFw41mhZJxpD+ldvt0=; b=ijAImRJr88SRfaHpzNEQao77ZgR6+SqgiiY3VLkwIxC15GPrqDqGzfMIqpZPLZaEd4 lqVy8V/Oc/KDlZ0LsgIa4rbhOLqLFDEzyQqj0jWwPcv0aSxybJONvia228lQPVbyy/n8 R5wKR6I3PBm0G69LARKC4COcLZWk4lzGJ37oQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=UIXIPstlmyX9bGgIMABWj7ttaHbQqoQ1KRqBB4XpFt967sVutSdRi78Cc6Ig7D7yXz mH5PyQ8mcJLzG57XDGuFAA6NfR1dvRszm8vLbXtkSoaK+s4noywKRPC577BAIFEXlimx SBLNcZx+ma0ZDV+WAjQL+4fam3XjB9gztvZSE= Original-Received: by 10.90.93.8 with SMTP id q8mr6190832agb.83.1230485896785; Sun, 28 Dec 2008 09:38:16 -0800 (PST) Original-Received: by 10.90.98.6 with HTTP; Sun, 28 Dec 2008 09:38:16 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: f55d7ab093c707a8 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:107343 Archived-At: ------=_Part_121413_31983458.1230485896792 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks..... looks like this is window relative not screen absolute. Pretty it sure it won't work with setting the tooltip but hope to be proven wrong :) I'll test it later tonight. Kevin On Sun, Dec 28, 2008 at 9:31 AM, Lennart Borgman wrote: > On Sun, Dec 28, 2008 at 6:20 PM, Kevin Burton wrote: > > In the predictive package? > > I think one just needs to compute the left-margin width. > > Here is what I have. There is indeed a problem with the left margin. > What change do you propose? > > (defun point-to-coord (point) > "Return coordinates of POINT in selected window. > The coordinates are in the form \(\(XOFFSET YOFFSET) WINDOW). > This form is suitable for `popup-menu'." > ;; Fix-me: showtip.el adds (window-inside-pixel-edges > ;; (selected-window)). Why? > (let* ((pn (posn-at-point point)) > (x-y (posn-x-y pn)) > (x (car x-y)) > (y (cdr x-y)) > (pos (list (list x (+ y 20)) (selected-window)))) > pos)) > > > I wrote a tooltip-at-point package a few years ago (but never got it t > work > > reliably) and added this into the mix.... > > Kevin > > > > On Sun, Dec 28, 2008 at 9:14 AM, Lennart Borgman < > lennart.borgman@gmail.com> > > wrote: > >> > >> On Sun, Dec 28, 2008 at 10:53 AM, Jason Rumney wrote: > >> > Kevin Burton wrote: > >> >> > >> >> You mean by specifying top and left? I think that is what I was > going > >> >> to > >> >> do to position the tooltip but first I need to find out the x/y of > the > >> >> current point. > >> > > >> > (posn-at-point &optional POS WINDOW) > >> > >> I think there is a bug with left margin. (Though I have not had time > >> to submit a bug report for this.) > -- Founder/CEO Spinn3r.com Location: San Francisco, CA AIM/YIM: sfburtonator Skype: burtonator Work: http://spinn3r.com ------=_Part_121413_31983458.1230485896792 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks..... looks like this is window relative not screen absolute.  

Pretty it sure it won't work with setting the tooltip but hope to be proven wrong :)

I'll test it later tonight.

Kevin

On Sun, Dec 28, 2008 at 9:31 AM, Lennart Borgman <lennart.borgman@gmail.com> wrote:
On Sun, Dec 28, 2008 at 6:20 PM, Kevin Burton <burton@spinn3r.com> wrote:
> In the predictive package?
> I think one just needs to compute the left-margin width.

Here is what I have. There is indeed a problem with the left margin.
What change do you propose?

(defun point-to-coord (point)
 "Return coordinates of POINT in selected window.
The coordinates are in the form \(\(XOFFSET YOFFSET) WINDOW).
This form is suitable for `popup-menu'."
 ;; Fix-me: showtip.el adds (window-inside-pixel-edges
 ;; (selected-window)). Why?
 (let* ((pn (posn-at-point point))
        (x-y (posn-x-y pn))
        (x (car x-y))
        (y (cdr x-y))
        (pos (list (list x (+ y 20)) (selected-window))))
   pos))

> I wrote a tooltip-at-point package a few years ago (but never got it t work
> reliably) and added this into the mix....
> Kevin
>
> On Sun, Dec 28, 2008 at 9:14 AM, Lennart Borgman <lennart.borgman@gmail.com>
> wrote:
>>
>> On Sun, Dec 28, 2008 at 10:53 AM, Jason Rumney <jasonr@gnu.org> wrote:
>> > Kevin Burton wrote:
>> >>
>> >> You mean by specifying top and left?  I think that is what I was going
>> >> to
>> >> do to position the tooltip but first I need to find out the x/y of the
>> >> current point.
>> >
>> > (posn-at-point &optional POS WINDOW)
>>
>> I think there is a bug with left margin. (Though I have not had time
>> to submit a bug report for this.)



--
Founder/CEO Spinn3r.com
Location: San Francisco, CA
AIM/YIM: sfburtonator
Skype: burtonator
Work: http://spinn3r.com
------=_Part_121413_31983458.1230485896792--