Subject: bug#14241: 24.3; widgets and posn-at-point

From: Eli Zaretskii <[email-masked]>
Date: Mon, 06 May 2013 20:12:53 +0300

> From: Nicolas Richard <[email-masked]>
> Cc: [email-masked]
> Date: Wed, 24 Apr 2013 13:48:14 +0200
> 
> Ok, I think I now fully understand your recipe. My own recipe was in
> fact over-simplified for what I wanted to show. 
> 
> So I now change '-1' to '-3' in it, i.e. :
> 
> (let (oposn opoint)
>   (widget-create 'checkbox) ; point is left after the widget
>   (setq oposn (posn-at-point)
>         opoint (point))
>   (forward-char -3) ; cursor now on the widget.
>   (message "Old: %s (Point at %d)\nNew: %s (Point at %d)"
> 	   oposn opoint
> 	   (posn-at-point) (point)))
> 
> and that still shows the surprising result. In other words, if in a
> blank buffer I do
> M-: (progn
>   (widget-create 'checkbox)
>   (goto-char (point-min))
>   (posn-x-y (posn-at-point))) ;; or (pos-visible-in-window-p nil nil t)
> then I do not get (0 0) -- that is is unexpected to me.

That was a bug, albeit a very old one.  I fixed it now in trunk
revision 112480.