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:36:11 +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> <30c6373b0812281833v325439e8vd382b3b2cf44ac4a@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 1230518191 21620 80.91.229.12 (29 Dec 2008 02:36:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Dec 2008 02:36:31 +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:37:37 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 1LH80f-0001lt-Cc for ged-emacs-devel@m.gmane.org; Mon, 29 Dec 2008 03:37:37 +0100 Original-Received: from localhost ([127.0.0.1]:47831 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LH7zR-000230-To for ged-emacs-devel@m.gmane.org; Sun, 28 Dec 2008 21:36:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LH7zM-00020N-M1 for emacs-devel@gnu.org; Sun, 28 Dec 2008 21:36:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LH7zL-0001z8-Cb for emacs-devel@gnu.org; Sun, 28 Dec 2008 21:36:15 -0500 Original-Received: from [199.232.76.173] (port=57419 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LH7zL-0001z5-7C for emacs-devel@gnu.org; Sun, 28 Dec 2008 21:36:15 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.158]:19578) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LH7zJ-0000SV-QC; Sun, 28 Dec 2008 21:36:14 -0500 Original-Received: by fg-out-1718.google.com with SMTP id l26so1793248fgb.30 for ; Sun, 28 Dec 2008 18:36:12 -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=ezXuZJxXQ+DWpb8E17xXMfUIa+o5MwLN2OjMZrv6eAM=; b=k/NxZu0DkhNL8ZMRHgjMM8QiJQS1TVlrcYmMxC6nrt0T7U1suJJKlKyj1JzesTstjz FOEW0YbmhxvTIuMgI+SISYBX+g18LCbolZojmSj0/hZvwncMO4fjy6dhuDnQPfkGKBjf EJ53lP5D9nJXlddb2akwPnwIAcnNOt7ei4n/w= 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=puFGm0X7bRT3cT6LjJXH408qZ2lkMttN7g3GkeU97ICXFHJ4mkoOB25UZNNki7q37o zrQmhw/69a72zJloFe7xx1yjysqZ1XK4QSVsNHN5A3fRogTcMGq1IPrX58ei3n1O8T/7 rNz21Jkio8CMtlwnxN3L7o0qwmdSEd7cNHuZ4= Original-Received: by 10.86.84.5 with SMTP id h5mr7811371fgb.49.1230518172075; Sun, 28 Dec 2008 18:36:12 -0800 (PST) Original-Received: by 10.86.35.9 with HTTP; Sun, 28 Dec 2008 18:36:11 -0800 (PST) In-Reply-To: <30c6373b0812281833v325439e8vd382b3b2cf44ac4a@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:107364 Archived-At: 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 > 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 >