GNU bug report logs - #14241
24.3; widgets and posn-at-point

Previous Next

Package: emacs;

Reported by: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>

Date: Mon, 22 Apr 2013 10:05:02 UTC

Severity: minor

Found in version 24.3

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 14241 <at> debbugs.gnu.org
Subject: bug#14241: 24.3; widgets and posn-at-point
Date: Wed, 24 Apr 2013 13:48:14 +0200
Eli Zaretskii <eliz <at> 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.




This bug report was last modified 12 years and 71 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.