Path: utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!SUN.COM!peck From: peck@SUN.COM Newsgroups: gnu.emacs.bug Subject: Minibuf window coordinates Message-ID: <8904181851.AA15566@denali.sun.com> Date: 18 Apr 89 18:51:04 GMT References: <50148@philabs.Philips.Com> Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 16 I don't know what the prompt string is, so we just guess... This code from sun-fns.el, the "common cases" are `Eval: ', ie 4 char prompts If your prompt string is longer, the mouse will still be a few more chars to the right. (defun mini-move-point (window x y) ;; -6 is good for most common cases (mouse-move-point window (- x 6) 0)) If there is a variable holding the current prompt string, the "6" could be replaced with (length prompt-string) + 1 or + 2 for the punctuation. The "point" for move-point refers to buffer position, but the "x" is in window coordinates, and the beginning of buffer is *not* at the left edge of the window. Does someone out in GNU-land know the appropriate transformation?