From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: burton@openprivacy.org (Kevin A. Burton (burtonator)) Newsgroups: gmane.emacs.devel Subject: Emacs Needs Floating Windows (Advanced Tooltips for IntelliSense Support) Date: 22 Nov 2002 16:07:55 -0800 Sender: emacs-devel-admin@gnu.org Message-ID: <87y97lf8ro.fsf@openprivacy.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1038010642 17910 80.91.224.249 (23 Nov 2002 00:17:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 23 Nov 2002 00:17:22 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18FNz4-0004eY-00 for ; Sat, 23 Nov 2002 01:17:18 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18FO3T-0003na-00 for ; Sat, 23 Nov 2002 01:21:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18FNy5-0001fw-00; Fri, 22 Nov 2002 19:16:17 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18FNx5-0001SD-00 for emacs-devel@gnu.org; Fri, 22 Nov 2002 19:15:15 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18FNwx-0001Mj-00 for emacs-devel@gnu.org; Fri, 22 Nov 2002 19:15:14 -0500 Original-Received: from dsl081-061-015.sfo1.dsl.speakeasy.net ([64.81.61.15] helo=openprivacy.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18FNww-0001MH-00 for emacs-devel@gnu.org; Fri, 22 Nov 2002 19:15:06 -0500 Original-Received: from openprivacy.org (localhost [127.0.0.1]) by openprivacy.org (8.12.6/8.12.6/Debian-7) with ESMTP id gAN0F5sA015987 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 22 Nov 2002 16:15:05 -0800 Original-Received: from localhost (localhost [[UNIX: localhost]]) by openprivacy.org (8.12.6/8.12.6/Debian-7) id gAN0F5jU015981; Fri, 22 Nov 2002 16:15:05 -0800 Original-To: emacs-devel@gnu.org Original-Lines: 121 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2.90 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9626 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9626 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sorry this is so long. I will try to summarize the thread on emacs-devel on my website. (note that this looks better if you use your browser and the URL given) Permalink to this entry: http://www.peerfear.org/rss/permalink/2002/11/22/1038009860-Emacs_Needs_Floating_Windows_Advanced_Tooltips_for_IntelliSense_Support.shtml For the last year or so I have been frustrated with the fact that Emacs doesn't provide floating windows. (NOTE: Under Emacs windows are primitives that hold buffers not X style windows.) Why is this necessary? I think there is a lot of functionality that Emacs is missing because it can't do complex "quick" user interfaces. I think an example is in order: http://www.thekompany.com/projects/kdestudio/_img/kdestudio.10.Feb.2000.sm.gif caption: Example [1] of KDE Studio showing method completion This prohibits a lot of functionality. For example I developed a library called irepeat [2] that takes an associated list of data (function calls, method pointers, etc) and *quickly* sorts through the list as you type. If you have bash it is very much like C-r but supports any data set. The problem is that irepeat is limited to using the minibuffer which isn't really a lot of information. Ideally I would bring up a lightweight buffer right above the minibuffer to show other options available to the user. I took a few seconds and created an example: http://www.peerfear.org/download/emacs-before-thumb.png caption: irepeat before floating windows (bottom left of screenshot) http://www.peerfear.org/download/emacs-after-thumb.png caption: irepeat after floating windows (bottom left of screenshot) This was accomplished with the tooltip support available within Emacs 21. The interesting thing about this is that tooltips are implemented with standard Emacs windows and buffers so I can use standard font properties and font-lock code. This could yield some *very* interesting functionality. I am specifically thinking of eldoc style just-in-time method and function completion and quick documentation lookup. Most modern IDEs (Visual Studio, KDE Studio, Borland JBuilder, IBM Visual Age, etc) support this functionality and there is no reason that Emacs should be left behind. Here are some screenshots from other products: http://www.netbeans.org/images/screenshots/3.4/linux-jsp-autocompletion_thumb.png caption: NetBeans showing [3] method completion http://www.omnicore.com/screenshots/windows-completion-screenshot-small.gif caption: IntelliJ showing [4] their method completion implementation. The is only one area that Emacs needs improvement to support this type of API. We need the ability to determine the X and Y (top and left) coords for (point) on the screen (the current active cursor). I have looked through all the Emacs code at length and have found NO way to accomplish through lisp. The only way to do this is through C which prohibits a lot of innovation by developers. I have tried looking at the Emacs event system but keyboard events to not generate cursor position (only mouse events). I have also tried to pursue using a hack to move the mouse to the current cursor and back but this also is impossible for a number of reasons. It is also impossible to calculate the cursor position based on frame width, position and window sizes due to the fact that Emacs can use dynamic fonts on Emacs 21. Can the GNU Emacs developers either: - - provide an API to determine the x and y coords of the current active cursor (point) - - provide a x-show-top-at-point function that provided the exact same functionality. Either one of these should be fairly trivial to implement but would deliver a *lot* of compelling functionality for Emacs users. 1. http://www.thekompany.com/projects/kdestudio/screenshots.php3 2. http://www.peerfear.org/el/irepeat.el 3. http://www.netbeans.org/images/screenshots/3.4/linux-java-autocompletion.png 4. http://www.omnicore.com/screenshots/windows-completion-screenshot.gif - -- Kevin A. Burton ( burton@apache.org, burton@openprivacy.org, burton@peerfear.org ) Location - San Francisco, CA, Cell - 415.595.9965 Jabber - burtonator@jabber.org, Web - http://www.peerfear.org/ GPG fingerprint: 4D20 40A0 C734 307E C7B4 DCAA 0303 3AC5 BD9D 7C4D IRC - openprojects.net #infoanarchy | #p2p-hackers | #reptile Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford (1863-1947) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt iD8DBQE93sbbAwM6xb2dfE0RAhbuAJ4pBBMqszTsg9AbQdJ19KubOh8SDgCgylsK G6gaRKCNuhluG8Xtp8CxxPc= =pCYT -----END PGP SIGNATURE-----