GNU bug report logs -
#15783
24.3; posn-at-x-y is relative to the buffer area, posn-at-point is relative to the text area.
Previous Next
Reported by: 椎野 裕樹 <shiino.yuki <at> gmail.com>
Date: Fri, 1 Nov 2013 15:58:01 UTC
Severity: minor
Tags: patch
Found in version 24.3
Fixed in version 28.1
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: 椎野 裕樹
> <shiino.yuki <at> gmail.com>
> Date: Fri, 1 Nov 2013 23:49:00 +0900
>
> On Emacs 24 with non-nil header-line-format, y offset returned by
> `posn-at-point' is relative to the text area *not including the header
> line*. However, `posn-at-x-y' takes y offset relative to the buffer
> area *including the header line*.
>
> Is this by design?
Yes.
> When I get the position by `posn-at-point', and then convert the
> position to the point by `posn-at-x-y', the resulting point does not
> match the point given to `posn-at-point'.
You should test for non-nil header-line-format, and adjust the value
accordingly.
> On Emacs 22 and 23, both functions are relative to the buffer area
> including the header line. It's fine.
That caused much more grave bugs.
This bug report was last modified 3 years and 264 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.