From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman" Newsgroups: gmane.emacs.devel Subject: Re: Possible to show tooltip at (point) ???? Date: Mon, 29 Dec 2008 03:14:22 +0100 Message-ID: References: <30c6373b0812272248y7c51447ax15bcea34d8cce132@mail.gmail.com> <8763l47jpy.fsf@cyd.mit.edu> <30c6373b0812280124r6301ec1ka7e12d2e719126a1@mail.gmail.com> <49574CB0.5050600@gnu.org> <30c6373b0812280920y722b7822s7c844f0c73636545@mail.gmail.com> <30c6373b0812281805odc4b2d7n549c6304ceb62553@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1230516883 19335 80.91.229.12 (29 Dec 2008 02:14:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Dec 2008 02:14:43 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org, Jason Rumney To: "Kevin Burton" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 29 03:15:51 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 1LH7fY-00061g-Ah for ged-emacs-devel@m.gmane.org; Mon, 29 Dec 2008 03:15:48 +0100 Original-Received: from localhost ([127.0.0.1]:52416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LH7eK-0007k5-FM for ged-emacs-devel@m.gmane.org; Sun, 28 Dec 2008 21:14:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LH7eF-0007k0-Qv for emacs-devel@gnu.org; Sun, 28 Dec 2008 21:14:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LH7eE-0007jo-E6 for emacs-devel@gnu.org; Sun, 28 Dec 2008 21:14:26 -0500 Original-Received: from [199.232.76.173] (port=48184 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LH7eE-0007jl-8T for emacs-devel@gnu.org; Sun, 28 Dec 2008 21:14:26 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.156]:23211) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LH7eC-0007m0-Mc; Sun, 28 Dec 2008 21:14:25 -0500 Original-Received: by fg-out-1718.google.com with SMTP id l26so1791945fgb.30 for ; Sun, 28 Dec 2008 18:14:23 -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:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ngbS4mRHJTdyGidwqcGHBPWzpEpo60m9razbBELCP3A=; b=WmSegMTwyjxpuWBNOsWUbpR93jZPwnjagVs0bwVpGZwfWJ1bM8SWU+4Q993e9cSBUy q29yWH/4pIinp6q7tK1JLDsh+xH64zn1n7dwMLyE6QbT1Ge6KFtD3sXzrAelzGH0XgyJ OydmpoSVRfbpTLuOXIs8t1ZvyDyBVg8TUAt74= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=U7dyV7SKzWwAQnQ4/dr+lkG6WEw//v5Zy9xc9wNJ7zNya/vtXMBOSGh6FYV3guQDo+ VDt9xpykO5Bz1HpQfm1yVbNGno1nVSwAW6ovEdF8lCUQyH96LvxXhFyppEtwk6z63gag hZDiRXLw7uSeyOO4p+Ukk0GuAnQx8mHdflo8w= Original-Received: by 10.86.4.14 with SMTP id 14mr7764354fgd.76.1230516863104; Sun, 28 Dec 2008 18:14:23 -0800 (PST) Original-Received: by 10.86.35.9 with HTTP; Sun, 28 Dec 2008 18:14:22 -0800 (PST) In-Reply-To: <30c6373b0812281805odc4b2d7n549c6304ceb62553@mail.gmail.com> Content-Disposition: inline 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:107361 Archived-At: 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 >