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 18:41:49 -0800 Message-ID: <30c6373b0812281841t2dc27f9cl8eecf056f9176b07@mail.gmail.com> References: <30c6373b0812272248y7c51447ax15bcea34d8cce132@mail.gmail.com> <30c6373b0812280124r6301ec1ka7e12d2e719126a1@mail.gmail.com> <49574CB0.5050600@gnu.org> <30c6373b0812280920y722b7822s7c844f0c73636545@mail.gmail.com> <30c6373b0812281805odc4b2d7n549c6304ceb62553@mail.gmail.com> <30c6373b0812281833v325439e8vd382b3b2cf44ac4a@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_124411_15492043.1230518509448" X-Trace: ger.gmane.org 1230518527 22165 80.91.229.12 (29 Dec 2008 02:42:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Dec 2008 02:42:07 +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 Mon Dec 29 03:43:15 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 1LH865-0002jG-Pj for ged-emacs-devel@m.gmane.org; Mon, 29 Dec 2008 03:43:14 +0100 Original-Received: from localhost ([127.0.0.1]:34069 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LH84s-0002ry-9O for ged-emacs-devel@m.gmane.org; Sun, 28 Dec 2008 21:41:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LH84o-0002rt-Nj for emacs-devel@gnu.org; Sun, 28 Dec 2008 21:41:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LH84m-0002rh-VL for emacs-devel@gnu.org; Sun, 28 Dec 2008 21:41:54 -0500 Original-Received: from [199.232.76.173] (port=45681 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LH84m-0002re-RQ for emacs-devel@gnu.org; Sun, 28 Dec 2008 21:41:52 -0500 Original-Received: from mail-gx0-f16.google.com ([209.85.217.16]:57099) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LH84k-0000pK-Rc; Sun, 28 Dec 2008 21:41:51 -0500 Original-Received: by gxk9 with SMTP id 9so2987534gxk.18 for ; Sun, 28 Dec 2008 18:41:50 -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=CxBJUR+kJspIfhpmhST/ob2oN3jxDv7ZBIXz1WAFl+s=; b=pNA8CYh+bbl6NgKNELHVXMAhT9LTXQMeqxLhEmR+NIBkwvehJ66ru/C6XNI2ITtLdH fkOvOEVqKwbqQZAgrD43yPlmvWXfxjINk5k36vti2NB9wfPYrBhC5qLZlm/VYIaByb8L yjDIGo1AgDVpCza1+WNxO0+kDaAzuzURZRxRs= 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=qfj/CBEzHL1HWSwIa19tiMS2zB/8OX0ZSzzAw1gEfvjI0eQ440oiz4KUA5er3+XkpF nMHKR3DyUae0LMXt5NVDukrjP1FgSUErjXVuySNNUDh7U584L1BjeR+hwSSZnjX08Nh1 Vc5TioM+aVbOHWjhcxgW30RhIwerJS0V9YeYs= Original-Received: by 10.90.115.17 with SMTP id n17mr6366222agc.7.1230518509468; Sun, 28 Dec 2008 18:41:49 -0800 (PST) Original-Received: by 10.90.98.6 with HTTP; Sun, 28 Dec 2008 18:41:49 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: 1dfa9e24844c9274 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:107365 Archived-At: ------=_Part_124411_15492043.1230518509448 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hm..... that's interesting. So hopefully this is fixed in 23..... I can implement a hack for 22 and then disable it under 23... Kevin On Sun, Dec 28, 2008 at 6:36 PM, Lennart Borgman wrote: > GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-12-26 - ie w32 > > > On Mon, Dec 29, 2008 at 3:33 AM, Kevin Burton wrote: > > What platform are you on? What's your emacs-version? > > Mine is: > > GNU Emacs 22.3.2 (i386-apple-darwin9.5.0, Carbon Version 1.6.0) of > > 2008-09-21 on plume.sr.unh.edu - Aquamacs Distribution 1.5 > > > > On Sun, Dec 28, 2008 at 6:14 PM, Lennart Borgman < > lennart.borgman@gmail.com> > > wrote: > >> > >> For me it works also if the window is split. The only problem I have > >> seen is with the margins. Maybe this is platform dependent? > >> > >> I use this in nXhtml where it used for popup menus for completion in > >> XHTML. If you want to it is easy to test there. > >> > >> > >> On Mon, Dec 29, 2008 at 3:05 AM, Kevin Burton > wrote: > >> > Yes..... this DOES work but for a window that's not split.... as soon > as > >> > you > >> > split the window the coord is for the first window (not the second). > >> > I guess I could look at the current window configuration and double > the > >> > current Y if the window is split in half.... > >> > Kind of hacky but could work for a proof of concept. > >> > 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 > >> >> > > >> >> > 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 > >> > > > > > > > > > -- > > Founder/CEO Spinn3r.com > > Location: San Francisco, CA > > AIM/YIM: sfburtonator > > Skype: burtonator > > Work: http://spinn3r.com > > > -- Founder/CEO Spinn3r.com Location: San Francisco, CA AIM/YIM: sfburtonator Skype: burtonator Work: http://spinn3r.com ------=_Part_124411_15492043.1230518509448 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hm..... that's interesting.  So hopefully this is fixed in 23..... I can implement a hack for 22 and then disable it under 23...

Kevin

On Sun, Dec 28, 2008 at 6:36 PM, Lennart Borgman <lennart.borgman@gmail.com> wrote:
GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-12-26  - ie w32


On Mon, Dec 29, 2008 at 3:33 AM, Kevin Burton <burton@spinn3r.com> wrote:
> What platform are you on?  What's your emacs-version?
> Mine is:
> GNU Emacs 22.3.2 (i386-apple-darwin9.5.0, Carbon Version 1.6.0) of
> 2008-09-21 on plume.sr.unh.edu - Aquamacs Distribution 1.5
>
> On Sun, Dec 28, 2008 at 6:14 PM, Lennart Borgman <lennart.borgman@gmail.com>
> wrote:
>>
>> For me it works also if the window is split. The only problem I have
>> seen is with the margins. Maybe this is platform dependent?
>>
>> I use this in nXhtml where it used for popup menus for completion in
>> XHTML. If you want to it is easy to test there.
>>
>>
>> On Mon, Dec 29, 2008 at 3:05 AM, Kevin Burton <burton@spinn3r.com> wrote:
>> > Yes..... this DOES work but for a window that's not split.... as soon as
>> > you
>> > split the window the coord is for the first window (not the second).
>> > I guess I could look at the current window configuration and double the
>> > current Y if the window is split in half....
>> > Kind of hacky but could work for a proof of concept.
>> > 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
>> >
>
>
>
> --
> Founder/CEO Spinn3r.com
> Location: San Francisco, CA
> AIM/YIM: sfburtonator
> Skype: burtonator
> Work: http://spinn3r.com
>



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