all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Please add point-to-coord to Emacs 23
@ 2008-09-25 21:40 Lennart Borgman (gmail)
  2008-09-25 23:02 ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman (gmail) @ 2008-09-25 21:40 UTC (permalink / raw)
  To: Emacs Devel

I have several times asked if not a function like the one below could be
added to Emacs. Here is my request again.

Even if it is not added could someone perhaps explain how to change it
so that it works when left margin is non-zero?


(defun point-to-coord (point)
  "Return coordinates of POINT in selected window.
The coordinates are in the form \(\(XOFFSET YOFFSET) WINDOW).
This form is suitable for `popup-menu'."
  (let* ((pn (posn-at-point point))
         (x-y (posn-x-y pn))
         (x (car x-y))
         (y (cdr x-y))
         (pos (list (list x (+ y 20)) (selected-window))))
    pos))




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

end of thread, other threads:[~2008-09-26  1:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-25 21:40 Please add point-to-coord to Emacs 23 Lennart Borgman (gmail)
2008-09-25 23:02 ` Lennart Borgman (gmail)
2008-09-26  1:34   ` Miles Bader

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.