unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Please add point-to-coord to Emacs 23
Date: Fri, 26 Sep 2008 01:02:13 +0200	[thread overview]
Message-ID: <48DC1875.7070403@gmail.com> (raw)
In-Reply-To: <48DC0557.4030202@gmail.com>

Lennart Borgman (gmail) wrote:
> 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?

It looks like a bug in posn-at-point to me, but I am not sure.

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




  reply	other threads:[~2008-09-25 23:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-25 21:40 Please add point-to-coord to Emacs 23 Lennart Borgman (gmail)
2008-09-25 23:02 ` Lennart Borgman (gmail) [this message]
2008-09-26  1:34   ` Miles Bader

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48DC1875.7070403@gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).