🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #1605

Minibuf window coordinates

#1605
From: peck
Date: Tue, 18 Apr 1989 18:51
16 lines
1140 bytes
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?
Technical Details
Message-ID: <8904181851.AA15566@denali.sun.com>
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!SUN.COM!peck
References: <50148@philabs.Philips.Com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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