all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Chong Yidong'" <cyd@stupidchicken.com>,
	"'Eli Zaretskii'" <eliz@gnu.org>
Cc: 7390@debbugs.gnu.org
Subject: bug#7390: 24.0.50; pos-col-row gives incorrect row
Date: Sat, 13 Nov 2010 13:38:01 -0800	[thread overview]
Message-ID: <A8857ABE52AA451D8CFC12ABF59E4ED8@us.oracle.com> (raw)
In-Reply-To: <87eiapkjv9.fsf@stupidchicken.com>

Thanks to you both for fixing this so quickly.

> The underlying situation is currently somewhat unsatisfactory---the
> pixel position of a mouse-event in the text area counts X 
> from the start of the text area (excluding margins and fringes),
> and Y from the top of the window (including the header line).

Yes, that's an inconsistency.

But what do we want "pixel" position to mean? Both (1) a position within the
text area and (2) a position overall (including things like scroll bars and
header lines can be useful.

We should not sacrifice one for the other. What you need in terms of a position
depends on what you are trying to do.  It seems we need either two different
functions (for each such positioning function) or an argument that determines
the behavior.

> This arises from some internal redisplay engine semantics, and is not
> really intuitive.  Rightfully, the header-line should be excluded from
> the pixel Y coordinates.

No, I don't think there is any such "rightfully".  Both behaviors are important
and useful (position within text area and position within total frame/window
including non-text decorations).  We should not decide that one of them is
"right".

But each of them needs to be consistent.

> It's not feasible to change this for Emacs 23,
> since existing code might depend on the current behavior.  But we can
> contemplate changing this in Emacs 24.
> 
> (Such a change will not affect the picture-mouse-set-point fix.)

Let's contemplate coming up with functions that give both kinds of position, not
just one.






  parent reply	other threads:[~2010-11-13 21:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-13 17:55 bug#7390: 24.0.50; pos-col-row gives incorrect row Drew Adams
2010-11-13 19:02 ` Eli Zaretskii
2010-11-13 19:17   ` Drew Adams
2010-11-13 21:10   ` Eli Zaretskii
2010-11-13 21:30     ` Eli Zaretskii
2010-11-13 21:37       ` Chong Yidong
2010-11-13 22:00         ` Eli Zaretskii
2010-11-16 19:59           ` Chong Yidong
2010-12-12  7:15     ` YAMAMOTO Mitsuharu
2010-12-12  7:29       ` Eli Zaretskii
2010-12-12  7:37         ` YAMAMOTO Mitsuharu
2010-12-12 20:47           ` Eli Zaretskii
2010-11-13 21:13   ` Chong Yidong
2010-11-13 21:21     ` Eli Zaretskii
2010-11-13 21:38     ` Drew Adams [this message]
2010-11-13 22:31       ` Eli Zaretskii
2010-11-13 21:44     ` Chong Yidong
2010-11-13 21:55       ` Eli Zaretskii
2010-11-14 17:35         ` Chong Yidong

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

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

  git send-email \
    --in-reply-to=A8857ABE52AA451D8CFC12ABF59E4ED8@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=7390@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=eliz@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 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.