unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs Needs Floating Windows (Advanced Tooltips for IntelliSense Support)
@ 2002-11-23  0:07 Kevin A. Burton (burtonator)
  2002-11-23  0:59 ` Miles Bader
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin A. Burton (burtonator) @ 2002-11-23  0:07 UTC (permalink / 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-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Emacs Needs Floating Windows (Advanced Tooltips for IntelliSense Support)
  2002-11-23  0:07 Emacs Needs Floating Windows (Advanced Tooltips for IntelliSense Support) Kevin A. Burton (burtonator)
@ 2002-11-23  0:59 ` Miles Bader
  2002-11-23  1:23   ` Kevin A. Burton (burtonator)
  2002-11-24  2:43   ` Richard Stallman
  0 siblings, 2 replies; 6+ messages in thread
From: Miles Bader @ 2002-11-23  0:59 UTC (permalink / raw)
  Cc: emacs-devel

On Fri, Nov 22, 2002 at 04:07:55PM -0800, Kevin A. Burton (burtonator) wrote:

> 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 agree this would be a great thing to have.

I have a dictionary thing I wrote that displays a translation from an E/J
dictionary (edict) when you enter a word using the japanese input method.

It uses tooltips, which is usually `OK', but can be annoying if the mouse
pointer happens to be in a wierd place; I'd much rather have it displayed at
a known location relative to the emacs point.

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

Since the first is more primitive, it seems like a better choice (obviously
the second could be implemented using it).  Hmmm, if you have some
coordinates, can tooltips be displayed to the left/right of them (or only to
the right)?

-Miles
-- 
P.S.  All information contained in the above letter is false,
      for reasons of military security.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Emacs Needs Floating Windows (Advanced Tooltips for IntelliSense Support)
  2002-11-23  0:59 ` Miles Bader
@ 2002-11-23  1:23   ` Kevin A. Burton (burtonator)
  2002-11-23  1:49     ` Miles Bader
  2002-11-24  2:43   ` Richard Stallman
  1 sibling, 1 reply; 6+ messages in thread
From: Kevin A. Burton (burtonator) @ 2002-11-23  1:23 UTC (permalink / raw)
  Cc: emacs-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Miles Bader <miles@gnu.org> writes:

> Since the first is more primitive, it seems like a better choice (obviously
> the second could be implemented using it).  Hmmm, if you have some
> coordinates, can tooltips be displayed to the left/right of them (or only to
> the right)?

x-show-tip currently supports offsets..  If your point is all the way at the
bottom right of the screen you will have to use a negative offset to keep from
putting the tooltip off of the screen.

This could be done by figuring out the text when inserted in a temp buffer.

Someone on #emacs just gave me an interesting idea as to an impl and I am
playing with that now.... it might actually work! 

Kevin

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

Windows 95 - A 32 bit extension to a 16 bit shell for a 8 bit operating system
designed for 4 bit computers by a 2 bit company that can't stand 1 bit of
competition.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt

iD8DBQE93tiYAwM6xb2dfE0RAk8gAJ9Rneo2G/r+Fd4fhqEvlLMFLqyLtgCgkACu
LNF105mm98TXXoFkKEzpSaI=
=NrTJ
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Emacs Needs Floating Windows (Advanced Tooltips for IntelliSense Support)
  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)
  0 siblings, 1 reply; 6+ messages in thread
From: Miles Bader @ 2002-11-23  1:49 UTC (permalink / raw)
  Cc: emacs-devel

On Fri, Nov 22, 2002 at 05:23:36PM -0800, Kevin A. Burton (burtonator) wrote:
> Someone on #emacs just gave me an interesting idea as to an impl and I am
> playing with that now.... it might actually work! 

Do tell if it does.  [It's still a good idea to add the move
straightward interface, I think]

-Miles
-- 
Would you like fries with that?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Emacs Needs Floating Windows (Advanced Tooltips for IntelliSense Support)
  2002-11-23  1:49     ` Miles Bader
@ 2002-11-23  2:31       ` Kevin A. Burton (burtonator)
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin A. Burton (burtonator) @ 2002-11-23  2:31 UTC (permalink / raw)
  Cc: emacs-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Miles Bader <miles@gnu.org> writes:

> On Fri, Nov 22, 2002 at 05:23:36PM -0800, Kevin A. Burton (burtonator) wrote:
> > Someone on #emacs just gave me an interesting idea as to an impl and I am
> > playing with that now.... it might actually work! 
> 
> Do tell if it does.  [It's still a good idea to add the move
> straightward interface, I think]

http://www.peerfear.org/rss/permalink/2002/11/22/1038017513-Emacs_tooltipatpoint_Implementation.shtml

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

At the international airport... opps.. the shoe barn made its flight!

    - The homeless guys sitting behind me at Starbucks.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt

iD8DBQE93uiUAwM6xb2dfE0RAkSrAKCD7kEvrW6OqeMyUJm/GLn5YsEj6wCguyet
k5lPMTiBuFjCW886QcJQl4o=
=AYSU
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Emacs Needs Floating Windows (Advanced Tooltips for IntelliSense Support)
  2002-11-23  0:59 ` Miles Bader
  2002-11-23  1:23   ` Kevin A. Burton (burtonator)
@ 2002-11-24  2:43   ` Richard Stallman
  1 sibling, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2002-11-24  2:43 UTC (permalink / raw)
  Cc: burton, emacs-devel

    > - - provide an API to determine the x and y coords of the current active
    > cursor (point)

This is related to an item that I have been asking for years for
someone to implement: cursor calculations that take account of
variable size fonts.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-11-24  2:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-23  0:07 Emacs Needs Floating Windows (Advanced Tooltips for IntelliSense Support) Kevin A. Burton (burtonator)
2002-11-23  0:59 ` 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

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