Article View: gnu.epoch.misc
Article #277what-cursor-coordinates give wrong position
From: Jerry
Date: Tue, 29 Sep 1992 22:35
Date: Tue, 29 Sep 1992 22:35
23 lines
1540 bytes
1540 bytes
Doug Puchalsi on September 28 wrote:
-> Also, the motion.el file shows coordinates upon a mouse click. However,
-> the row seems to be relative to the top of the screen. How can I get
-> it to give me the true line number too?
Here's a drop in replacement for the posted what-cursor-coordinates in
the new motion.el. This gives true cursor coordinates. It is also
faster. I find the strings more helpful than a coordinate pair.
Season to taste.
-Jerry
---------------- real what-cursor-coordinates ----------------
(defun what-cursor-coordinates ()
"Print line and column number of the cursor."
(interactive)
(if mouse-show-position
(if (not (eq (nth 2 arg) (minibuffer-window)))
;; Don't display if cursor is in the minibuffer.
;; (setq mode-line-process (format " %d, %d" ;; Alternative to message
(message "Line: %d Column: %d"
(if (bolp) (+ 1 (count-lines 1 (point)))(count-lines 1 (point)))
(+ 1 (current-column))))))
Technical Details
Message-ID:
<9209292235.AA11584@banach>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!umn.edu!paperboy.micro.umn.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!math.ep.utexas.EDU!jerryReferences:
<e7fr024f23UN01@JUTS.ccc.amdahl.com>Show Full Headers
Complete Article Headers
Newsgroups: gnu.epoch.misc Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!umn.edu!paperboy.micro.umn.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!math.ep.utexas.EDU!jerry From: jerry@math.ep.utexas.EDU (Jerry) Subject: what-cursor-coordinates give wrong position Message-ID: <9209292235.AA11584@banach> Sender: daemon@cis.ohio-state.edu Organization: Department of Mathematical Sciences--University of Texas at El Paso References: <e7fr024f23UN01@JUTS.ccc.amdahl.com> Distribution: gnu Date: Tue, 29 Sep 1992 22:35:23 GMT Lines: 23