unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: burton@openprivacy.org (Kevin A. Burton (burtonator))
Subject: Emacs Needs Floating Windows (Advanced Tooltips for IntelliSense Support)
Date: 22 Nov 2002 16:07:55 -0800	[thread overview]
Message-ID: <87y97lf8ro.fsf@openprivacy.org> (raw)

-----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-----

             reply	other threads:[~2002-11-23  0:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-23  0:07 Kevin A. Burton (burtonator) [this message]
2002-11-23  0:59 ` Emacs Needs Floating Windows (Advanced Tooltips for IntelliSense Support) Miles Bader
2002-11-23  1:23   ` Kevin A. Burton (burtonator)
2002-11-23  1:49     ` Miles Bader
2002-11-23  2:31       ` Kevin A. Burton (burtonator)
2002-11-24  2:43   ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y97lf8ro.fsf@openprivacy.org \
    --to=burton@openprivacy.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).