bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Nicolas Richard
Subject: bug#14241: 24.3; widgets and posn-at-point
Date: Wed, 24 Apr 2013 13:48:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> [Please keep the bug address on the CC line.]

I will do.

>> >  M-: (widget-create 'checkbox) RET
>> >  C-x =
>> >  M-: (forward-char -1) RET
>> >  C-x =
>> > 
>> > See how point doesn't move?

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.

-- 
N.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]